diff options
| author | MaZderMind | 2016-12-11 19:56:22 +0100 | 
|---|---|---|
| committer | MaZderMind | 2016-12-11 20:38:12 +0100 | 
| commit | 4e85b423354d8b715d12540fbd2ac79a66de3399 (patch) | |
| tree | 34da4c41c45c80502c00d02f8003a3ecbfde7a4c /command/download.php | |
| parent | 895b7fa70883b60ad7ee15fefed6f908020310b9 (diff) | |
add download-command cli interface & config
Diffstat (limited to '')
| -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(); +	} + +} | 
