aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/cli_startup.php6
-rw-r--r--include/permissions.php5
2 files changed, 10 insertions, 1 deletions
diff --git a/include/cli_startup.php b/include/cli_startup.php
index 6bd4e7520..f90a75cd1 100644
--- a/include/cli_startup.php
+++ b/include/cli_startup.php
@@ -6,7 +6,7 @@ require_once('boot.php');
function cli_startup() {
- global $a, $db;
+ global $a, $db, $default_timezone;
if(is_null($a)) {
$a = new App;
@@ -14,6 +14,10 @@ function cli_startup() {
if(is_null($db)) {
@include(".htconfig.php");
+
+ $a->timezone = ((x($default_timezone)) ? $default_timezone : 'UTC');
+ date_default_timezone_set($a->timezone);
+
require_once('include/dba/dba_driver.php');
$db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data);
unset($db_host, $db_port, $db_user, $db_pass, $db_data);
diff --git a/include/permissions.php b/include/permissions.php
index 438b807d0..61ac8aea3 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -722,6 +722,11 @@ function get_role_perms($role) {
}
+ $x = get_config('system','role_perms');
+ // let system settings over-ride any or all
+ if($x && is_array($x) && array_key_exists($role,$x))
+ $ret = array_merge($ret,$x[$role]);
+
call_hooks('get_role_perms',$ret);
return $ret;