X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=e47665f94d072bc9772b9c01ace9b82d928cd46f;hb=f4707d03d97d9fb17e4ec0874f95992e270c933b;hp=2c4bce9c85bd53b4bf35782ea423ebd8b51d9b33;hpb=04589ecd38d85df339a3fed320d2822520b686f2;p=friendica.git diff --git a/boot.php b/boot.php index 2c4bce9c85..e47665f94d 100644 --- a/boot.php +++ b/boot.php @@ -43,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', 1238); +define('DB_UPDATE_VERSION', 1239); define('NEW_UPDATE_ROUTINE_VERSION', 1170); /** @@ -676,7 +676,7 @@ function check_db($via_worker) if ($build != DB_UPDATE_VERSION) { // When we cannot execute the database update via the worker, we will do it directly if (!Worker::add(PRIORITY_CRITICAL, 'DBUpdate') && $via_worker) { - update_db(get_app()); + update_db(); } } } @@ -697,11 +697,8 @@ function check_url(App $a) // and www.example.com vs example.com. // We will only change the url to an ip address if there is no existing setting - if (empty($url)) { - $url = Config::set('system', 'url', System::baseUrl()); - } - if ((!link_compare($url, System::baseUrl())) && (!preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $a->get_hostname))) { - $url = Config::set('system', 'url', System::baseUrl()); + if (empty($url) || (!link_compare($url, System::baseUrl())) && (!preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $a->get_hostname))) { + Config::set('system', 'url', System::baseUrl()); } return; @@ -711,7 +708,7 @@ function check_url(App $a) * @brief Automatic database updates * @param object $a App */ -function update_db(App $a) +function update_db() { $build = Config::get('system', 'build'); @@ -800,7 +797,6 @@ function run_update_function($x) Config::set('system', 'build', $x + 1); return true; } - return true; } /** @@ -1051,7 +1047,6 @@ function current_theme() if ($is_mobile) { if (isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) { - $system_theme = $standard_system_theme; $theme_name = $standard_theme_name; } else { $system_theme = Config::get('system', 'mobile-theme', ''); @@ -1062,7 +1057,6 @@ function current_theme() if ($theme_name === '---') { // user has selected to have the mobile theme be the same as the normal one - $system_theme = $standard_system_theme; $theme_name = $standard_theme_name; if ($page_theme) { @@ -1071,7 +1065,6 @@ function current_theme() } } } else { - $system_theme = $standard_system_theme; $theme_name = $standard_theme_name; if ($page_theme) {