[geeklog-cvs] geeklog: Fixed comment bar Refresh button for the Polls plugin (...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Dec 5 13:47:29 EST 2009


changeset 7514:45420e4a6c33
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/45420e4a6c33
user: Dirk Haun <dirk at haun-online.de>
date: Sat Dec 05 16:52:21 2009 +0100
description:
Fixed comment bar Refresh button for the Polls plugin (bug #0001044)

diffstat:

 plugins/polls/functions.inc |   4 +---
 public_html/docs/history    |   1 +
 public_html/polls/index.php |  12 +++++-------
 3 files changed, 7 insertions(+), 10 deletions(-)

diffs (80 lines):

diff -r 4193a3edc509 -r 45420e4a6c33 plugins/polls/functions.inc
--- a/plugins/polls/functions.inc	Sat Dec 05 16:32:55 2009 +0100
+++ b/plugins/polls/functions.inc	Sat Dec 05 16:52:21 2009 +0100
@@ -457,7 +457,7 @@
 *
 */
 
-function POLLS_pollVote($pid, $showall = true, $displaytype = 0)
+function POLLS_pollVote($pid, $showall = true, $displaytype = 0, $order = '', $mode = '')
 {
     global $_CONF, $_TABLES, $LANG_POLLS, $LANG01, $_USER, $LANG25, $_IMAGE_TYPE;
     $retval = '';
@@ -606,8 +606,6 @@
 
                     require_once $_CONF['path_system'] . 'lib-comment.php';
 
-                    $order = '';
-                    $mode  = '';
                     $retval .= CMT_userComments($pid, $P['topic'], 'polls',
                                                 $order, $mode, 0, 1, false,
                                                 $delete_option, $P['commentcode']);
diff -r 4193a3edc509 -r 45420e4a6c33 public_html/docs/history
--- a/public_html/docs/history	Sat Dec 05 16:32:55 2009 +0100
+++ b/public_html/docs/history	Sat Dec 05 16:52:21 2009 +0100
@@ -16,6 +16,7 @@
 
 Polls Plugin
 ------------
+- Fixed comment bar Refresh button (bug #0001044) [Dirk]
 - Hide meta tag entry fields from Polls editor when meta tag support is
   disabled [Dirk]
 
diff -r 4193a3edc509 -r 45420e4a6c33 public_html/polls/index.php
--- a/public_html/polls/index.php	Sat Dec 05 16:32:55 2009 +0100
+++ b/public_html/polls/index.php	Sat Dec 05 16:52:21 2009 +0100
@@ -125,7 +125,7 @@
     echo $display;
     exit;
 }
-
+//var_dump($_POST);die();
 $pid = 0;
 $aid = 0;
 if (isset ($_REQUEST['pid'])) {
@@ -135,8 +135,6 @@
     } else if (isset ($_POST['aid'])) {
         $aid = $_POST['aid'];
     }
-} elseif (isset($_POST['id'])) {       // Refresh from comment tool bar
-    $qid = COM_applyFilter ($_POST['id']);
 }
 $order = '';
 if (isset ($_REQUEST['order'])) {
@@ -180,12 +178,12 @@
     } else {
         // Meta Tags
         $headercode = '';
-        If ($_PO_CONF['meta_tags'] > 0) {
+        if ($_PO_CONF['meta_tags'] > 0) {
             $meta_description = stripslashes($A['meta_description']);
             $meta_keywords = stripslashes($A['meta_keywords']);            
             $headercode = COM_createMetaTags($meta_description, $meta_keywords);
         }
-        
+
         $display .= COM_siteHeader('menu', $topic, $headercode);
         if ($msg > 0) {
             $display .= COM_showMessage($msg, 'polls');
@@ -204,9 +202,9 @@
             && !POLLS_ipAlreadyVoted ($pid)
             && $aid != -1
             ) {
-            $display .= POLLS_pollVote ($pid);
+            $display .= POLLS_pollVote($pid, true, 0, $order, $mode);
         } else {
-            $display .= POLLS_pollResults ($pid, 400, $order, $mode);
+            $display .= POLLS_pollResults($pid, 400, $order, $mode);
         }
     }
 } else {



More information about the geeklog-cvs mailing list