<?php /** * (TB) Group Format * @file tbGfActionBoardIndex.php Action overloader (public_forums_forums_boards) * * @copyright (c) 2006 - 2012 Invision Byte * @link http://www.invisionbyte.net/ * @author Terabyte * @since 03/09/2009 * @updated 29/10/2011 * @version 4.1.1 (41001) */ class tbGfActionBoardIndex extends boardIndexRecentTopics { public function getTotalTextString() { if ( $this->settings['show_totals'] && is_array($this->caches['stats']) && $this->caches['stats']['last_mem_id'] ) { if ( empty($this->caches['stats']['last_mem_group']) || $this->caches['stats']['tb_gf_update'] < IPS_UNIX_TIME_NOW ) { # Still here? No group ID or cache update (The cache updates each 15 minutes!) $groupFormat = $this->DB->buildAndFetch( array( 'select' => 'member_group_id', 'from' => 'members', 'where' => 'member_id='.intval($this->caches['stats']['last_mem_id']) ) ); $this->caches['stats']['last_mem_group'] = intval($groupFormat['member_group_id']); $this->caches['stats']['tb_gf_update'] = IPS_UNIX_TIME_NOW + 900; $this->cache->setCache( 'stats', $this->caches['stats'], array( 'array' => 1 ) ); } $this->caches['stats']['last_mem_name'] = IPSMember::makeNameFormatted( $this->caches['stats']['last_mem_name'], $this->caches['stats']['last_mem_group'] ); } return parent::getTotalTextString(); } }