mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 04:45:16 +02:00
Add L10n parameter to Pager classes
This commit is contained in:
parent
682fb7e4e2
commit
561472b975
20 changed files with 53 additions and 52 deletions
|
@ -107,7 +107,7 @@ function common_content(App $a)
|
|||
return $o;
|
||||
}
|
||||
|
||||
$pager = new Pager(DI::args()->getQueryString());
|
||||
$pager = new Pager(DI::l10n(), DI::args()->getQueryString());
|
||||
|
||||
if ($cid) {
|
||||
$common_friends = Model\GContact::commonFriends($uid, $cid, $pager->getStart(), $pager->getItemsPerPage());
|
||||
|
|
|
@ -296,7 +296,7 @@ function message_content(App $a)
|
|||
$total = $r[0]['total'];
|
||||
}
|
||||
|
||||
$pager = new Pager(DI::args()->getQueryString());
|
||||
$pager = new Pager(DI::l10n(), DI::args()->getQueryString());
|
||||
|
||||
$r = get_messages(local_user(), $pager->getStart(), $pager->getItemsPerPage());
|
||||
|
||||
|
|
|
@ -377,7 +377,7 @@ function networkFlatView(App $a, $update = 0)
|
|||
}
|
||||
}
|
||||
|
||||
$pager = new Pager(DI::args()->getQueryString());
|
||||
$pager = new Pager(DI::l10n(), DI::args()->getQueryString());
|
||||
|
||||
networkPager($a, $pager, $update);
|
||||
|
||||
|
@ -669,7 +669,7 @@ function networkThreadedView(App $a, $update, $parent)
|
|||
$sql_range = '';
|
||||
}
|
||||
|
||||
$pager = new Pager(DI::args()->getQueryString());
|
||||
$pager = new Pager(DI::l10n(), DI::args()->getQueryString());
|
||||
|
||||
$pager_sql = networkPager($a, $pager, $update);
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ function notes_content(App $a, $update = false)
|
|||
$condition = ['uid' => local_user(), 'post-type' => Item::PT_PERSONAL_NOTE, 'gravity' => GRAVITY_PARENT,
|
||||
'contact-id'=> $a->contact['id']];
|
||||
|
||||
$pager = new Pager(DI::args()->getQueryString(), 40);
|
||||
$pager = new Pager(DI::l10n(), DI::args()->getQueryString(), 40);
|
||||
|
||||
$params = ['order' => ['created' => true],
|
||||
'limit' => [$pager->getStart(), $pager->getItemsPerPage()]];
|
||||
|
|
|
@ -1023,7 +1023,7 @@ function photos_content(App $a)
|
|||
$total = count($r);
|
||||
}
|
||||
|
||||
$pager = new Pager(DI::args()->getQueryString(), 20);
|
||||
$pager = new Pager(DI::l10n(), DI::args()->getQueryString(), 20);
|
||||
|
||||
/// @TODO I have seen this many times, maybe generalize it script-wide and encapsulate it?
|
||||
$order_field = $_GET['order'] ?? '';
|
||||
|
@ -1299,7 +1299,7 @@ function photos_content(App $a)
|
|||
$condition = ["`parent` = ? AND `parent` != `id`", $link_item['parent']];
|
||||
$total = DBA::count('item', $condition);
|
||||
|
||||
$pager = new Pager(DI::args()->getQueryString());
|
||||
$pager = new Pager(DI::l10n(), DI::args()->getQueryString());
|
||||
|
||||
$params = ['order' => ['id'], 'limit' => [$pager->getStart(), $pager->getItemsPerPage()]];
|
||||
$result = Item::selectForUser($link_item['uid'], Item::ITEM_FIELDLIST, $condition, $params);
|
||||
|
@ -1565,7 +1565,7 @@ function photos_content(App $a)
|
|||
$total = count($r);
|
||||
}
|
||||
|
||||
$pager = new Pager(DI::args()->getQueryString(), 20);
|
||||
$pager = new Pager(DI::l10n(), 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`,
|
||||
|
|
|
@ -225,7 +225,7 @@ function videos_content(App $a)
|
|||
$total = count($r);
|
||||
}
|
||||
|
||||
$pager = new Pager(DI::args()->getQueryString(), 20);
|
||||
$pager = new Pager(DI::l10n(), DI::args()->getQueryString(), 20);
|
||||
|
||||
$r = q("SELECT hash, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`created`) AS `created`,
|
||||
ANY_VALUE(`filename`) AS `filename`, ANY_VALUE(`filetype`) as `filetype`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue