Remove deprecated App::query_string - replace with DI::args()->getQueryString()

This commit is contained in:
Philipp Holzer 2019-12-16 01:30:34 +01:00
commit e6f61c2cc7
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
33 changed files with 63 additions and 66 deletions

View file

@ -984,7 +984,7 @@ function photos_content(App $a)
// ACL permissions box
'$group_perms' => L10n::t('Show to Groups'),
'$contact_perms' => L10n::t('Show to Contacts'),
'$return_path' => $a->query_string,
'$return_path' => DI::args()->getQueryString(),
]);
return $o;
@ -1008,7 +1008,7 @@ function photos_content(App $a)
$total = count($r);
}
$pager = new Pager($a->query_string, 20);
$pager = new Pager(DI::args()->getQueryString(), 20);
/// @TODO I have seen this many times, maybe generalize it script-wide and encapsulate it?
$order_field = $_GET['order'] ?? '';
@ -1030,7 +1030,7 @@ function photos_content(App $a)
);
if ($cmd === 'drop') {
$drop_url = $a->query_string;
$drop_url = DI::args()->getQueryString();
return Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [
'$method' => 'post',
@ -1137,7 +1137,7 @@ function photos_content(App $a)
}
if ($cmd === 'drop') {
$drop_url = $a->query_string;
$drop_url = DI::args()->getQueryString();
return Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [
'$method' => 'post',
@ -1284,7 +1284,7 @@ function photos_content(App $a)
$condition = ["`parent` = ? AND `parent` != `id`", $link_item['parent']];
$total = DBA::count('item', $condition);
$pager = new Pager($a->query_string);
$pager = new Pager(DI::args()->getQueryString());
$params = ['order' => ['id'], 'limit' => [$pager->getStart(), $pager->getItemsPerPage()]];
$result = Item::selectForUser($link_item['uid'], Item::ITEM_FIELDLIST, $condition, $params);
@ -1348,7 +1348,7 @@ function photos_content(App $a)
// ACL permissions box
'$group_perms' => L10n::t('Show to Groups'),
'$contact_perms' => L10n::t('Show to Contacts'),
'$return_path' => $a->query_string,
'$return_path' => DI::args()->getQueryString(),
]);
}
@ -1371,7 +1371,7 @@ function photos_content(App $a)
'$likethis' => L10n::t("I like this \x28toggle\x29"),
'$nolike' => L10n::t("I don't like this \x28toggle\x29"),
'$wait' => L10n::t('Please wait'),
'$return_path' => $a->query_string,
'$return_path' => DI::args()->getQueryString(),
]);
}
@ -1549,7 +1549,7 @@ function photos_content(App $a)
$total = count($r);
}
$pager = new Pager($a->query_string, 20);
$pager = new Pager(DI::args()->getQueryString(), 20);
$r = q("SELECT `resource-id`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`filename`) AS `filename`,
ANY_VALUE(`type`) AS `type`, ANY_VALUE(`album`) AS `album`, max(`scale`) AS `scale`,