1
0
Fork 0

Moved functions out of boot.php into class

- z_root() => $a->getBaseURL()
- absurl() => removed because no usage
- is_ajax() => $a->isAjax()
- current_load() => System::currentLoad()
- argc() => $a->argc
- argv($x) => $a->getArgumentValue($x)
This commit is contained in:
Philipp Holzer 2018-10-13 18:57:31 +02:00
commit 2c541afd47
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
8 changed files with 66 additions and 90 deletions

View file

@ -77,7 +77,7 @@ function admin_post(App $a)
break;
case 'themes':
if ($a->argc < 2) {
if (is_ajax()) {
if ($a->isAjax()) {
return;
}
goaway('admin/');
@ -107,7 +107,7 @@ function admin_post(App $a)
}
info(L10n::t('Theme settings updated.'));
if (is_ajax()) {
if ($a->isAjax()) {
return;
}
$return_path = 'admin/themes/' . $theme;
@ -286,7 +286,7 @@ function admin_content(App $a)
$o = admin_page_summary($a);
}
if (is_ajax()) {
if ($a->isAjax()) {
echo $o;
killme();
return '';
@ -2536,7 +2536,7 @@ function admin_page_features_post(App $a)
*/
function admin_page_features(App $a)
{
if ((argc() > 1) && (argv(1) === 'features')) {
if (($a->argc > 1) && ($a->argv[1] === 'features')) {
$arr = [];
$features = Feature::get(false);