aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xboot.php2
-rw-r--r--include/config.php9
-rw-r--r--include/zot.php8
-rw-r--r--js/main.js3
-rw-r--r--mod/admin.php10
-rw-r--r--version.inc2
6 files changed, 24 insertions, 10 deletions
diff --git a/boot.php b/boot.php
index ce7218013..b2ce372bb 100755
--- a/boot.php
+++ b/boot.php
@@ -1120,7 +1120,7 @@ function x($s,$k = NULL) {
function system_unavailable() {
- include('system_unavailable.php');
+ include('include/system_unavailable.php');
system_down();
killme();
}
diff --git a/include/config.php b/include/config.php
index 38840f5e4..ccd907424 100644
--- a/include/config.php
+++ b/include/config.php
@@ -24,6 +24,15 @@ function load_config($family) {
if(! array_key_exists('config_loaded',$a->config[$family])) {
$r = q("SELECT * FROM config WHERE cat = '%s'", dbesc($family));
+
+ // This is often one of the earliest database calls in the life of the page.
+ // If the DB was successfully opened, but we can't read from it,
+ // we must assume catastrophic failure of the DB. Report the system down.
+
+ if($r === false) {
+ system_unavailable();
+ }
+
if($r !== false) {
if($r) {
foreach($r as $rr) {
diff --git a/include/zot.php b/include/zot.php
index ae470b70b..0290bc402 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -688,7 +688,7 @@ function import_xchan($arr,$ud_flags = 1) {
if($dirmode != DIRECTORY_MODE_NORMAL) {
if(array_key_exists('profile',$arr) && is_array($arr['profile'])) {
- $profile_changed = import_directory_profile($xchan_hash,$arr['profile'],$arr['address'],$ud_flags);
+ $profile_changed = import_directory_profile($xchan_hash,$arr['profile'],$arr['address'],$ud_flags, 1);
if($profile_changed) {
$what .= 'profile ';
$changed = true;
@@ -1376,7 +1376,7 @@ function process_profile_delivery($sender,$arr,$deliveries) {
dbesc($sender['hash'])
);
if($r)
- import_directory_profile($sender['hash'],$arr,$r[0]['xchan_addr'], 1);
+ import_directory_profile($sender['hash'],$arr,$r[0]['xchan_addr'], 1, 0);
}
@@ -1387,7 +1387,7 @@ function process_profile_delivery($sender,$arr,$deliveries) {
*
*/
-function import_directory_profile($hash,$profile,$addr,$ud_flags = 1) {
+function import_directory_profile($hash,$profile,$addr,$ud_flags = 1, $suppress_update = 0) {
logger('import_directory_profile', LOGGER_DEBUG);
if(! $hash)
@@ -1493,7 +1493,7 @@ function import_directory_profile($hash,$profile,$addr,$ud_flags = 1) {
$d = array('xprof' => $arr, 'profile' => $profile, 'update' => $update);
call_hooks('import_directory_profile', $d);
- if($d['update'])
+ if(($d['update']) && (! $suppress_update))
update_modtime($arr['xprof_hash'],random_string() . '@' . get_app()->get_hostname(), $addr, $ud_flags);
return $d['update'];
}
diff --git a/js/main.js b/js/main.js
index 9d764c74e..cd5040064 100644
--- a/js/main.js
+++ b/js/main.js
@@ -119,6 +119,7 @@
var next_page = 1;
var page_load = true;
var loadingPage = false;
+ var pageHasMoreContent = true;
$(function() {
$.ajaxSetup({cache: false});
@@ -984,7 +985,7 @@ $(window).scroll(function () {
}
if($(window).scrollTop() + $(window).height() == $(document).height()) {
- if(! loadingPage) {
+ if((pageHasMoreContent) && (! loadingPage)) {
$('#more').hide();
$('#no-more').hide();
// alert('scroll');
diff --git a/mod/admin.php b/mod/admin.php
index c140cbc6f..fad03e34a 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -751,12 +751,16 @@ function admin_page_plugins(&$a){
}
$admin_form="";
+
if (is_array($a->plugins_admin) && in_array($plugin, $a->plugins_admin)){
@require_once("addon/$plugin/$plugin.php");
- $func = $plugin.'_plugin_admin';
- $func($a, $admin_form);
+ if(function_exists($plugin.'_plugin_admin')) {
+ $func = $plugin.'_plugin_admin';
+ $func($a, $admin_form);
+ }
}
-
+
+
$t = get_markup_template("admin_plugins_details.tpl");
return replace_macros($t, array(
'$title' => t('Administration'),
diff --git a/version.inc b/version.inc
index 713343a75..280942cd9 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2013-09-24.446
+2013-09-25.447