Пример #1
0
	static public function getTotalCount() {
		if (self::$_total === null) {
			$db = JFactory::getDBO ();
			$config = KunenaFactory::getConfig();
			if ($config->userlist_count_users == '1' ) $where = 'block=0 OR activation=""';
			elseif ($config->userlist_count_users == '2' ) $where = 'block=0 AND activation=""';
			elseif ($config->userlist_count_users == '3' ) $where = 'block=0';
			else $where = '1';
			$db->setQuery ( "SELECT COUNT(*) FROM #__users WHERE {$where}" );
			self::$_total = (int) $db->loadResult ();
			KunenaError::checkDatabaseError();
		}
		return self::$_total;
	}