]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Remove group_member.uid
[friendica.git] / boot.php
index fa26028113251db526161ea8380a07f4b92b1d48..79cf3e5b3e4970c84de8796411969a1da73feb69 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -28,6 +28,7 @@ use Friendica\Core\PConfig;
 use Friendica\Core\Worker;
 use Friendica\Database\DBM;
 use Friendica\Model\Contact;
+use Friendica\Database\DBStructure;
 
 require_once 'include/network.php';
 require_once 'include/plugin.php';
@@ -37,13 +38,20 @@ require_once 'include/pgettext.php';
 require_once 'include/nav.php';
 require_once 'include/identity.php';
 require_once 'update.php';
-require_once 'include/dbstructure.php';
 
 define('FRIENDICA_PLATFORM',     'Friendica');
 define('FRIENDICA_CODENAME',     'Asparagus');
 define('FRIENDICA_VERSION',      '3.6-dev');
 define('DFRN_PROTOCOL_VERSION',  '2.23');
 define('DB_UPDATE_VERSION',      1236);
+define('NEW_UPDATE_ROUTINE_VERSION', 1170);
+
+/**
+ * @brief Constants for the database update check
+ */
+const DB_UPDATE_NOT_CHECKED = 0; // Database check wasn't executed before
+const DB_UPDATE_SUCCESSFUL = 1;  // Database check was successful
+const DB_UPDATE_FAILED = 2;      // Database check failed
 
 /**
  * @brief Constant with a HTML line break.
@@ -563,16 +571,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.
  *
@@ -704,9 +702,9 @@ function update_db(App $a)
 
                                // run new update routine
                                // it update the structure in one call
-                               $retval = update_structure(false, true);
+                               $retval = DBStructure::update(false, true);
                                if ($retval) {
-                                       update_fail(
+                                       DBStructure::updateFail(
                                                DB_UPDATE_VERSION,
                                                $retval
                                        );
@@ -752,7 +750,7 @@ function run_update_function($x)
 
                if ($retval) {
                        //send the administrator an e-mail
-                       update_fail(
+                       DBStructure::updateFail(
                                $x,
                                sprintf(t('Update %s failed. See error logs.'), $x)
                        );