diff options
author | tuscanhobbit <tuscanhobbit@users.noreply.github.com> | 2014-10-01 19:26:21 +0200 |
---|---|---|
committer | tuscanhobbit <tuscanhobbit@users.noreply.github.com> | 2014-10-01 19:26:21 +0200 |
commit | 9cce852ac71fcd12970e985f1f61697333849172 (patch) | |
tree | c40ce5543c412035ca03188f7bd9e565efb62117 /include | |
parent | a548f644d05f330a2b70c87df821bce05007c979 (diff) | |
parent | f19d718631675d38efca1741f46bf0916af72a65 (diff) | |
download | volse-hubzilla-9cce852ac71fcd12970e985f1f61697333849172.tar.gz volse-hubzilla-9cce852ac71fcd12970e985f1f61697333849172.tar.bz2 volse-hubzilla-9cce852ac71fcd12970e985f1f61697333849172.zip |
Merge from upstream
Diffstat (limited to 'include')
-rw-r--r-- | include/Contact.php | 13 | ||||
-rw-r--r-- | include/cli_startup.php | 6 | ||||
-rw-r--r-- | include/config.php | 2 | ||||
-rw-r--r-- | include/conversation.php | 6 | ||||
-rw-r--r-- | include/hubloc.php | 6 | ||||
-rw-r--r-- | include/identity.php | 2 | ||||
-rw-r--r-- | include/nav.php | 7 | ||||
-rw-r--r-- | include/permissions.php | 5 | ||||
-rwxr-xr-x | include/plugin.php | 1 |
9 files changed, 40 insertions, 8 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/conversation.php b/include/conversation.php index b0a388a68..92ba18d13 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1341,8 +1341,10 @@ function prepare_page($item) { // the template will get passed an unobscured title. $body = prepare_body($item,true); - - return replace_macros(get_markup_template('page_display.tpl'),array( + $tpl = get_pconfig($item['uid'],'system','pagetemplate'); + if (! $tpl) + $tpl = 'page_display.tpl'; + return replace_macros(get_markup_template($tpl),array( '$author' => (($naked) ? '' : $item['author']['xchan_name']), '$auth_url' => (($naked) ? '' : zid($item['author']['xchan_url'])), '$date' => (($naked) ? '' : datetime_convert('UTC',date_default_timezone_get(),$item['created'],'Y-m-d H:i')), diff --git a/include/hubloc.php b/include/hubloc.php index cdc9de4af..fded434d2 100644 --- a/include/hubloc.php +++ b/include/hubloc.php @@ -105,9 +105,9 @@ function remove_obsolete_hublocs() { dbesc($rr['hubloc_hash']) ); if($x) { -// proc_run('php','include/notifier.php','location',$x[0]['channel_id']); -// if($interval) -// @time_sleep_until(microtime(true) + (float) $interval); + proc_run('php','include/notifier.php','location',$x[0]['channel_id']); + if($interval) + @time_sleep_until(microtime(true) + (float) $interval); } } } diff --git a/include/identity.php b/include/identity.php index d26eced2c..bfdd02682 100644 --- a/include/identity.php +++ b/include/identity.php @@ -364,7 +364,7 @@ function create_identity($arr) { if($role_permissions) { set_pconfig($newuid,'system','permissions_role',$arr['permissions_role']); if(array_key_exists('online',$role_permissions)) - set_pconfig('system','hide_presence',1-intval($role_permissions['online'])); + set_pconfig($newuid,'system','hide_presence',1-intval($role_permissions['online'])); } // Create a group with yourself as a member. This allows somebody to use it 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; diff --git a/include/plugin.php b/include/plugin.php index c2e08a989..4f9ab71da 100755 --- a/include/plugin.php +++ b/include/plugin.php @@ -552,6 +552,7 @@ function theme_include($file, $root = '') { $paths = array( "{$root}view/theme/$theme/$ext/$file", "{$root}view/theme/$parent/$ext/$file", + "{$root}view/site/$ext/$file", "{$root}view/$ext/$file", ); |