aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xboot.php6
-rw-r--r--include/Contact.php13
-rw-r--r--include/cli_startup.php6
-rw-r--r--include/nav.php7
-rw-r--r--include/permissions.php5
-rwxr-xr-xindex.php4
-rw-r--r--version.inc2
-rw-r--r--view/js/main.js1
-rw-r--r--view/theme/redbasic/css/style.css13
-rwxr-xr-xview/tpl/nav.tpl3
10 files changed, 54 insertions, 6 deletions
diff --git a/boot.php b/boot.php
index dc94f202e..563ed0fe1 100755
--- a/boot.php
+++ b/boot.php
@@ -716,10 +716,8 @@ class App {
function __construct() {
- global $default_timezone;
- $this->timezone = ((x($default_timezone)) ? $default_timezone : 'UTC');
-
- date_default_timezone_set($this->timezone);
+ // we'll reset this after we read our config file
+ date_default_timezone_set('UTC');
$this->config = array('system'=>array());
$this->page = array();
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/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/index.php b/index.php
index 5a9ec1026..6c18cbcb8 100755
--- a/index.php
+++ b/index.php
@@ -27,6 +27,10 @@ $a->install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? fal
@include(".htconfig.php");
+$a->timezone = ((x($default_timezone)) ? $default_timezone : 'UTC');
+date_default_timezone_set($a->timezone);
+
+
/**
*
* Try to open the database;
diff --git a/version.inc b/version.inc
index 0947c89cf..39675f71c 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2014-09-27.811
+2014-09-29.813
diff --git a/view/js/main.js b/view/js/main.js
index f3b252171..7d036076c 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1069,6 +1069,7 @@ function previewTheme(elm) {
}
$(document).ready(function() {
+
jQuery.timeago.settings.strings = {
prefixAgo : aStr['t01'],
prefixFromNow : aStr['t02'],
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 1d43fe983..9bbf996d5 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -166,6 +166,19 @@ header {
filter:alpha(opacity=$nav_percent_min_opacity);
}
+#powered-by {
+ font-size: 0.5rem;
+ position: absolute;
+ top: 50px;
+ left: 16px;
+}
+
+#powered-by img {
+ margin-top: -2px;
+ height: 10px;
+ width: 10px;
+}
+
.error-message {
color: #FF0000;
font-size: 1.1em;
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index 2953f3b41..6c461f062 100755
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -166,6 +166,9 @@
<a href="/search" title="{{$nav.search.3}}"><i class="icon-search"></i></a>
</li>
+ {{if $powered_by}}
+ <div id="powered-by">{{$powered_by}}</div>
+ {{/if}}
{{if $nav.directory}}
<li class="{{$sel.directory}}">
<a class="{{$nav.directory.2}}" href="{{$nav.directory.0}}" title="{{$nav.directory.3}}"><i class="icon-sitemap"></i></a>