[geeklog-cvs] geeklog: Implemented PLG_itemSaved and PLG_itemDeleted for the P...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Jan 25 05:10:38 EST 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f91c2eab2efa
changeset: 6723:f91c2eab2efa
user:      Dirk Haun <dirk at haun-online.de>
date:      Sun Jan 25 10:46:22 2009 +0100
description:
Implemented PLG_itemSaved and PLG_itemDeleted for the Polls plugin

diffstat:

1 file changed, 8 insertions(+)
public_html/admin/plugins/polls/index.php |    8 ++++++++

diffs (25 lines):

diff -r f7a22f228d0c -r f91c2eab2efa public_html/admin/plugins/polls/index.php
--- a/public_html/admin/plugins/polls/index.php	Sun Jan 25 10:40:33 2009 +0100
+++ b/public_html/admin/plugins/polls/index.php	Sun Jan 25 10:46:22 2009 +0100
@@ -293,6 +293,12 @@
            . "is_open, hideresults, statuscode, commentcode, owner_id, group_id, "
            . "perm_owner, perm_group, perm_members, perm_anon",$sql);
 
+    if (empty($old_pid) || ($old_pid == $pid)) {
+        PLG_itemSaved($pid, 'polls');
+    } else {
+        PLG_itemSaved($pid, 'polls', $old_pid);
+    }
+
     if ($_POLL_VERBOSE) {
         COM_errorLog ('**** Leaving savepoll() in '
                       . $_CONF['site_admin_url'] . '/plugins/polls/index.php ***');
@@ -528,6 +534,8 @@
     DB_delete ($_TABLES['pollquestions'], 'pid', $pid);
     DB_query ("DELETE FROM {$_TABLES['comments']} WHERE sid = '$pid' AND type = 'polls'");
 
+    PLG_itemDeleted($pid, 'polls');
+
     return COM_refresh ($_CONF['site_admin_url'] . '/plugins/polls/index.php?msg=20');
 }
 



More information about the geeklog-cvs mailing list