Confirmed "ALL" games tab only returns 25 games.

*CONFIRMED*

I duplicated the issue you are having by installing more than 25 games. I have 30 installed now and only 25 show in the "All" category. There is no longer a pagination link at the lower left of the div window.

This was fixed in a previous version but was somehow lost in a subsequent version, and no one noticed it until now.
 
On line 231 of Game.php you can see that there is a function call to get the limits of how many rows (games in this case) to return, it's called "prepareLimitFetchOptions", however, I can't find any other references in any of the code to this function. Which would probably explain why it's only returning 25. I don't really know the code though so... I could be completely wrong. =) But it does appear that it's missing.
 
It's from

PHP:
class Arcade_Option
{
    public static function get($key)
    {
        switch ($key) {
            case 'doFraudCheck':
                return false;
            case 'gamesPerPage':
                return 25;
        }
 
        return XenForo_Application::get('options')->get('arcade_' . $key);
    }
}

controller calls _getGameFetchOptions which is returning the fetchoptions including the 25 per page limit
PHP:
$newGames = $gameModel->getGames(array(), $this->_getGameFetchOptions(array(
                'order' => 'game_id',
                'direction' => 'desc',
            )));
..........
 
protected function _getGameFetchOptions(array $fetchOptions = array())
    {
        $default = array(
            'join' => Arcade_Model_Game::FETCH_HIGHSCORE_USER + Arcade_Model_Game::FETCH_CATEGORY,
            'limit' => Arcade_Option::get('gamesPerPage'),
            'image' => array('l', 'm', 's'),
            'playUserId' => XenForo_Visitor::getUserId(),
            'voteUserId' => XenForo_Visitor::getUserId(),
        );
 
        return array_merge($default, $fetchOptions);
    }
 
Why not have pagination at the bottom? Show only 15 or 25 games per page and then go to next page, page 2, 3, 4, 5....
 
I'll take a look at this this week at some point. Will need to add a bunch of games to my test install first (which, I know, would be a lot easier if we could upload .tar files directly to the server for installing games so for testing stuff like this it would really come in handy :().
 
Before I tear this apart... for you guys/gals with a lot of games, was it working before at some point? That'll tell me whether either I broke something in one of the updates or if it never worked as expected to begin with.
 
Back
Top