Unverified Commit 5a0dc5e2 authored by Lester Chan's avatar Lester Chan
Browse files

Check against pollq_expiry != 0 rather than != ''

parent 10d9a3cc
......@@ -1288,7 +1288,7 @@ add_action('polls_cron', 'cron_polls_status');
function cron_polls_status() {
global $wpdb;
// Close Poll
$close_polls = $wpdb->query("UPDATE $wpdb->pollsq SET pollq_active = 0 WHERE pollq_expiry < '".current_time('timestamp')."' AND pollq_expiry != '' AND pollq_active != 0");
$close_polls = $wpdb->query("UPDATE $wpdb->pollsq SET pollq_active = 0 WHERE pollq_expiry < '".current_time('timestamp')."' AND pollq_expiry != 0 AND pollq_active != 0");
// Open Future Polls
$active_polls = $wpdb->query("UPDATE $wpdb->pollsq SET pollq_active = 1 WHERE pollq_timestamp <= '".current_time('timestamp')."' AND pollq_active = -1");
// Update Latest Poll If Future Poll Is Opened
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment