aboutsummaryrefslogtreecommitdiffstats
path: root/include/config.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-25 21:22:36 -0700
committerfriendica <info@friendica.com>2013-09-25 21:22:36 -0700
commit6519433301a571d8e12ffa24b56534bb2e3afe5f (patch)
tree5aaea06e72cd8772eb4c5387423d1f480e194e97 /include/config.php
parent00e5ded1c892a94c79a854327b44d8673cc43274 (diff)
downloadvolse-hubzilla-6519433301a571d8e12ffa24b56534bb2e3afe5f.tar.gz
volse-hubzilla-6519433301a571d8e12ffa24b56534bb2e3afe5f.tar.bz2
volse-hubzilla-6519433301a571d8e12ffa24b56534bb2e3afe5f.zip
suppress creating the directory update record for profile updates which are part of the normal import_xchan sequence - otherwise we get two for every change. Create it normally if we are called with a profile_update message and don't go through the whole import_xchan thing.
Diffstat (limited to 'include/config.php')
-rw-r--r--include/config.php9
1 files changed, 9 insertions, 0 deletions
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) {