diff options
author | MaZderMind | 2016-12-18 10:37:58 +0100 |
---|---|---|
committer | MaZderMind | 2016-12-18 10:37:58 +0100 |
commit | 23c70f3042251675796ebff7f3568005a335fa73 (patch) | |
tree | 547688e0ef964adb2eb28e1419e62f796f28ddd6 /index.php | |
parent | 738878b8b060b3cfcdde2d88a1a28d5ce83e4aa7 (diff) | |
parent | da739f3b60a30d5dd5c7877742f8b5c292f25f46 (diff) |
Merge branch 'feature/20-declarative-downloading'
fixes #20
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -1,7 +1,10 @@ <?php if(!ini_get('short_open_tag')) - die('`short_open_tag = On` is required'); + die("`short_open_tag = On` is required\n"); + +$GLOBALS['BASEDIR'] = dirname(__FILE__); +chdir($GLOBALS['BASEDIR']); require_once('config.php'); require_once('lib/helper.php'); @@ -27,6 +30,22 @@ require_once('model/Upcoming.php'); ob_start(); +if(isset($argv) && isset($argv[1])) +{ + require('lib/command-helper.php'); + + switch($argv[1]) + { + case 'download': + require('command/download.php'); + exit(0); + } + + stderr("Unknown Command: %s", $argv[1]); + exit(1); +} + + try { if(isset($_GET['htaccess'])) { |