OSB enhancements to date

This commit is contained in:
Deon George
2010-11-30 09:41:08 +11:00
parent 8715a2059b
commit ec6a542bc3
478 changed files with 23423 additions and 9309 deletions

View File

@@ -25,16 +25,25 @@
* The main AgileBill Index Page
*/
date_default_timezone_set('Australia/Melbourne');
ob_start();
# Check if we are task, and if so, override our default id
$runTasks = false;
if (isset($_SERVER['argv']) && is_array($_SERVER['argv']))
if (isset($_SERVER['argv']) && is_array($_SERVER['argv'])) {
# Pre-set our SERVER_NAME
if (! isset($_SERVER['SERVER_NAME']))
$_SERVER['SERVER_NAME'] = isset($_SERVER['HOSTNAME']) ? $_SERVER['HOSTNAME'] : trim(shell_exec('hostname'));
foreach ($_SERVER['argv'] as $key => $values)
if ($values == '_task=1')
$runTasks = true;
elseif (preg_match('/^site=/',$values))
$_SERVER['SERVER_NAME'] = preg_replace('/^site=(.*)$/',"$1",$values);
elseif (preg_match('/^debug=/',$values))
$hardcode['debug'] = preg_replace('/^debug=(.*)$/',"$1",$values);
}
require_once('config.inc.php');
require_once('modules/module.inc.php');
@@ -88,7 +97,7 @@ $smarty = new Smarty;
$C_list = new CORE_list;
$C_block = new CORE_block;
# See if we are being called to pust do task activities
# See if we are being called to do task activities
if ($runTasks) {
require_once(PATH_MODULES.'task/task.inc.php');
$task = new task;