[geeklog-cvs] Geeklog-1.x/plugins/polls functions.inc,1.86,1.87
Matthew West
mwest at qs1489.pair.com
Tue May 13 14:53:24 EDT 2008
Update of /cvsroot/geeklog/Geeklog-1.x/plugins/polls
In directory qs1489.pair.com:/tmp/cvs-serv70688
Modified Files:
functions.inc
Log Message:
The polltopics column name 'open' is a reserved keyword in SQL Server, changed to 'is_open'
Index: functions.inc
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/plugins/polls/functions.inc,v
retrieving revision 1.86
retrieving revision 1.87
diff -C2 -d -r1.86 -r1.87
*** functions.inc 17 Mar 2008 21:12:54 -0000 1.86
--- functions.inc 13 May 2008 18:53:22 -0000 1.87
***************
*** 470,474 ****
$retval = '';
! $topic = DB_query("SELECT topic,voters,commentcode,open,hideresults,owner_id "
. ",group_id,perm_owner,perm_group,perm_anon,perm_members "
. "FROM {$_TABLES['polltopics']} WHERE pid='$pid'" . COM_getPermSql('AND'));
--- 470,474 ----
$retval = '';
! $topic = DB_query("SELECT topic,voters,commentcode,is_open,hideresults,owner_id "
. ",group_id,perm_owner,perm_group,perm_anon,perm_members "
. "FROM {$_TABLES['polltopics']} WHERE pid='$pid'" . COM_getPermSql('AND'));
***************
*** 479,483 ****
}
$P = DB_fetchArray($topic);
! if ((!isset($_COOKIE[$pid]) && !POLLS_ipAlreadyVoted($pid)) or ($P['open'] == 1)) {
if ($ntopics == 1) {
$questions_sql = "SELECT question,qid "
--- 479,483 ----
}
$P = DB_fetchArray($topic);
! if ((!isset($_COOKIE[$pid]) && !POLLS_ipAlreadyVoted($pid)) or ($P['is_open'] == 1)) {
if ($ntopics == 1) {
$questions_sql = "SELECT question,qid "
***************
*** 507,511 ****
$results = "";
! if (($P['open'] == 0) || (
($P['hideresults'] == 1) && (isset($_USER['uid']) && $_USER['uid'] == $P['owner_id'])
) || (
--- 507,511 ----
$results = "";
! if (($P['is_open'] == 0) || (
($P['hideresults'] == 1) && (isset($_USER['uid']) && $_USER['uid'] == $P['owner_id'])
) || (
***************
*** 638,642 ****
if(!empty($pid)) {
! if(!isset($_COOKIE["poll-".$pid]) && !POLLS_ipAlreadyVoted($pid) && ($Q['open'] == 1)) {
$retval .= POLLS_pollVote($pid);
} else {
--- 638,642 ----
if(!empty($pid)) {
! if(!isset($_COOKIE["poll-".$pid]) && !POLLS_ipAlreadyVoted($pid) && ($Q['is_open'] == 1)) {
$retval .= POLLS_pollVote($pid);
} else {
***************
*** 644,648 ****
}
} else {
! $result = DB_query("SELECT pid,topic,open from {$_TABLES['polltopics']} WHERE display = 1 ORDER BY date DESC");
$nrows = DB_numRows($result );
--- 644,648 ----
}
} else {
! $result = DB_query("SELECT pid,topic,is_open from {$_TABLES['polltopics']} WHERE display = 1 ORDER BY date DESC");
$nrows = DB_numRows($result );
***************
*** 660,664 ****
}
! if (!isset($_COOKIE["poll-".$pid]) && !POLLS_ipAlreadyVoted($pid) && ($Q['open'] == 1)) {
$retval .= POLLS_pollVote($pid, $showall);
} else {
--- 660,664 ----
}
! if (!isset($_COOKIE["poll-".$pid]) && !POLLS_ipAlreadyVoted($pid) && ($Q['is_open'] == 1)) {
$retval .= POLLS_pollVote($pid, $showall);
} else {
***************
*** 748,752 ****
$retval = '';
! $topic_sql = "SELECT topic,voters,open,hideresults,commentcode,owner_id,group_id,"
. "perm_owner,perm_group,perm_members,perm_anon "
. "FROM {$_TABLES['polltopics']} WHERE pid='$pid'";
--- 748,752 ----
$retval = '';
! $topic_sql = "SELECT topic,voters,is_open,hideresults,commentcode,owner_id,group_id,"
. "perm_owner,perm_group,perm_members,perm_anon "
. "FROM {$_TABLES['polltopics']} WHERE pid='$pid'";
***************
*** 1039,1044 ****
$retval = $access;
break;
! case 'open':
! if ($A['open'] == 1) {
$retval = $LANG25[25];
} else {
--- 1039,1044 ----
$retval = $access;
break;
! case 'is_open':
! if ($A['is_open'] == 1) {
$retval = $LANG25[25];
} else {
More information about the geeklog-cvs
mailing list