diff --git a/include/api.php b/include/api.php
index 37ee56a3e..ae2f06406 100644
--- a/include/api.php
+++ b/include/api.php
@@ -4517,6 +4517,7 @@ function api_account_update_profile_image($type)
} else {
throw new InternalServerErrorException('Unsupported filetype');
}
+
// change specified profile or all profiles to the new resource-id
if ($is_default_profile) {
$condition = ["`profile` AND `resource-id` != ? AND `uid` = ?", $data['photo']['id'], api_user()];
@@ -4530,7 +4531,6 @@ function api_account_update_profile_image($type)
Contact::updateSelfFromUserID(api_user(), true);
// Update global directory in background
- //$user = api_get_user(get_app());
$url = System::baseUrl() . '/profile/' . get_app()->user['nickname'];
if ($url && strlen(Config::get('system', 'directory'))) {
Worker::add(PRIORITY_LOW, "Directory", $url);
diff --git a/mod/admin.php b/mod/admin.php
index fd7558a8d..1d6f1395a 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -1299,15 +1299,18 @@ function admin_page_site(App $a)
$user_names = [];
$user_names['---'] = L10n::t('Multi user instance');
$users = q("SELECT `username`, `nickname` FROM `user`");
+
foreach ($users as $user) {
$user_names[$user['nickname']] = $user['username'];
}
/* Banner */
$banner = Config::get('system', 'banner');
+
if ($banner == false) {
$banner = 'Friendica';
}
+
$banner = htmlspecialchars($banner);
$info = Config::get('config', 'info');
$info = htmlspecialchars($info);
@@ -1507,9 +1510,12 @@ function admin_page_dbsync(App $a)
if ($a->argc > 2 && intval($a->argv[2])) {
require_once 'update.php';
+
$func = 'update_' . intval($a->argv[2]);
+
if (function_exists($func)) {
$retval = $func();
+
if ($retval === UPDATE_FAILED) {
$o .= L10n::t("Executing %s failed with error: %s", $func, $retval);
} elseif ($retval === UPDATE_SUCCESS) {
@@ -1522,11 +1528,13 @@ function admin_page_dbsync(App $a)
$o .= L10n::t('There was no additional update function %s that needed to be called.', $func) . "
";
Config::set('database', $func, 'success');
}
+
return $o;
}
$failed = [];
$r = q("SELECT `k`, `v` FROM `config` WHERE `cat` = 'database' ");
+
if (DBM::is_result($r)) {
foreach ($r as $rr) {
$upd = intval(substr($rr['k'], 7));
@@ -1536,6 +1544,7 @@ function admin_page_dbsync(App $a)
$failed[] = $upd;
}
}
+
if (!count($failed)) {
$o = replace_macros(get_markup_template('structure_check.tpl'), [
'$base' => System::baseUrl(true),