closing votes now controlled by crontab (user www-data) to close daily on the new...
authorcommunity.cacert.org <community.cacert.org@d4452222-2f33-11de-9270-010000000000>
Sun, 12 Jul 2009 02:08:45 +0000 (02:08 +0000)
committercommunity.cacert.org <community.cacert.org@d4452222-2f33-11de-9270-010000000000>
Sun, 12 Jul 2009 02:08:45 +0000 (02:08 +0000)
git-svn-id: http://svn.cacert.cl/Software/Voting/vote@65 d4452222-2f33-11de-9270-010000000000

.htaccess
closevotes.php [new file with mode: 0755]
closevotes.php-script [new file with mode: 0644]
motions.php
remind.php

index 02170ca..403e132 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -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>
diff --git a/closevotes.php b/closevotes.php
new file mode 100755 (executable)
index 0000000..ca95905
--- /dev/null
@@ -0,0 +1,8 @@
+#!/usr/bin/php
+<?
+require_once("database.php");
+$db = new DB();
+
+$db->closeVotes();
+
+?>
diff --git a/closevotes.php-script b/closevotes.php-script
new file mode 100644 (file)
index 0000000..5246205
--- /dev/null
@@ -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
index a087c9e..0a35cb3 100644 (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();
 
index 635c2c7..b3ce74c 100755 (executable)
@@ -3,8 +3,6 @@
 require_once("database.php");
 $db = new DB();
 
-$db->closeVotes();
-
 $id = 0;
 $page = 1;