예제 #1
0
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     WCF::getBreadcrumbs()->add($this->user->getBreadcrumb());
 }
예제 #2
0
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // get preferred username
     if (empty($_POST)) {
         if (isset($_COOKIE[COOKIE_PREFIX . 'userID'])) {
             $user = new User(intval($_COOKIE[COOKIE_PREFIX . 'userID']));
             if ($user->userID) {
                 $this->username = $user->username;
             }
         }
     }
 }
예제 #3
0
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     // get attachments
     if (MODULE_ATTACHMENT && $this->attachmentObjectType) {
         $this->attachmentHandler = new AttachmentHandler($this->attachmentObjectType, $this->attachmentObjectID, $this->tmpHash, $this->attachmentParentObjectID);
     }
     if (empty($_POST)) {
         $this->enableBBCodes = ENABLE_BBCODES_DEFAULT_VALUE && WCF::getSession()->getPermission($this->permissionCanUseBBCodes) ? 1 : 0;
         $this->enableHtml = ENABLE_HTML_DEFAULT_VALUE && WCF::getSession()->getPermission($this->permissionCanUseHtml) ? 1 : 0;
         $this->enableSmilies = ENABLE_SMILIES_DEFAULT_VALUE && WCF::getSession()->getPermission($this->permissionCanUseSmilies) ? 1 : 0;
         $this->preParse = PRE_PARSE_DEFAULT_VALUE;
         $this->showSignature = SHOW_SIGNATURE_DEFAULT_VALUE;
         $this->languageID = WCF::getLanguage()->languageID;
     }
     parent::readData();
     // get default smilies
     if (MODULE_SMILEY) {
         $this->smileyCategories = SmileyCache::getInstance()->getVisibleCategories();
         $firstCategory = reset($this->smileyCategories);
         if ($firstCategory) {
             $this->defaultSmilies = SmileyCache::getInstance()->getCategorySmilies($firstCategory->categoryID ?: null);
         }
     }
     if ($this->enableBBCodes && $this->allowedBBCodesPermission) {
         BBCodeHandler::getInstance()->setAllowedBBCodes(explode(',', WCF::getSession()->getPermission($this->allowedBBCodesPermission)));
     }
 }