[geeklog-cvs] Geeklog-1.x/plugins/polls functions.inc,1.81,1.82

Dirk Haun dhaun at qs1489.pair.com
Sat Jan 19 09:53:14 EST 2008


Update of /cvsroot/geeklog/Geeklog-1.x/plugins/polls
In directory qs1489.pair.com:/tmp/cvs-serv26290/plugins/polls

Modified Files:
	functions.inc 
Log Message:
A bunch of minor Polls fixes (defaults; handling of closed polls)


Index: functions.inc
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/plugins/polls/functions.inc,v
retrieving revision 1.81
retrieving revision 1.82
diff -C2 -d -r1.81 -r1.82
*** functions.inc	29 Dec 2007 20:03:09 -0000	1.81
--- functions.inc	19 Jan 2008 14:53:12 -0000	1.82
***************
*** 11,15 ****
  // | plugin' PHP files.                                                        |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2007 by the following authors:                         |
  // |                                                                           |
  // | Authors: Tony Bibbs       - tony AT tonybibbs DOT com                     |
--- 11,15 ----
  // | plugin' PHP files.                                                        |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2008 by the following authors:                         |
  // |                                                                           |
  // | Authors: Tony Bibbs       - tony AT tonybibbs DOT com                     |
***************
*** 741,750 ****
  
      if ((
!             $P['hideresults'] == 1
          ) || (
!             ($P['hideresults'] == 0) && (isset($_USER['uid']) &&
                                           ($_USER['uid'] == $P['owner_id']))
          ) || (
!             ($P['hideresults'] == 0) && (SEC_inGroup('Root'))
          )
      ) {
--- 741,750 ----
  
      if ((
!             $P['hideresults'] == 0
          ) || (
!             ($P['hideresults'] == 1) && (isset($_USER['uid']) &&
                                           ($_USER['uid'] == $P['owner_id']))
          ) || (
!             ($P['hideresults'] == 1) && (SEC_inGroup('Root'))
          )
      ) {
***************
*** 1003,1012 ****
                  break;
              case 'topic':
!                 if (($A['open'] == 0) || (
!                         ($A['hideresults'] == 1) && ($_USER['uid'] == $A['owner_id'])
!                     ) || (
!                         ($A['hideresults'] == 1) && (SEC_inGroup('Root'))
!                     )
!                 ) {
                      $retval = COM_createLink($fieldvalue,
                          "{$_CONF['site_url']}/polls/index.php?pid={$A['pid']}");
--- 1003,1008 ----
                  break;
              case 'topic':
!                 if (($A['hideresults'] == 0) ||
!                     (isset($_USER['uid']) && ($_USER['uid'] == $A['owner_id'])) || SEC_inGroup('Root')) {
                      $retval = COM_createLink($fieldvalue,
                          "{$_CONF['site_url']}/polls/index.php?pid={$A['pid']}");
***************
*** 1110,1115 ****
          $_SQL[] = "ALTER TABLE `{$_TABLES['polltopics']}` CHANGE `qid` `pid` VARCHAR( 20 ) NOT NULL";
          $_SQL[] = "ALTER TABLE `{$_TABLES['polltopics']}` ADD questions int(11) NOT NULL AFTER voters";
!         $_SQL[] = "ALTER TABLE `{$_TABLES['polltopics']}` ADD open tinyint(4) NOT NULL AFTER display";
!         $_SQL[] = "ALTER TABLE `{$_TABLES['polltopics']}` ADD hideresults tinyint(1) NOT NULL AFTER open";
          $_SQL[] = "ALTER TABLE `{$_TABLES['pollanswers']}` CHANGE `qid` `pid` VARCHAR( 20 ) NOT NULL";
          $_SQL[] = "ALTER TABLE `{$_TABLES['pollanswers']}` ADD `qid` VARCHAR( 20 ) NOT NULL DEFAULT '0' AFTER `pid`;";
--- 1106,1111 ----
          $_SQL[] = "ALTER TABLE `{$_TABLES['polltopics']}` CHANGE `qid` `pid` VARCHAR( 20 ) NOT NULL";
          $_SQL[] = "ALTER TABLE `{$_TABLES['polltopics']}` ADD questions int(11) NOT NULL AFTER voters";
!         $_SQL[] = "ALTER TABLE `{$_TABLES['polltopics']}` ADD open tinyint(1) NOT NULL default '1' AFTER display";
!         $_SQL[] = "ALTER TABLE `{$_TABLES['polltopics']}` ADD hideresults tinyint(1) NOT NULL default '0' AFTER open";
          $_SQL[] = "ALTER TABLE `{$_TABLES['pollanswers']}` CHANGE `qid` `pid` VARCHAR( 20 ) NOT NULL";
          $_SQL[] = "ALTER TABLE `{$_TABLES['pollanswers']}` ADD `qid` VARCHAR( 20 ) NOT NULL DEFAULT '0' AFTER `pid`;";




More information about the geeklog-cvs mailing list