diff --git a/.htaccess b/.htaccess index 02170ca..403e132 100644 --- a/.htaccess +++ b/.htaccess @@ -9,7 +9,7 @@ php_value open_basedir /var/www/board php_value safe_mode_exec_dir /var/empty - + Order Deny,Allow Deny from all diff --git a/closevotes.php b/closevotes.php new file mode 100755 index 0000000..ca95905 --- /dev/null +++ b/closevotes.php @@ -0,0 +1,8 @@ +#!/usr/bin/php +closeVotes(); + +?> diff --git a/closevotes.php-script b/closevotes.php-script new file mode 100644 index 0000000..5246205 --- /dev/null +++ b/closevotes.php-script @@ -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 diff --git a/motions.php b/motions.php index a087c9e..0a35cb3 100644 --- a/motions.php +++ b/motions.php @@ -1,7 +1,6 @@ closeVotes(); $page = is_numeric($_REQUEST['page'])?$_REQUEST['page']:1; $user = $db->auth(); diff --git a/remind.php b/remind.php index 635c2c7..b3ce74c 100755 --- a/remind.php +++ b/remind.php @@ -3,8 +3,6 @@ require_once("database.php"); $db = new DB(); -$db->closeVotes(); - $id = 0; $page = 1;