]> git.mjollnir.org Git - s9y.git/commitdiff
* various backports
authornohn <nohn>
Sun, 5 Nov 2006 08:31:15 +0000 (08:31 +0000)
committernohn <nohn>
Sun, 5 Nov 2006 08:31:15 +0000 (08:31 +0000)
include/functions.inc.php
include/functions_entries.inc.php
rss.php

index b671b314db454f5fc35baa876ca1160e79246e4a..0401053645ce3a9452ccfe72587a644d985c3de3 100644 (file)
@@ -237,7 +237,7 @@ function serendipity_walkRecursive($ary, $child_name = 'id', $parent_name = 'par
     global $serendipity;
     static $_resArray;
 
-    if ( sizeof($ary) == 0 ) {
+    if (!is_array($ary) || sizeof($ary) == 0 ) {
         return array();
     }
 
index c6d59a63af962633c61a2f9a33d67ca6c59961c9..9c1a8e64d07f7e64f450cb1c6e174bb65ce6f66f 100644 (file)
@@ -344,6 +344,7 @@ function serendipity_fetchEntries($range = null, $full = true, $limit = '', $fet
                     e.last_modified,
 
                     a.realname AS author,
+                    a.username AS loginname,
                     a.email";
     }
 
@@ -921,7 +922,7 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm
 
             $authorData = array(
                             'authorid' => $entry['authorid'],
-                            'username' => $entry['author'],
+                            'username' => $entry['loginname'],
                             'email'    => $entry['email'],
                             'realname' => $entry['author']
             );
diff --git a/rss.php b/rss.php
index 10502ecdd76a66d27601bac51f0ee1f09eb8d490..1dfe2b9857954b4c08379786670536766ab6cf3b 100644 (file)
--- a/rss.php
+++ b/rss.php
@@ -28,6 +28,10 @@ if (!isset($_GET['type'])) {
     $_GET['type'] = 'content';
 }
 
+if (!empty($_SERVER['HTTP_USER_AGENT']) && stristr($_SERVER['HTTP_USER_AGENT'], 'feedburner')) {
+    $_GET['nocache'] = true;
+}
+
 if (!isset($_GET['nocache'])) {
     switch ($_GET['type']) {
         case 'comments':
@@ -131,9 +135,9 @@ if (is_array($plugins)) {
             $metadata['fullFeed']          = $plugin->get_config('fullfeed', false);
 
             if ($_GET['type']  == 'content' && $plugin->get_config('show_feedburner') === 'force' && !preg_match('@FeedBurn@i', $_SERVER['HTTP_USER_AGENT'])) {
-                       $url = 'http://feeds.feedburner.com/' . $plugin->get_config('fb_id');
-                       header('Location: ' . $url);
-                       exit;
+                        $url = 'http://feeds.feedburner.com/' . $plugin->get_config('fb_id');
+                        header('Location: ' . $url);
+                        exit;
             }
             $metadata['showMail']          = serendipity_db_bool($plugin->get_config('show_mail', $metadata['showMail']));
             break;