mirror of
https://github.com/friendica/friendica
synced 2025-04-21 17:50:11 +00:00
Remove deprecated App::query_string - replace with DI::args()->getQueryString()
This commit is contained in:
parent
26af2feee2
commit
e6f61c2cc7
33 changed files with 63 additions and 66 deletions
|
@ -46,13 +46,11 @@ class Contact extends BaseAdminModule
|
|||
{
|
||||
parent::content($parameters);
|
||||
|
||||
$a = DI::app();
|
||||
|
||||
$condition = ['uid' => 0, 'blocked' => true];
|
||||
|
||||
$total = DBA::count('contact', $condition);
|
||||
|
||||
$pager = new Pager($a->query_string, 30);
|
||||
$pager = new Pager(DI::args()->getQueryString(), 30);
|
||||
|
||||
$contacts = Model\Contact::selectToArray([], $condition, ['limit' => [$pager->getStart(), $pager->getItemsPerPage()]]);
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ class Users extends BaseAdminModule
|
|||
/* get pending */
|
||||
$pending = Register::getPending();
|
||||
|
||||
$pager = new Pager($a->query_string, 100);
|
||||
$pager = new Pager(DI::args()->getQueryString(), 100);
|
||||
|
||||
// @TODO Move below block to Model\User::getUsers($start, $count, $order = 'contact.name', $order_direction = '+')
|
||||
$valid_orders = [
|
||||
|
|
|
@ -49,7 +49,7 @@ class AllFriends extends BaseModule
|
|||
|
||||
$total = Model\GContact::countAllFriends(local_user(), $cid);
|
||||
|
||||
$pager = new Pager($app->query_string);
|
||||
$pager = new Pager(DI::args()->getQueryString());
|
||||
|
||||
$friends = Model\GContact::allFriends(local_user(), $cid, $pager->getStart(), $pager->getItemsPerPage());
|
||||
if (empty($friends)) {
|
||||
|
|
|
@ -55,7 +55,7 @@ abstract class BaseAdminModule extends BaseModule
|
|||
|
||||
if (!is_site_admin()) {
|
||||
notice(L10n::t('Please login to continue.'));
|
||||
Session::set('return_path', $a->query_string);
|
||||
Session::set('return_path', DI::args()->getQueryString());
|
||||
DI::baseUrl()->redirect('login');
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ class Bookmarklet extends BaseModule
|
|||
|
||||
if (!local_user()) {
|
||||
$output = '<h2>' . L10n::t('Login') . '</h2>';
|
||||
$output .= Login::form($app->query_string, intval($config->get('config', 'register_policy')) === Register::CLOSED ? false : true);
|
||||
$output .= Login::form(DI::args()->getQueryString(), intval($config->get('config', 'register_policy')) === Register::CLOSED ? false : true);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
@ -425,7 +425,7 @@ class Contact extends BaseModule
|
|||
if (!empty($_REQUEST['confirm'])) {
|
||||
// <form> can't take arguments in its 'action' parameter
|
||||
// so add any arguments as hidden inputs
|
||||
$query = explode_querystring($a->query_string);
|
||||
$query = explode_querystring(DI::args()->getQueryString());
|
||||
$inputs = [];
|
||||
foreach ($query['args'] as $arg) {
|
||||
if (strpos($arg, 'confirm=') === false) {
|
||||
|
@ -467,7 +467,7 @@ class Contact extends BaseModule
|
|||
}
|
||||
}
|
||||
|
||||
$_SESSION['return_path'] = $a->query_string;
|
||||
$_SESSION['return_path'] = DI::args()->getQueryString();
|
||||
|
||||
if (!empty($a->data['contact']) && is_array($a->data['contact'])) {
|
||||
$contact = $a->data['contact'];
|
||||
|
@ -776,7 +776,7 @@ class Contact extends BaseModule
|
|||
if (DBA::isResult($r)) {
|
||||
$total = $r[0]['total'];
|
||||
}
|
||||
$pager = new Pager($a->query_string);
|
||||
$pager = new Pager(DI::args()->getQueryString());
|
||||
|
||||
$contacts = [];
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class Directory extends BaseModule
|
|||
$gDirPath = Profile::zrl($dirURL, true);
|
||||
}
|
||||
|
||||
$pager = new Pager($app->query_string, 60);
|
||||
$pager = new Pager(DI::args()->getQueryString(), 60);
|
||||
|
||||
$profiles = Profile::searchProfiles($pager->getStart(), $pager->getItemsPerPage(), $search);
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class Home extends BaseModule
|
|||
}
|
||||
}
|
||||
|
||||
$login = Login::form($app->query_string, $config->get('config', 'register_policy') === Register::CLOSED ? 0 : 1);
|
||||
$login = Login::form(DI::args()->getQueryString(), $config->get('config', 'register_policy') === Register::CLOSED ? 0 : 1);
|
||||
|
||||
$content = '';
|
||||
Hook::callAll('home_content', $content);
|
||||
|
|
|
@ -25,7 +25,7 @@ class Objects extends BaseModule
|
|||
}
|
||||
|
||||
if (!ActivityPub::isRequest()) {
|
||||
DI::baseUrl()->redirect(str_replace('objects/', 'display/', $a->query_string));
|
||||
DI::baseUrl()->redirect(str_replace('objects/', 'display/', DI::args()->getQueryString()));
|
||||
}
|
||||
|
||||
/// @todo Add Authentication to enable fetching of non public content
|
||||
|
|
|
@ -258,7 +258,7 @@ class Profile extends BaseModule
|
|||
return '';
|
||||
}
|
||||
|
||||
$pager = new Pager($a->query_string);
|
||||
$pager = new Pager(DI::args()->getQueryString());
|
||||
} else {
|
||||
$sql_post_table = "";
|
||||
|
||||
|
@ -302,7 +302,7 @@ class Profile extends BaseModule
|
|||
$itemspage_network = $a->force_max_items;
|
||||
}
|
||||
|
||||
$pager = new Pager($a->query_string, $itemspage_network);
|
||||
$pager = new Pager(DI::args()->getQueryString(), $itemspage_network);
|
||||
|
||||
$pager_sql = sprintf(" LIMIT %d, %d ", $pager->getStart(), $pager->getItemsPerPage());
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ class Contacts extends BaseModule
|
|||
|
||||
$total = DBA::count('contact', $condition);
|
||||
|
||||
$pager = new Pager($a->query_string);
|
||||
$pager = new Pager(DI::args()->getQueryString());
|
||||
|
||||
$params = ['order' => ['name' => false], 'limit' => [$pager->getStart(), $pager->getItemsPerPage()]];
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ class Login extends BaseModule
|
|||
}
|
||||
|
||||
if (is_null($return_path)) {
|
||||
$return_path = $a->query_string;
|
||||
$return_path = DI::args()->getQueryString();
|
||||
}
|
||||
|
||||
if (local_user()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue