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
This commit is contained in:
community.cacert.org 2009-07-12 02:08:45 +00:00
parent 5e71e18a53
commit 48139ccfef
5 changed files with 11 additions and 4 deletions

View file

@ -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>

8
closevotes.php Executable file
View file

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

2
closevotes.php-script Normal file
View file

@ -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

View file

@ -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();

View file

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