summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-04-01 18:29:10 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-04-01 18:29:28 -0400
commit890a1e1339001a82a78f766a1d13103271aadd09 (patch)
treec6cb73314c900214f06e2bcd7101562d1b398a4f
parent5067939e9abaa7451faa26a7246460214aafb320 (diff)
add sup with arguments
-rw-r--r--actions/sup.php2
-rw-r--r--lib/router.php3
2 files changed, 4 insertions, 1 deletions
diff --git a/actions/sup.php b/actions/sup.php
index 8ef9207fa..246b3299d 100644
--- a/actions/sup.php
+++ b/actions/sup.php
@@ -45,7 +45,7 @@ class SupAction extends Action
function availablePeriods()
{
static $periods = array(86400, 43200, 21600, 7200,
- 3600, 1800, 600, 300, 120,
+ 3600, 1800, 600, 300, 120,
60, 30, 15);
$available = array();
foreach ($periods as $period) {
diff --git a/lib/router.php b/lib/router.php
index 77794aaf7..3c61837f8 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -107,6 +107,9 @@ class Router
$m->connect('main/'.$a, array('action' => $a));
}
+ $m->connect('main/sup/:seconds', array('action' => 'sup'),
+ array('seconds' => '[0-9]+'));
+
$m->connect('main/tagother/:id', array('action' => 'tagother'));
// these take a code