public function WAPageCheckUpdates() { Webadmin::disableDesign(); //We disable the design, because of AJAX Webadmin::disableCache(); $this->checkUpdate(); $parser = Webadmin::getTemplateParser(); $parser->assign('updates', $this->_updates); return $parser->draw('updates'); }
/** Web admin main page for the plugin. * This functions is triggered by the web admin when accessing the bans plugin area in the webadmin. * It will show a list of the last bans, along with the current banning stats. * * \param $data The data from the browser * * \return The page body */ public function WAPageIndex($data) { $parser = Webadmin::getTemplateParser(); $banlist = array(); foreach ($this->_banlist as $guid => $ban) { $banlist[$guid] = $ban; //$banlist[$guid]['End'] = $ban['Duration'] != 'forever' ? ($ban['Begin'] + $ban['Duration']) : Locales::translate('Forever'); $banlist[$guid]['Duration'] = $ban['Duration'] != 'forever' ? $this->_getDurationHumanRepresentation($ban['Duration']) : Locales::translate('Forever'); if ($ban['Realm'] == self::GLOBALBAN) { $banlist[$guid]['Realm'] = Locales::translate('Everywhere'); } else { $banlist[$guid]['Realm'] = str_replace('server:' . self::GLOBALBAN, self::GLOBALBAN, $ban['Realm']); } if (!$ban['Description']) { $banlist[$guid]['Description'] = Locales::translate('None'); } else { $banlist[$guid]['Description'] = $ban['Description']; } } $parser->assign('banlist', $banlist); $parser->assign('lastbans', $this->_extractBanlistSlice($banlist)); return $parser->draw('plugins/bans'); }