generalize count limit for lists and correct error handling for AJAX Quest listing

This commit is contained in:
coderkun 2014-05-26 17:45:11 +02:00
commit dcdd274a55
3 changed files with 4 additions and 3 deletions

View file

@ -96,7 +96,7 @@
}
// Get Quests
$limit = ($all != 'all') ? \nre\configs\AppConfig::$misc['questlist_limit'] : null;
$limit = ($all != 'all') ? \nre\configs\AppConfig::$misc['lists_limit'] : null;
$offset = ($all != 'all') ? max((intval($page) - 1), 0) * $limit : 0;
$questsCount = $this->Quests->getCountForQuestsForSeminaryByOpenSubmissions($seminary['id'], $selectedQuestgroup, $selectedQuesttype);
$quests = $this->Quests->getQuestsForSeminaryByOpenSubmissions($seminary['id'], $selectedQuestgroup, $selectedQuesttype, $limit, $offset);