]> git.mjollnir.org Git - s9y.git/commitdiff
fix category url in backend
authorgarvinhicking <garvinhicking>
Sat, 25 Feb 2006 15:42:32 +0000 (15:42 +0000)
committergarvinhicking <garvinhicking>
Sat, 25 Feb 2006 15:42:32 +0000 (15:42 +0000)
include/admin/entries.inc.php

index 98546a39899c9e352e355ba1cf2a02e173a7a43d..18ae23748953ec7696f4fc514266c0684fde5cac 100644 (file)
@@ -245,7 +245,8 @@ function serendipity_drawList() {
                     echo ' ' . IN . ' ';
                     $cats = array();
                     foreach ($entry['categories'] as $cat) {
-                        $cats[] = '<a href="' . $serendipity['serendipityHTTPPath'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'categories/' . $cat['categoryid'] . '_' . serendipity_makeFilename($cat['category_name']) . '">' . $cat['category_name'] . '</a>';
+                        $caturl = serendipity_categoryURL($cat);
+                        $cats[] = '<a href="' . $caturl . '">' . $cat['category_name'] . '</a>';
                     }
                     echo implode(', ', $cats);
                 }
@@ -347,7 +348,7 @@ switch($serendipity['GET']['adminAction']) {
         // Save the entry, or just display a preview
         $use_legacy = true;
         serendipity_plugin_api::hook_event('backend_entry_iframe', $use_legacy);
-        
+
         if ($use_legacy) {
             if ($serendipity['POST']['preview'] != 'true') {
                 /* We don't need an iframe to save a draft */
@@ -368,15 +369,15 @@ switch($serendipity['GET']['adminAction']) {
                 if (!is_numeric($entry['timestamp'])) {
                     $entry['timestamp']  = time();
                 }
-    
+
                 if (!isset($entry['trackbacks']) || !$entry['trackbacks']) {
                     $entry['trackbacks'] = 0;
                 }
-    
+
                 if (!isset($entry['comments']) || !$entry['comments']) {
                     $entry['comments']   = 0;
                 }
-    
+
                 if (!isset($entry['realname']) || !$entry['realname']) {
                     if (!empty($serendipity['realname'])) {
                         $entry['realname']   = $serendipity['realname'];
@@ -384,7 +385,7 @@ switch($serendipity['GET']['adminAction']) {
                         $entry['realname']   = $serendipity['serendipityUser'];
                     }
                 }
-    
+
                 $categories = (array)$entry['categories'];
                 $entry['categories'] = array();
                 foreach ($categories as $catid) {
@@ -393,17 +394,17 @@ switch($serendipity['GET']['adminAction']) {
                     }
                     $entry['categories'][] = serendipity_fetchCategoryInfo($catid);
                 }
-    
+
                 if (count($entry['categories']) < 1) {
                     unset($entry['categories']);
                 }
-    
+
                 if (isset($entry['id'])) {
                     $serendipity['GET']['id'] = $entry['id'];
                 } else {
                     $serendipity['GET']['id'] = 1;
                 }
-    
+
                 if ($serendipity['use_iframe']) {
                     echo '<div class="serendipityAdminMsgSuccess">' . IFRAME_PREVIEW . '</div><br />';
                     serendipity_iframe_create('preview', $entry);