[geeklog-hg] geeklog: Fixed Staticpage upgrade problem with incorrect topic a...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Mon Sep 10 15:30:10 EDT 2012
changeset 8810:e25ef2207db8
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/e25ef2207db8
user: Tom <websitemaster at cogeco.net>
date: Mon Sep 10 15:25:24 2012 -0400
description:
Fixed Staticpage upgrade problem with incorrect topic assignments (bug #0001475)
diffstat:
plugins/staticpages/install_updates.php | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (22 lines):
diff -r 3d2da615eefe -r e25ef2207db8 plugins/staticpages/install_updates.php
--- a/plugins/staticpages/install_updates.php Sat Sep 08 04:04:20 2012 +0900
+++ b/plugins/staticpages/install_updates.php Mon Sep 10 15:25:24 2012 -0400
@@ -40,12 +40,14 @@
$A = DB_fetchArray($result);
if ($A['sp_tid'] == 'all') {
- $A['sp_tid'] == TOPIC_ALL_OPTION;
- } elseif ($A['sp_tid'] == 'none') {
- $A['sp_tid'] == TOPIC_HOMEONLY_OPTION;
+ $A['sp_tid'] = TOPIC_ALL_OPTION;
+ } elseif ($A['sp_tid'] == 'none' AND $A['sp_centerblock'] == 1) { // If center block enabled and none then homepage
+ $A['sp_tid'] = TOPIC_HOMEONLY_OPTION;
+ } elseif ($A['sp_tid'] == 'none' AND $A['sp_centerblock'] == 0) { // If center block disabled and none then all
+ $A['sp_tid'] = TOPIC_ALL_OPTION;
}
- $sql = "INSERT INTO {$_TABLES['topic_assignments']} (tid, type, id, inherit, tdefault) VALUES ('{$A['sp_tid']}', 'staticpages', '{$A['sp_id']}', 1, 0)";
+ $sql = "INSERT INTO {$_TABLES['topic_assignments']} (tid, type, id, inherit, tdefault) VALUES ('{$A['sp_tid']}', 'staticpages', '{$A['sp_id']}', 1, 1)";
DB_query($sql);
}
More information about the geeklog-cvs
mailing list