closing votes now controlled by crontab (user www-data) to close daily on the new day. Votes are due in the last minute of previous day

git-svn-id: http://svn.cacert.cl/Software/Voting/vote@65 d4452222-2f33-11de-9270-010000000000
reality
community.cacert.org 15 years ago
parent 5e71e18a53
commit 48139ccfef

@ -9,7 +9,7 @@ php_value open_basedir /var/www/board
php_value safe_mode_exec_dir /var/empty
</IfModule>
<FilesMatch "^(database.*|remind.php)$">
<FilesMatch "^(database.*|remind.php|closevotes.php.*)$">
Order Deny,Allow
Deny from all
</FilesMatch>

@ -0,0 +1,8 @@
#!/usr/bin/php
<?
require_once("database.php");
$db = new DB();
$db->closeVotes();
?>

@ -0,0 +1,2 @@
# echo "select strftime('%H:%M %m%d%Y',due) from decisions where status=0;" | sqlite3 database.sqlite | xargs -n1 -I^ sudo -u www-data at -f closevotes.php-script ^ +1minute
/var/www/board/closevotes.php

@ -1,7 +1,6 @@
<?php
require_once("database.php");
$db = new DB();
$db->closeVotes();
$page = is_numeric($_REQUEST['page'])?$_REQUEST['page']:1;
$user = $db->auth();

@ -3,8 +3,6 @@
require_once("database.php");
$db = new DB();
$db->closeVotes();
$id = 0;
$page = 1;

Loading…
Cancel
Save