mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
Updated
This commit is contained in:
parent
998ffd9d8a
commit
ab942f84be
3 changed files with 5 additions and 4 deletions
|
@ -183,7 +183,8 @@ define('FEMALE', 2);
|
|||
define('NOGENDER', 0);
|
||||
|
||||
// Poll
|
||||
# 1 - обычный опрос
|
||||
define('POLL_DELETED', 0);
|
||||
define('POLL_STARTED', 1);
|
||||
define('POLL_FINISHED', 2);
|
||||
|
||||
// Group avatars
|
||||
|
|
2
poll.php
2
poll.php
|
@ -111,7 +111,7 @@ switch ($mode) {
|
|||
]);
|
||||
|
||||
// Starting the poll
|
||||
DB()->query("UPDATE " . BB_TOPICS . " SET topic_vote = 1 WHERE topic_id = $topic_id");
|
||||
DB()->query("UPDATE " . BB_TOPICS . " SET topic_vote = " . POLL_STARTED . " WHERE topic_id = $topic_id");
|
||||
bb_die($lang['NEW_POLL_START']);
|
||||
break;
|
||||
case 'poll_finish':
|
||||
|
|
|
@ -79,7 +79,7 @@ class Poll
|
|||
|
||||
DB()->query("REPLACE INTO " . BB_POLL_VOTES . $sql_args);
|
||||
|
||||
DB()->query("UPDATE " . BB_TOPICS . " SET topic_vote = 1 WHERE topic_id = $topic_id");
|
||||
DB()->query("UPDATE " . BB_TOPICS . " SET topic_vote = " . POLL_STARTED . " WHERE topic_id = $topic_id");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -89,7 +89,7 @@ class Poll
|
|||
*/
|
||||
public function delete_poll($topic_id)
|
||||
{
|
||||
DB()->query("UPDATE " . BB_TOPICS . " SET topic_vote = 0 WHERE topic_id = $topic_id");
|
||||
DB()->query("UPDATE " . BB_TOPICS . " SET topic_vote = " . POLL_DELETED . " WHERE topic_id = $topic_id");
|
||||
$this->delete_votes_data($topic_id);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue