protected function action($settings = array(), $defaults = array()) { if ($this->backend->info->is_available_generator($this->modulename)) { $this->action = parent::action($settings, $defaults); } else { throw new ApibotException_InternalError("API module " . $this->modulename . " is unknown at this wiki"); } }
protected function results($result) { $results = parent::results($result); if (isset($results['results'])) { $data = $results['results']; unset($results['results']); $this->results = $results; if (isset($results['cached'])) { if (isset($results['cachedtimestamp'])) { foreach ($data as &$querypage) { $querypage['cachedtimestamp'] = $results['cachedtimestamp']; } } } return $data; } else { unset($this->results); return $results; } }