/** * execute command */ function &executeCommand() { global $ilCtrl, $ilTabs, $ilUser, $ilAccess; $next_class = $this->ctrl->getNextClass($this); $cmd = $this->ctrl->getCmd(); switch ($next_class) { case "ilnotegui": $this->getTabs(); $ilTabs->setTabActive("pg"); return $this->preview(); break; case "ilratinggui": // for rating side block include_once "./Services/Rating/classes/class.ilRatingGUI.php"; $rating_gui = new ilRatingGUI(); $rating_gui->setObject($this->getPageObject()->getParentId(), "wiki", $this->getPageObject()->getId(), "wpg"); $rating_gui->setUpdateCallback(array($this, "updateStatsRating")); $this->ctrl->forwardCommand($rating_gui); $ilCtrl->redirect($this, "preview"); break; case "ilpageobjectgui": die("Deprecated. Wikipage gui forwarding to ilpageobject"); return; case "ilcommonactiondispatchergui": include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php"; $gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall(); $gui->enableCommentsSettings(false); $gui->setRatingCallback($this, "preview"); $this->ctrl->forwardCommand($gui); break; case "ilwikistatgui": if ($ilAccess->checkAccess("statistics_read", "", $this->wiki_ref_id)) { $this->tabs_gui->clearTargets(); // see ilObjWikiGUI::getTabs() $this->getTabs("statistics"); include_once "Modules/Wiki/classes/class.ilWikiStatGUI.php"; $gui = new ilWikiStatGUI($this->getPageObject()->getParentId(), $this->getPageObject()->getId()); $this->ctrl->forwardCommand($gui); } break; default: if (strtolower($ilCtrl->getNextClass()) == "ilpageeditorgui") { self::initEditingJS($this->tpl); } if ($_GET["ntf"]) { include_once "./Services/Notification/classes/class.ilNotification.php"; switch ($_GET["ntf"]) { case 1: ilNotification::setNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $this->getPageObject()->getParentId(), false); break; case 2: // remove all page notifications here? ilNotification::setNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $this->getPageObject()->getParentId(), true); break; case 3: ilNotification::setNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $this->getPageObject()->getId(), false); break; case 4: ilNotification::setNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $this->getPageObject()->getId(), true); break; } $ilCtrl->redirect($this, "preview"); } $this->setPresentationTitle($this->getWikiPage()->getTitle()); return parent::executeCommand(); } }