[geeklog-hg] geeklog: Topic block now updated when topics are moved up and do...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Mon Sep 23 21:13:05 EDT 2013
changeset 9310:bd87752c99e6
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/bd87752c99e6
user: Tom <websitemaster at cogeco.net>
date: Mon Sep 23 21:12:14 2013 -0400
description:
Topic block now updated when topics are moved up and down in the admin list. Reorder Topics failed to reload the $_TOPICS array (bug #0001690)
diffstat:
public_html/admin/topic.php | 14 ++++++++++++--
public_html/lib-common.php | 2 +-
2 files changed, 13 insertions(+), 3 deletions(-)
diffs (50 lines):
diff -r 291e34871eba -r bd87752c99e6 public_html/admin/topic.php
--- a/public_html/admin/topic.php Sun Sep 22 17:40:12 2013 -0400
+++ b/public_html/admin/topic.php Mon Sep 23 21:12:14 2013 -0400
@@ -645,7 +645,7 @@
*/
function reorderTopics()
{
- global $_TABLES;
+ global $_TABLES, $_TOPICS;
$order = 0;
$A = getTopicChildTreeArray();
@@ -655,6 +655,17 @@
DB_query("UPDATE {$_TABLES['topics']} SET sortnum = '$order' WHERE tid = '{$B['tid']}'");
}
}
+
+ // Delete topic cache info since topics have changed
+ $cacheInstance = 'topicsblock__';
+ CACHE_remove_instance($cacheInstance);
+
+ $cacheInstance = 'topic_tree__';
+ CACHE_remove_instance($cacheInstance);
+
+ // Update Topics Array to reflect any changes since not sure what is called after
+ $_TOPICS = TOPIC_buildTree(TOPIC_ROOT, true);
+
}
/**
@@ -988,7 +999,6 @@
} else { // 'cancel' or no mode at all
$display .= COM_showMessageFromParameter();
- reorderTopics();
$display .= listTopics(SEC_createToken());
$display = COM_createHTMLDocument($display, array('pagetitle' => $LANG27[8]));
diff -r 291e34871eba -r bd87752c99e6 public_html/lib-common.php
--- a/public_html/lib-common.php Sun Sep 22 17:40:12 2013 -0400
+++ b/public_html/lib-common.php Mon Sep 23 21:12:14 2013 -0400
@@ -2950,7 +2950,7 @@
// See if topic block cache is there for specified topic (since topics can be hidden here depending on what topic is clicked)
$cacheInstance = 'topicsblock__' . $topic . '__' . CACHE_security_hash() . '__' . $_CONF['theme'];
- $retval = CACHE_check_instance($cacheInstance, 0);
+ $retval = CACHE_check_instance($cacheInstance); // Language and theme specific
if ($retval) {
return $retval;
}
More information about the geeklog-cvs
mailing list