[geeklog-hg] geeklog: Fixed cloned staticpages to include any topic information

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon May 14 12:55:51 EDT 2012


changeset 8700:77954f880796
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/77954f880796
user: Tom <websitemaster at cogeco.net>
date: Mon May 14 12:55:22 2012 -0400
description:
Fixed cloned staticpages to include any topic information

diffstat:

 public_html/admin/plugins/staticpages/index.php |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r d96d15e06d79 -r 77954f880796 public_html/admin/plugins/staticpages/index.php
--- a/public_html/admin/plugins/staticpages/index.php	Mon May 14 10:18:32 2012 -0400
+++ b/public_html/admin/plugins/staticpages/index.php	Mon May 14 12:55:22 2012 -0400
@@ -348,8 +348,13 @@
     $sp_template->set_var('sp_page_title', $page_title);
     
     $sp_template->set_var('lang_topic', $LANG_STATIC['topic']);
-    $sp_template->set_var('topic_selection',
-                          TOPIC_getTopicSelectionControl ('staticpages', $A['sp_id'], true, false, true));    
+    if ($mode != 'clone') {
+        $sp_template->set_var('topic_selection',
+                              TOPIC_getTopicSelectionControl ('staticpages', $A['sp_id'], true, false, true));
+    } else {
+        $sp_template->set_var('topic_selection',
+                              TOPIC_getTopicSelectionControl ('staticpages', $A['clone_sp_id'], true, false, true));
+    }
     
     $sp_template->set_var('lang_metadescription',
                           $LANG_ADMIN['meta_description']);
@@ -638,6 +643,7 @@
         if (DB_numRows($result) == 1) {
             $A = DB_fetchArray($result);
             $A['sp_id'] = COM_makesid();
+            $A['clone_sp_id'] = $sp_id; // need this so we can load the correct topics
             $A['owner_id'] = $_USER['uid'];
             $A['unixdate'] = time();
             $A['sp_hits'] = 0;



More information about the geeklog-cvs mailing list