]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Merge pull request #4060 from annando/system-unavailable
[friendica.git] / boot.php
index 15dfec48b84b06ba6703b760fb9ac702580c50ef..d9a64e570ac49cf6f919eac570b4ecc4908f53c4 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -27,8 +27,7 @@ use Friendica\Core\Config;
 use Friendica\Core\PConfig;
 use Friendica\Core\Worker;
 use Friendica\Database\DBM;
-use Friendica\Object\Contact;
-use Friendica\Util\Lock;
+use Friendica\Model\Contact;
 
 require_once 'include/network.php';
 require_once 'include/plugin.php';
@@ -44,7 +43,7 @@ define('FRIENDICA_PLATFORM',     'Friendica');
 define('FRIENDICA_CODENAME',     'Asparagus');
 define('FRIENDICA_VERSION',      '3.6-dev');
 define('DFRN_PROTOCOL_VERSION',  '2.23');
-define('DB_UPDATE_VERSION',      1235);
+define('DB_UPDATE_VERSION',      1236);
 
 /**
  * @brief Constant with a HTML line break.
@@ -411,7 +410,6 @@ define('ACTIVITY_SHARE',       NAMESPACE_ACTIVITY_SCHEMA . 'share');
 define('ACTIVITY_DELETE',      NAMESPACE_ACTIVITY_SCHEMA . 'delete');
 
 define('ACTIVITY_POKE',        NAMESPACE_ZOT . '/activity/poke');
-define('ACTIVITY_MOOD',        NAMESPACE_ZOT . '/activity/mood');
 
 define('ACTIVITY_OBJ_BOOKMARK', NAMESPACE_ACTIVITY_SCHEMA . 'bookmark');
 define('ACTIVITY_OBJ_COMMENT', NAMESPACE_ACTIVITY_SCHEMA . 'comment');
@@ -565,16 +563,6 @@ function x($s, $k = null)
        }
 }
 
-/**
- * @brief Called from db initialisation if db is dead.
- */
-function system_unavailable()
-{
-       include 'system_unavailable.php';
-       system_down();
-       killme();
-}
-
 /**
  * @brief Returns the baseurl.
  *
@@ -686,7 +674,7 @@ function update_db(App $a)
                                // Compare the current structure with the defined structure
 
                                $t = Config::get('database', 'dbupdate_' . DB_UPDATE_VERSION);
-                               if ($t !== false) {
+                               if (!is_null($t)) {
                                        return;
                                }
 
@@ -742,7 +730,7 @@ function run_update_function($x)
                // delete the config entry to try again.
 
                $t = Config::get('database', 'update_' . $x);
-               if ($t !== false) {
+               if (!is_null($t)) {
                        return false;
                }
                Config::set('database', 'update_' . $x, time());