/** * */ function execute($id) { $w = new Wiki($this->db); $w->set($id); $this->dispatcher->controller->dispatcherObject = $w; if (!$this->hasRights($_SESSION['access'], 'source', $w->handle)) { return array($w->handle . ' - WikiSource', 'No Permission'); } if ($this->hasRights($_SESSION['access'], 'modify', $w->handle)) { $wm = new WikiModify($this->dispatcher); return $wm->execute($id, null, false); } $this->siteArgs['source']['active'] = 'active'; $this->addSiteArgs(); return array($w->handle . ' - WikiSource', $this->template->parse('source', array('content' => $w->revision->content))); }