• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed False Key used in Logmodel::getModeratorLogEntries

R

ragtek

Guest
#1
PHP:
return $this->fetchAllKeyed($this->limitQueryResults(
            '
                SELECT moderator_log.*, user.username
                FROM xf_moderator_log AS moderator_log
                INNER JOIN xf_user AS user ON (user.user_id = moderator_log.user_id)
                WHERE ' . ($userId ? 'moderator_log.user_id = ' . $db->quote($userId) : '1=1') . '
                ORDER BY moderator_log.log_date DESC
            ', $limitOptions['limit'], $limitOptions['offset']
        ), 'admin_log_id');
shouldn't moderator_log_id be the key?;)

PHP:
        return $this->fetchAllKeyed($this->limitQueryResults(
            '
                SELECT moderator_log.*, user.username
                FROM xf_moderator_log AS moderator_log
                INNER JOIN xf_user AS user ON (user.user_id = moderator_log.user_id)
                WHERE ' . ($userId ? 'moderator_log.user_id = ' . $db->quote($userId) : '1=1') . '
                ORDER BY moderator_log.log_date DESC
            ', $limitOptions['limit'], $limitOptions['offset']
        ), 'moderator_log_id');