From: Michael Date: Thu, 14 Dec 2017 22:18:53 +0000 (+0000) Subject: "update" is enough X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2d7cd2daf401d9221fc91985e7937b8a24f4b343;p=friendica.git "update" is enough --- diff --git a/boot.php b/boot.php index bfdf7db84d..79cf3e5b3e 100644 --- a/boot.php +++ b/boot.php @@ -702,7 +702,7 @@ function update_db(App $a) // run new update routine // it update the structure in one call - $retval = DBStructure::updateStructure(false, true); + $retval = DBStructure::update(false, true); if ($retval) { DBStructure::updateFail( DB_UPDATE_VERSION, diff --git a/mod/admin.php b/mod/admin.php index 7af3f246dc..8a5ec1f1a8 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -722,7 +722,7 @@ function admin_page_summary(App $a) } if (Config::get('system', 'dbupdate', DB_UPDATE_NOT_CHECKED) == DB_UPDATE_NOT_CHECKED) { - DBStructure::updateStructure(false, true); + DBStructure::update(false, true); } if (Config::get('system', 'dbupdate') == DB_UPDATE_FAILED) { $showwarning = true; @@ -1385,7 +1385,7 @@ function admin_page_dbsync(App $a) } if (($a->argc > 2) && (intval($a->argv[2]) || ($a->argv[2] === 'check'))) { - $retval = DBStructure::updateStructure(false, true); + $retval = DBStructure::update(false, true); if (!$retval) { $o .= sprintf(t("Database structure update %s was successfully applied."), DB_UPDATE_VERSION) . "
"; Config::set('database', 'dbupdate_' . DB_UPDATE_VERSION, 'success'); diff --git a/mod/install.php b/mod/install.php index f2edf64981..81e4805b2e 100644 --- a/mod/install.php +++ b/mod/install.php @@ -536,7 +536,7 @@ function load_database_rem($v, $i) { } function load_database() { - $errors = DBStructure::updateStructure(false, true); + $errors = DBStructure::update(false, true); return $errors; } diff --git a/scripts/dbstructure.php b/scripts/dbstructure.php index 58c1011fb9..d293fc8714 100755 --- a/scripts/dbstructure.php +++ b/scripts/dbstructure.php @@ -21,10 +21,10 @@ unset($db_host, $db_user, $db_pass, $db_data); if ($_SERVER["argc"] == 2) { switch ($_SERVER["argv"][1]) { case "dryrun": - DBStructure::updateStructure(true, false); + DBStructure::update(true, false); return; case "update": - DBStructure::updateStructure(true, true); + DBStructure::update(true, true); $build = Config::get('system','build'); if (!x($build)) { diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index bada70348f..68d5e42fed 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -182,7 +182,7 @@ class DBStructure { return t('Errors encountered performing database changes: ').$message.EOL; } - public static function updateStructure($verbose, $action, $tables = null, $definition = null) { + public static function update($verbose, $action, $tables = null, $definition = null) { if ($action) { Config::set('system', 'maintenance', 1); Config::set('system', 'maintenance_reason', sprintf(t(': Database update'), DBM::date().' '.date('e'))); @@ -1686,4 +1686,4 @@ class DBStructure { return($database); } -} \ No newline at end of file +}