[geeklog-cvs] geeklog: Update static pages comments when changing a page's ID ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Jun 6 08:48:00 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c68579cefb03
changeset: 7083:c68579cefb03
user:      Dirk Haun <dirk at haun-online.de>
date:      Sat Jun 06 14:43:42 2009 +0200
description:
Update static pages comments when changing a page's ID so the comments don't become orphaned (part of bug #0000901)

diffstat:

 plugins/staticpages/services.inc.php |  3 +++
 public_html/docs/history             |  4 +++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diffs (31 lines):

diff -r 3f282a65afc2 -r c68579cefb03 plugins/staticpages/services.inc.php
--- a/plugins/staticpages/services.inc.php	Sat Jun 06 14:34:21 2009 +0200
+++ b/plugins/staticpages/services.inc.php	Sat Jun 06 14:43:42 2009 +0200
@@ -409,6 +409,9 @@
         if (empty($sp_old_id) || ($sp_id == $sp_old_id)) {
             PLG_itemSaved($sp_id, 'staticpages');
         } else {
+            DB_change($_TABLES['comments'], 'sid', addslashes($sp_id),
+                      array('sid', 'type'),
+                      array(addslashes($sp_old_id), 'staticpages'));
             PLG_itemSaved($sp_id, 'staticpages', $sp_old_id);
         }
 
diff -r 3f282a65afc2 -r c68579cefb03 public_html/docs/history
--- a/public_html/docs/history	Sat Jun 06 14:34:21 2009 +0200
+++ b/public_html/docs/history	Sat Jun 06 14:43:42 2009 +0200
@@ -16,11 +16,13 @@
 
 Polls plugin
 ------------
-- Update polls comments when changing a poll's ID so the comments don't get
+- Update polls comments when changing a poll's ID so the comments don't become
   orphaned (part of bug #0000901) [Dirk]
 
 Static Pages plugin
 -------------------
+- Update static pages comments when changing a page's ID so the comments don't
+  become orphaned (part of bug #0000901) [Dirk]
 - When deleting a static page, also delete its comments (bug #0000901) [Dirk]
 
 



More information about the geeklog-cvs mailing list