Cleanups:

- added empty lines
- removed old-lost commented out line

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2018-05-13 16:46:58 +02:00
parent 538760d9da
commit bacb7b70f6
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
2 changed files with 10 additions and 1 deletions

View file

@ -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);

View file

@ -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 = '<a href="https://friendi.ca"><img id="logo-img" src="images/friendica-32.png" alt="logo" /></a><span id="logo-text"><a href="https://friendi.ca">Friendica</a></span>';
}
$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) . "<br />";
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),