/**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     if (!$this->moduleID) {
         $this->data['moduleID'] = 0;
     }
 }
Пример #2
0
 /**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     if (!$this->serverID) {
         $this->data['serverID'] = 0;
     }
 }
 /**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     if (!$this->entryID) {
         $this->data['entryID'] = 0;
     }
 }
Пример #4
0
 /**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     $this->placeholders = @unserialize($this->placeholders);
     if (!is_array($this->placeholders)) {
         $this->placeholders = array();
     }
 }
 /**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     if (!$this->pageID) {
         $this->data['pageID'] = 0;
     } else {
         $this->data['moduleManager'] = new ModuleManager($this->pageID);
     }
 }
 /**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     if ($this->isViewable() == false) {
         $this->message = WCF::getLanguage()->get('wcf.contest.solution.message.hidden');
         $this->attachments = 0;
     }
     $this->subject = WCF::getLanguage()->get('wcf.contest.solution.number', array('$solutionID' => $this->solutionID, '$time' => $this->time));
 }
Пример #7
0
 /**
  * @see	DatabaseObject::handleData()
  */
 public function handleData($data)
 {
     parent::handleData($data);
     if ($this->data['additionalData'] !== null) {
         $this->data['additionalData'] = unserialize($this->data['additionalData']);
     } else {
         $this->data['additionalData'] = array();
     }
 }
 /**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     if (!$this->instanceID) {
         $this->data['instanceID'] = 0;
     } else {
         $this->data['options'] = unserialize($this->data['options']);
     }
 }
 /**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     if (!$this->commentID) {
         $this->data['commentID'] = 0;
     }
     $this->enableSmilies = $this->enableSmilies == 1 ? true : false;
     $this->enableHtml = $this->enableHtml == 1 ? true : false;
     $this->enableBBCodes = $this->enableBBCodes == 1 ? true : false;
 }
Пример #10
0
 /**
  * @see	DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     if (!$this->hostID) {
         $this->data['hostID'] = 0;
     }
     if ($this->hostID) {
         // change var types
         $this->isFallback = (bool) $this->isFallback;
         $this->isDisabled = (bool) $this->isDisabled;
     }
 }
Пример #11
0
 /**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     if (!isset($data['packageID'])) {
         throw new SystemException("unknown package id '" . $this->packageID . "'", 13013);
     }
     $this->packageID = $data['packageID'];
     $this->package = $data['package'];
     $this->name = $data['packageName'];
     $this->instanceNo = $data['instanceNo'];
     $this->description = $data['packageDescription'];
     $this->version = $data['packageVersion'];
     $this->date = $data['packageDate'];
     $this->url = $data['packageURL'];
     $this->parentPackageID = $data['parentPackageID'];
     $this->isUnique = $data['isUnique'];
     $this->standalone = $data['standalone'];
     $this->author = $data['author'];
     $this->authorURL = $data['authorURL'];
     $this->dir = $data['packageDir'];
     parent::handleData($data);
 }
 /**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     $this->message = new EntryMessage(null, $data);
 }
Пример #13
0
 /**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     foreach ($this->data as $key => $date) {
         if (strpos($date, '~wot:s:') === 0) {
             $this->data[$key] = unserialize(substr($date, 7));
         }
     }
 }
Пример #14
0
 /**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     $this->owner = new ContestOwner($data, $this->userID, $this->groupID);
 }
Пример #15
0
 /**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     if ($this->isViewable() == false) {
         $this->subject = WCF::getLanguage()->get('wcf.contest.subject.hidden');
         $this->message = WCF::getLanguage()->get('wcf.contest.message.hidden');
         $this->attachments = 0;
     }
 }
Пример #16
0
 /**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     $this->title = 'wcf.contest.class.item.' . $this->classID;
     $this->description = 'wcf.contest.class.item.' . $this->classID . '.description';
 }
Пример #17
0
 /**
  * Handles the given resultset. Stores database data in this session object.
  *
  * @param 	array 		$row
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     if ($this->sessionID) {
         // validate session
         if (!$this->validate()) {
             $this->data['sessionID'] = false;
             return;
         }
         $this->data['lastRequestURI'] = $this->requestURI;
         $this->data['lastRequestMethod'] = $this->requestMethod;
         $this->data['ipAddress'] = UserUtil::getIpAddress();
         $this->data['userAgent'] = UserUtil::getUserAgent();
         $this->data['requestURI'] = UserUtil::getRequestURI();
         $this->data['requestMethod'] = !empty($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '';
         // handle data
         if (ENABLE_SESSION_DATA_CACHE && get_class(WCF::getCache()->getCacheSource()) == 'MemcacheCacheSource') {
             require_once WCF_DIR . 'lib/system/cache/source/MemcacheAdapter.class.php';
             // get user data
             $this->user = MemcacheAdapter::getInstance()->getMemcache()->get($this->sessionTable . '_userdata_' . $this->sessionID);
             // get session variables
             $this->sessionVariables = MemcacheAdapter::getInstance()->getMemcache()->get($this->sessionTable . '_variables_' . $this->sessionID);
             if (!is_array($this->sessionVariables)) {
                 $this->sessionVariables = array();
             }
             // package changed; reset user data
             if ($this->data['packageID'] != PACKAGE_ID) {
                 $this->user = null;
             }
         } else {
             // package changed; reset user data
             if ($this->data['packageID'] != PACKAGE_ID) {
                 $this->data['userData'] = '';
             }
             //$this->data['packageID'] = PACKAGE_ID;
             // unserialize the variables of this session
             @($this->sessionVariables = unserialize($data['sessionVariables']));
             if (!is_array($this->sessionVariables)) {
                 $this->sessionVariables = array();
             }
             // unserialize the user object of this session
             @($this->user = unserialize($this->userData));
             unset($this->data['userData']);
         }
         // check whether the user object is valid
         if (!is_object($this->user) || $this->userID != 0 && !$this->user instanceof $this->userSessionClassName || $this->userID == 0 && !$this->user instanceof $this->guestSessionClassName) {
             // create a new user object
             $this->createUser($this->userID != 0 ? $this->userID : null);
         }
         // generate security token
         $this->initSecurityToken();
     }
 }
 /**
  * @see DatabaseObject::handleData()
  */
 protected function handleData($data)
 {
     parent::handleData($data);
     $this->title = 'wcf.contest.ratingoption.item.' . $this->optionID;
 }