Rename App Methods

- renamed a lot of App methods to CamelCase
- replaced direct public variables with get-/set-Methods
This commit is contained in:
Philipp Holzer 2018-10-09 19:58:58 +02:00
commit 5a02e39a65
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
94 changed files with 481 additions and 338 deletions

View file

@ -1143,8 +1143,8 @@ function photos_content(App $a)
DBA::escape($album)
);
if (DBA::isResult($r)) {
$a->set_pager_total(count($r));
$a->set_pager_itemspage(20);
$a->setPagerTotal(count($r));
$a->setPagerItemsPage(20);
}
/// @TODO I have seen this many times, maybe generalize it script-wide and encapsulate it?
@ -1393,7 +1393,7 @@ function photos_content(App $a)
$link_item = Item::selectFirst([], ['id' => $linked_items[0]['id']]);
$condition = ["`parent` = ? AND `parent` != `id`", $link_item['parent']];
$a->set_pager_total(DBA::count('item', $condition));
$a->setPagerTotal(DBA::count('item', $condition));
$params = ['order' => ['id'], 'limit' => [$a->pager['start'], $a->pager['itemspage']]];
$result = Item::selectForUser($link_item['uid'], Item::ITEM_FIELDLIST, $condition, $params);
@ -1655,8 +1655,8 @@ function photos_content(App $a)
);
if (DBA::isResult($r)) {
$a->set_pager_total(count($r));
$a->set_pager_itemspage(20);
$a->setPagerTotal(count($r));
$a->setPagerItemsPage(20);
}
$r = q("SELECT `resource-id`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`filename`) AS `filename`,