[geeklog-cvs] geeklog: Some missing pieces for Stan's Topic ID fix
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Mar 27 05:26:03 EDT 2010
changeset 7836:c7e8cc7f7127
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/c7e8cc7f7127
user: Dirk Haun <dirk at haun-online.de>
date: Sat Mar 27 10:24:49 2010 +0100
description:
Some missing pieces for Stan's Topic ID fix
diffstat:
public_html/admin/topic.php | 24 ++++++++++--
public_html/docs/english/theme.html | 2 +
public_html/docs/history | 3 +
public_html/layout/professional/admin/topic/topiceditor.thtml | 2 +-
4 files changed, 26 insertions(+), 5 deletions(-)
diffs (87 lines):
diff -r ce94a8b05250 -r c7e8cc7f7127 public_html/admin/topic.php
--- a/public_html/admin/topic.php Fri Mar 26 23:01:01 2010 -0400
+++ b/public_html/admin/topic.php Sat Mar 27 10:24:49 2010 +0100
@@ -240,7 +240,6 @@
$topic_templates->set_var ('archive_disabled', 'disabled');
}
}
- $topic_templates->set_var('oldid', 'oldID');
if (empty($tid)) {
$num_stories = $LANG_ADMIN['na'];
@@ -342,7 +341,21 @@
}
}
- DB_query("DELETE FROM {$_TABLES['topics']} WHERE tid = '{$_POST['oldID']}'");
+ if (isset($_POST['old_tid'])) {
+ $old_tid = COM_applyFilter($_POST['old_tid']);
+ if (! empty($old_tid)) {
+ $old_tid = addslashes($old_tid);
+
+ DB_change($_TABLES['blocks'], 'tid', $tid, 'tid', $old_tid);
+ DB_change($_TABLES['stories'], 'tid', $tid, 'tid', $old_tid);
+ DB_change($_TABLES['storysubmission'], 'tid', $tid,
+ 'tid', $old_tid);
+ DB_change($_TABLES['syndication'], 'header_tid', $tid,
+ 'header_tid', $old_tid);
+ DB_delete($_TABLES['topics'], 'tid', $old_tid);
+ }
+ }
+
DB_save($_TABLES['topics'],'tid, topic, 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', '$imageurl', '$meta_description', '$meta_keywords','$sortnum','$limitnews',$is_default,'$is_archive',$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,$perm_anon");
// update feed(s) and Older Stories block
@@ -642,10 +655,13 @@
if (isset($_POST['is_archive'])) {
$is_archive = $_POST['is_archive'];
}
+ $sortnum = 0;
+ if (isset($_POST['sortnum'])) {
+ $sortnum = COM_applyFilter($_POST['sortnum'], true);
+ }
$display .= savetopic(COM_applyFilter($_POST['tid']), $_POST['topic'],
$imageurl, $_POST['meta_description'],
- $_POST['meta_keywords'],
- COM_applyFilter($_POST['sortnum'], true),
+ $_POST['meta_keywords'], $sortnum,
COM_applyFilter($_POST['limitnews'], true),
COM_applyFilter($_POST['owner_id'], true),
COM_applyFilter($_POST['group_id'], true),
diff -r ce94a8b05250 -r c7e8cc7f7127 public_html/docs/english/theme.html
--- a/public_html/docs/english/theme.html Fri Mar 26 23:01:01 2010 -0400
+++ b/public_html/docs/english/theme.html Sat Mar 27 10:24:49 2010 +0100
@@ -204,6 +204,8 @@
<h2><a name="changes">Theme changes in Geeklog 1.6.2</a></h2>
<ul>
+<li>Added a hidden field "<tt>old_tid</tt>" to the topic editor template file,
+ <tt>admin/topic/topiceditor.thtml</tt>, to allow changing the topic id.</li>
<li>Removed the <code>display:{show_htmleditor};</code> CSS snippet from the
<code><div id="editor-mode"></code> in
<tt>admin/topic/storyeditor_advanced.thtml</tt> to ensure that the list of
diff -r ce94a8b05250 -r c7e8cc7f7127 public_html/docs/history
--- a/public_html/docs/history Fri Mar 26 23:01:01 2010 -0400
+++ b/public_html/docs/history Sat Mar 27 10:24:49 2010 +0100
@@ -2,6 +2,9 @@
Apr ??, 2010 (1.6.2)
------------
+
+- Fixed an old bug that would create a new topic when you tried to change the
+ topic ID [Stan]
- A new right called htmlfilter.skip allows user groups to skip any html
filtering on posts (feature request #0000952) [Tom]
- Allow empty database passwords only for local installs (bug #0000923, patch
diff -r ce94a8b05250 -r c7e8cc7f7127 public_html/layout/professional/admin/topic/topiceditor.thtml
--- a/public_html/layout/professional/admin/topic/topiceditor.thtml Fri Mar 26 23:01:01 2010 -0400
+++ b/public_html/layout/professional/admin/topic/topiceditor.thtml Sat Mar 27 10:24:49 2010 +0100
@@ -90,7 +90,7 @@
<input type="submit" value="{lang_cancel}" name="mode"{xhtml}>
{delete_option}
<input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}>
- <input type="hidden" name="{oldid}" value="{topic_id}"{xhtml}>
+ <input type="hidden" name="old_tid" value="{topic_id}"{xhtml}>
</td>
</tr>
</table>
More information about the geeklog-cvs
mailing list