Fix problem with %username% permalinks
authorgarvinhicking <garvinhicking>
Tue, 24 Oct 2006 19:46:20 +0000 (19:46 +0000)
committergarvinhicking <garvinhicking>
Tue, 24 Oct 2006 19:46:20 +0000 (19:46 +0000)
docs/NEWS
include/functions_entries.inc.php

index c65fb6c9edadb058ee74f5594107fe23a4796337..6a885bb64a9cbc6d29cc7d47b26f78b55a77ce56 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,9 @@
 Version 1.1 ()
 ------------------------------------------------------------------------
 
+    * Fix bug with using %username% in author permalinks, thanks to oeli
+      from the forums! (garvinhicking)
+
     * Fix possible integer wraparound in comment count leading to
       a gazillion counter state. Also now show links to the entries
       within the administration comment panel. Thanks to Julian Finn!
index 765053e27e5afad20766f83ba46503d9771a66c4..ac2e5db64551853b9429f13fcd573911cbb40552 100644 (file)
@@ -350,6 +350,7 @@ function &serendipity_fetchEntries($range = null, $full = true, $limit = '', $fe
                     e.last_modified,
 
                     a.realname AS author,
+                    a.username AS loginname,
                     a.email";
     }
 
@@ -962,7 +963,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']
             );