return null;
}
-function settings_init(&$a) {
+function settings_init(App &$a) {
- if(! local_user()) {
+ if (! local_user()) {
notice( t('Permission denied.') . EOL );
return;
}
}
-function settings_post(&$a) {
+function settings_post(App &$a) {
- if(! local_user())
+ if (! local_user()) {
return;
+ }
if (x($_SESSION,'submanage') && intval($_SESSION['submanage'])) {
return;
if(($old_visibility != $net_publish) || ($page_flags != $old_page_flags)) {
// Update global directory in background
$url = $_SESSION['my_url'];
- if($url && strlen(get_config('system','directory')))
+ if ($url && strlen(get_config('system','directory'))) {
proc_run(PRIORITY_LOW, "include/directory.php", $url);
+ }
}
require_once('include/profile_update.php');
}
-function settings_content(&$a) {
+function settings_content(App &$a) {
$o = '';
nav_set_selected('settings');
- if(! local_user()) {
+ if (! local_user()) {
#notice( t('Permission denied.') . EOL );
return;
}
$settings_connectors .= mini_group_select(local_user(), $default_group, t("Default group for OStatus contacts"));
- if ($legacy_contact != "")
+ /// @TODO Found to much different usage to test empty/non-empty strings (e.g. empty(), trim() == '' ) which is wanted?
+ if ($legacy_contact != "") {
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.App::get_baseurl().'/ostatus_subscribe?url='.urlencode($legacy_contact).'">';
+ }
$settings_connectors .= '<div id="legacy-contact-wrapper" class="field input">';
$settings_connectors .= '<label id="legacy-contact-label" for="snautofollow-checkbox">'. t('Your legacy GNU Social account'). '</label>';