mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -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);
|
define('NOGENDER', 0);
|
||||||
|
|
||||||
// Poll
|
// Poll
|
||||||
# 1 - обычный опрос
|
define('POLL_DELETED', 0);
|
||||||
|
define('POLL_STARTED', 1);
|
||||||
define('POLL_FINISHED', 2);
|
define('POLL_FINISHED', 2);
|
||||||
|
|
||||||
// Group avatars
|
// Group avatars
|
||||||
|
|
2
poll.php
2
poll.php
|
@ -111,7 +111,7 @@ switch ($mode) {
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Starting the poll
|
// 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']);
|
bb_die($lang['NEW_POLL_START']);
|
||||||
break;
|
break;
|
||||||
case 'poll_finish':
|
case 'poll_finish':
|
||||||
|
|
|
@ -79,7 +79,7 @@ class Poll
|
||||||
|
|
||||||
DB()->query("REPLACE INTO " . BB_POLL_VOTES . $sql_args);
|
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)
|
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);
|
$this->delete_votes_data($topic_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue