aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Contact.php13
-rw-r--r--include/cli_startup.php6
-rw-r--r--include/config.php2
-rw-r--r--include/nav.php7
-rw-r--r--include/permissions.php5
5 files changed, 31 insertions, 2 deletions
diff --git a/include/Contact.php b/include/Contact.php
index 8d50b1e5b..4440369dc 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -328,6 +328,19 @@ function mark_orphan_hubsxchans() {
intval(HUBLOC_OFFLINE)
);
+// $realm = get_directory_realm();
+// if($realm == DIRECTORY_REALM) {
+// $r = q("select * from site where site_access != 0 and site_register !=0 and ( site_realm = '%s' or site_realm = '') order by rand()",
+// dbesc($realm)
+// );
+// }
+// else {
+// $r = q("select * from site where site_access != 0 and site_register !=0 and site_realm = '%s' order by rand()",
+// dbesc($realm)
+// );
+// }
+
+
$r = q("select hubloc_id, hubloc_hash from hubloc where (hubloc_status & %d) and not (hubloc_flags & %d)",
intval(HUBLOC_OFFLINE),
intval(HUBLOC_FLAGS_ORPHANCHECK)
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/config.php b/include/config.php
index a77801717..3292059d1 100644
--- a/include/config.php
+++ b/include/config.php
@@ -248,7 +248,7 @@ function load_pconfig($uid) {
* @return mixed Stored value or false if it does not exist
*/
function get_pconfig($uid, $family, $key, $instore = false) {
- logger('include/config.php: get_pconfig() deprecated instore param used', LOGGER_DEBUG);
+// logger('include/config.php: get_pconfig() deprecated instore param used', LOGGER_DEBUG);
global $a;
if($uid === false)
diff --git a/include/nav.php b/include/nav.php
index 98d1b644e..c35466412 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -239,6 +239,12 @@ EOT;
$x = array('nav' => $nav, 'usermenu' => $userinfo );
call_hooks('nav', $x);
+// Not sure the best place to put this on the page. So I'm implementing it but leaving it
+// turned off until somebody discovers this and figures out a good location for it.
+$powered_by = '';
+
+// $powered_by = '<strong>red<img class="smiley" src="' . $a->get_baseurl() . '/images/rm-16.png" alt="r#" />matrix</strong>';
+
$tpl = get_markup_template('nav.tpl');
$a->page['nav'] .= replace_macros($tpl, array(
@@ -250,6 +256,7 @@ EOT;
'$userinfo' => $x['usermenu'],
'$localuser' => local_user(),
'$sel' => $a->nav_sel,
+ '$powered_by' => $powered_by,
'$pleasewait' => t('Please wait...')
));
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;