]> git.mjollnir.org Git - s9y.git/commitdiff
Small bugfix for category sorting and HTTP-Auth
authorgarvinhicking <garvinhicking>
Thu, 23 Nov 2006 11:27:07 +0000 (11:27 +0000)
committergarvinhicking <garvinhicking>
Thu, 23 Nov 2006 11:27:07 +0000 (11:27 +0000)
docs/NEWS
include/functions_entries.inc.php
serendipity_config.inc.php

index 774296c830c9d6718bd3c616deb30277451b5162..499bbff6e8c52b99f5e87c4fc260e6b798660e01 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,10 @@
 Version 1.1 ()
 ------------------------------------------------------------------------
 
+    * Small bugfixes: Allow to use different login credentials than the
+      current HTTP Basic-Auth, if used. Order categories by name in
+      single entry view (garvinhicking)
+
     * Added bookmarklet to Serendipity core, added to the "Further links"
       welcome screen. Thanks to stm999999999! (garvinhicking)
 
index 9477bdc77f8d52893860f3f69a090abc2407efbd..ec0845e16b73eb9ed44bb0ed282c0c5000358986 100644 (file)
@@ -132,7 +132,8 @@ function &serendipity_fetchEntryCategories($entryid) {
                     FROM {$serendipity['dbPrefix']}category AS c
               INNER JOIN {$serendipity['dbPrefix']}entrycat AS ec
                       ON ec.categoryid = c.categoryid
-                   WHERE ec.entryid = {$entryid}";
+                   WHERE ec.entryid = {$entryid}
+                ORDER BY c.category_name ASC";
 
         $cat =& serendipity_db_query($query);
         if (!is_array($cat)) {
index 6295c989f8842ad6125c50e00e7c1d668cbbc894..40489d88b74279de9ebacb414183bd1f5a261be6 100644 (file)
@@ -268,8 +268,12 @@ if (IS_installed === true) {
             header("HTTP/1.0 401 Unauthorized");
             exit;
         } else {
-            $serendipity['POST']['user'] = $_SERVER['PHP_AUTH_USER'];
-            $serendipity['POST']['pass'] = $_SERVER['PHP_AUTH_PW'];
+            if (!isset($serendipity['POST']['user'])) {
+                $serendipity['POST']['user'] = $_SERVER['PHP_AUTH_USER'];
+            }
+            if (!isset($serendipity['POST']['pass'])) {
+                $serendipity['POST']['pass'] = $_SERVER['PHP_AUTH_PW'];
+            }
         }
     } elseif (isset($_REQUEST['http_auth_user']) && isset($_REQUEST['http_auth_pw'])) {
         $serendipity['POST']['user'] = $_REQUEST['http_auth_user'];