/** * Display an article * * @param string $article URL of the article * @return object */ public function article($article) { $this->user->add_lang_ext('tas2580/wiki', 'common'); if (!$this->auth->acl_get('u_wiki_view')) { trigger_error('NOT_AUTHORISED'); } $this->template->assign_block_vars('navlinks', array('FORUM_NAME' => $this->user->lang['WIKI'], 'U_VIEW_FORUM' => $this->helper->route('tas2580_wiki_index', array()))); $this->template->assign_vars(array('WIKI_FOOTER' => $this->user->lang('WIKI_FOOTER', base64_decode('aHR0cHM6Ly90YXMyNTgwLm5ldA=='), base64_decode('dGFzMjU4MA==')))); include $this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext; include $this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext; $action = $this->request->variable('action', ''); $id = $this->request->variable('id', 0); switch ($action) { case 'edit': return $this->edit->edit_article($article); case 'versions': return $this->compare->view_versions($article); case 'compare': $from = $this->request->variable('from', 0); $to = $this->request->variable('to', 0); return $this->compare->compare_versions($article, $from, $to); case 'delete': return $this->delete->version($id); case 'detele_article': return $this->delete->article($article); case 'active': return $this->edit->active($id); case 'deactivate': return $this->edit->deactivate($article); default: return $this->view->view_article($article, $id); } }