// These lines provide the javascript needed by the acl selector
$tpl = Renderer::getMarkupTemplate('settings/head.tpl');
- $a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
+ DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$ispublic' => L10n::t('everybody')
]);
$tabtpl = Renderer::getMarkupTemplate("generic_links_widget.tpl");
- $a->page['aside'] = Renderer::replaceMacros($tabtpl, [
+ DI::page()['aside'] = Renderer::replaceMacros($tabtpl, [
'$title' => L10n::t('Settings'),
'$class' => 'settings-widget',
'$items' => $tabs,
$key = $_POST['remove'];
DBA::delete('tokens', ['id' => $key, 'uid' => local_user()]);
- $a->internalRedirect('settings/oauth/', true);
+ DI::baseUrl()->redirect('settings/oauth/', true);
return;
}
);
}
}
- $a->internalRedirect('settings/oauth/', true);
+ DI::baseUrl()->redirect('settings/oauth/', true);
return;
}
}
Hook::callAll('display_settings_post', $_POST);
- $a->internalRedirect('settings/display');
+ DI::baseUrl()->redirect('settings/display');
return; // NOTREACHED
}
if (!empty($_POST['resend_relocate'])) {
Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::RELOCATION, local_user());
info(L10n::t("Relocate message has been send to your contacts"));
- $a->internalRedirect('settings');
+ DI::baseUrl()->redirect('settings');
}
Hook::callAll('settings_post', $_POST);
// Update the global contact for the user
GContact::updateForUser(local_user());
- $a->internalRedirect('settings');
+ DI::baseUrl()->redirect('settings');
return; // NOTREACHED
}
BaseModule::checkFormSecurityTokenRedirectOnError('/settings/oauth', 'settings_oauth', 't');
DBA::delete('clients', ['client_id' => $a->argv[3], 'uid' => local_user()]);
- $a->internalRedirect('settings/oauth/', true);
+ DI::baseUrl()->redirect('settings/oauth/', true);
return;
}
$tpl = Renderer::getMarkupTemplate('settings/oauth.tpl');
$o .= Renderer::replaceMacros($tpl, [
'$form_security_token' => BaseModule::getFormSecurityToken("settings_oauth"),
- '$baseurl' => $a->getBaseURL(true),
+ '$baseurl' => DI::baseUrl()->get(true),
'$title' => L10n::t('Connected Apps'),
'$add' => L10n::t('Add application'),
'$edit' => L10n::t('Edit'),
if (!empty($legacy_contact)) {
/// @todo Isn't it supposed to be a $a->internalRedirect() call?
- $a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL=' . System::baseUrl().'/ostatus_subscribe?url=' . urlencode($legacy_contact) . '">';
+ DI::page()['htmlhead'] = '<meta http-equiv="refresh" content="0; URL=' . System::baseUrl().'/ostatus_subscribe?url=' . urlencode($legacy_contact) . '">';
}
$settings_connectors = '';
$tpl_addr = Renderer::getMarkupTemplate('settings/nick_set.tpl');
$prof_addr = Renderer::replaceMacros($tpl_addr,[
- '$desc' => L10n::t("Your Identity Address is <strong>'%s'</strong> or '%s'.", $nickname . '@' . $a->getHostName() . $a->getURLPath(), System::baseUrl() . '/profile/' . $nickname),
- '$basepath' => $a->getHostName()
+ '$desc' => L10n::t("Your Identity Address is <strong>'%s'</strong> or '%s'.", $nickname . '@' . DI::baseUrl()->getHostname() . DI::baseUrl()->getUrlPath(), System::baseUrl() . '/profile/' . $nickname),
+ '$basepath' => DI::baseUrl()->getHostname()
]);
$stpl = Renderer::getMarkupTemplate('settings/settings.tpl');
$private_post = 0;
}
- $query_str = $a->query_string;
+ $query_str = DI::args()->getQueryString();
if (strpos($query_str, 'public=1') !== false) {
$query_str = str_replace(['?public=1', '&public=1'], ['', ''], $query_str);
}
'$permissions' => L10n::t('Default Post Permissions'),
'$permdesc' => L10n::t("\x28click to open/close\x29"),
'$visibility' => $profile['net-publish'],
- '$aclselect' => ACL::getFullSelectorHTML($a->page, $a->user),
+ '$aclselect' => ACL::getFullSelectorHTML(DI::page(), $a->user),
'$suggestme' => $suggestme,
'$blockwall'=> $blockwall, // array('blockwall', L10n::t('Allow friends to post to your profile page:'), !$blockwall, ''),
'$blocktags'=> $blocktags, // array('blocktags', L10n::t('Allow friends to tag your posts:'), !$blocktags, ''),