/** * @see EventListener::execute() */ public function execute($eventObj, $className, $eventName) { if (!WCF::getUser()->userID && GUEST_STYLE) StyleManager::changeStyle(GUEST_STYLE, true); }
/** * Initialises the style system. */ protected function initStyle() { if (isset($_GET['styleID'])) { self::getSession()->setStyleID(intval($_GET['styleID'])); } StyleManager::changeStyle(self::getSession()->getStyleID()); }
/** * @see Form::save() */ public function save() { AbstractForm::save(); // save user if ($this->activeCategory == 'settings.general') { $this->additionalFields['languageID'] = $this->languageID; } if ($this->activeCategory == 'settings.display') { $this->additionalFields['styleID'] = $this->styleID; require_once WCF_DIR . 'lib/system/style/StyleManager.class.php'; StyleManager::changeStyle($this->styleID); } $editor = WCF::getUser()->getEditor(); $editor->update('', '', '', null, $this->activeOptions, $this->additionalFields, $this->activeCategory == 'settings.general' ? $this->visibleLanguages : null); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * Enters the active user to this board. */ public function enter() { // check permissions $this->checkPermission(array('canViewBoard', 'canEnterBoard')); // refresh session WCF::getSession()->setBoardID($this->boardID); // change style if necessary require_once WCF_DIR . 'lib/system/style/StyleManager.class.php'; if ($this->styleID && (!WCF::getSession()->getStyleID() || $this->enforceStyle) && StyleManager::getStyle()->styleID != $this->styleID) { StyleManager::changeStyle($this->styleID, true); } }
/** * Initialises the style system. */ protected function initStyle() { StyleManager::changeStyle(self::getSession()->getStyleID()); }