diff options
Diffstat (limited to 'command/download.php')
-rw-r--r-- | command/download.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/command/download.php b/command/download.php new file mode 100644 index 0000000..8cc2f53 --- /dev/null +++ b/command/download.php @@ -0,0 +1,28 @@ +<?php + +$conf = $GLOBALS['CONFIG']['DOWNLOAD']; + +if(isset($conf['REQUIRE_USER'])) +{ + if(get_current_user() != $conf['require-user']) + { + stderr( + 'Not downloading files for user %s, run this script as user %s', + get_current_user(), + $conf['require-user'] + ); + exit(2); + } +} + +foreach (Conferences::getConferences() as $conference) +{ + stdout('== %s ==', $conference->getSlug()); + + if(isset($conf['MAX_CONFERENCE_AGE'])) + { + date_diff() + return time() >= $this->endsAt(); + } + +} |