[geeklog-hg] geeklog: Made sure reorder topics is run for move, new, updated ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Tue Oct 1 07:25:39 EDT 2013


changeset 9317:b8b2056ae537
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/b8b2056ae537
user: Tom <websitemaster at cogeco.net>
date: Tue Oct 01 07:25:11 2013 -0400
description:
Made sure reorder topics is run for move, new, updated and delete along with deleting cache and recreating topics array

diffstat:

 public_html/admin/topic.php |  15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diffs (53 lines):

diff -r 23d35a6e0bcd -r b8b2056ae537 public_html/admin/topic.php
--- a/public_html/admin/topic.php	Sun Sep 29 10:34:14 2013 -0400
+++ b/public_html/admin/topic.php	Tue Oct 01 07:25:11 2013 -0400
@@ -515,9 +515,6 @@
             }
     
             DB_save($_TABLES['topics'],'tid, topic, inherit, hidden, parent_id, imageurl, meta_description, meta_keywords, sortnum, limitnews, is_default, archive_flag, owner_id, group_id, perm_owner, perm_group, perm_members, perm_anon',"'$tid', '$topic', $inherit, $hidden, '$parent_id', '$imageurl', '$meta_description', '$meta_keywords','$sortnum','$limitnews',$is_default,'$is_archive',$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,$perm_anon");
-            
-            // Update Topics Array to reflect any changes since not sure what is called after
-            $_TOPICS = TOPIC_buildTree(TOPIC_ROOT, true);
     
             if ($old_tid != $tid) {
                 PLG_itemSaved($tid, 'topic', $old_tid);
@@ -525,6 +522,9 @@
                 PLG_itemSaved($tid, 'topic');
             }
             
+            // Reorder Topics, Delete topic cache and reload topic tree
+            reorderTopics(); 
+            
             // update feed(s)
             COM_rdfUpToDateCheck('article', $tid);
     
@@ -707,6 +707,9 @@
     
     PLG_itemSaved($tid, 'topic');
     
+    // Reorder Topics, Delete topic cache and reload topic tree
+    reorderTopics(); 
+    
 }
 
 /**
@@ -800,8 +803,8 @@
     DB_delete($_TABLES['topic_assignments'], 'tid', $tid);
     DB_delete($_TABLES['topics'], 'tid', $tid);
 
-    // Update Topics Array to reflect any changes since not sure what is called after
-    $_TOPICS = TOPIC_buildTree(TOPIC_ROOT, true);
+    // Reorder Topics, Delete topic cache and reload topic tree
+    reorderTopics(); 
     
     // update feed(s)
     COM_rdfUpToDateCheck('article');
@@ -993,7 +996,7 @@
 } elseif ($mode == 'change_sortnum' && SEC_checkToken()) {
     $display .= COM_showMessageFromParameter();
     moveTopics(COM_applyFilter($_GET['tid']), COM_applyFilter($_GET['where']));
-    reorderTopics();
+    
     $display .= listTopics(SEC_createToken());
     $display = COM_createHTMLDocument($display, array('pagetitle' => $LANG27[8]));
 



More information about the geeklog-cvs mailing list