/**
  * @see Page::readData()
  */
 public function readData()
 {
     AbstractForm::readData();
     if (!count($_POST)) {
         if (isset($_GET['values']) && is_array($_GET['values'])) {
             $this->values = $_GET['values'];
             $this->submit();
         }
     }
     // get path to category icons
     foreach ($this->cachedCategories as $key => $category) {
         // add icon path
         if (!empty($category['categoryIconM'])) {
             // get relative path
             $path = '';
             if (empty($category['packageDir'])) {
                 $path = RELATIVE_WCF_DIR;
             } else {
                 $path = FileUtil::getRealPath(RELATIVE_WCF_DIR . $category['packageDir']);
             }
             $this->cachedCategories[$key]['categoryIconM'] = $path . $category['categoryIconM'];
         }
     }
     // get categories
     $this->categories = $this->getOptionTree('profile');
     if (count($this->categories) == 0) {
         $this->options = $this->getCategoryOptions('profile');
     }
     // insert default values
     foreach ($this->activeOptions as $name => $option) {
         if (isset($this->values[$name])) {
             $this->activeOptions[$name]['optionValue'] = $this->values[$name];
         }
     }
 }
 /**
  * @see	Form::readData()
  */
 public function readData()
 {
     parent::readData();
     // avoid problems when submit() is not called
     if ($this->source === null) {
         throw new IllegalLinkException();
     }
     // get available packages
     $this->cachedPackages = $this->getCache('packages-' . $this->source->sourceID, 'Packages');
     // get all dependent packages
     $this->packageDependencies = $this->getCache('package-dependency-' . $this->source->sourceID, 'PackageDependency');
     // get all available wcf setup resources
     $setupResources = $this->getCache('wcfsetup-resources', 'WcfSetupResource');
     foreach ($this->sources as $source) {
         $directory = FileUtil::getRelativePath($this->source->sourceDirectory, $source->sourceDirectory);
         // packages
         $packages = $this->getCache('packages-' . $source->sourceID, 'Packages');
         foreach ($packages['packages'] as $key => $val) {
             $packages['packages'][$key]['directory'] = $directory . $packages['packages'][$key]['directory'];
             $packages['packages'][$key]['source'] = $source;
         }
         $this->cachedPackages = array('hashes' => array_merge($this->cachedPackages['hashes'], $packages['hashes']), 'packages' => array_merge($this->cachedPackages['packages'], $packages['packages']));
         // dependencies
         $this->packageDependencies = array_merge($this->packageDependencies, $this->getCache('package-dependency-' . $source->sourceID, 'PackageDependency'));
     }
     // get package information
     $this->getRequestedPackage();
     // fetch all required packages
     $this->fetchDependencies($this->requestedPackageHash);
     // read previously selected packages
     $this->readSelectedPackages();
 }
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     // alliance
     $this->alliance = Alliance::getByUserID(WCF::getUser()->userID, true);
     $this->interrelations = $this->alliance->getInterrelation();
     $this->interrelations[$this->alliance->allianceID] = $this->alliance;
     parent::readData();
 }
Exemplo n.º 4
0
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     $this->alliance = new Alliance($this->allianceID);
     if (!$this->alliance->allianceID || WCF::getUser()->ally_request || WCF::getUser()->ally_id) {
         require_once WCF_DIR . 'lib/system/exception/IllegalLinkException.class.php';
         throw new IllegalLinkException();
     }
 }
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     $this->fleetQueue = new FleetQueue(2);
     parent::readData();
     $this->getTargetPlanet();
     $this->fleetQueue->speedPercent = $this->speed;
     $this->missions = $this->fleetQueue->getMissions();
     $this->capacity = $this->fleetQueue->getCapacity() - $this->fleetQueue->getConsumption();
 }
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     // alliance
     $this->alliance = Alliance::getByUserID(WCF::getUser()->userID, true);
     // user
     if (empty($this->userID)) {
         require_once WCF_DIR . 'lib/system/exception/IllegalLinkException.class.php';
         throw new IllegalLinkException();
     }
     $this->user = new LWUser($this->userID);
     parent::readData();
 }
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     if ($this->messageID) {
         $message = new NMessage($this->messageID);
         $sender = $message->getSender();
         if ($sender instanceof UserMessageSender) {
             $this->user = $sender->getUser();
             $this->username = $this->user->username;
             $this->subject = 'Re: ' . $message->subject;
         }
     } else {
         if ($this->userID) {
             $this->user = new LWUser($this->userID);
             $this->username = $this->user->username;
         }
     }
     parent::readData();
 }
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     $this->fleetQueue = new FleetQueue(1);
     parent::readData();
 }
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     $this->alliance = new Alliance($this->allianceID);
     $this->alliance2 = new AllianceEditor($this->allianceID2);
     if ($this->alliance2->getInterrelation($this->allianceID, $this->interrelationType) !== null) {
         require_once WCF_DIR . 'lib/system/exception/IllegalLinkException.class.php';
         throw new IllegalLinkException();
     }
     if (!$this->alliance2->getRank(true, 6)) {
         require_once WCF_DIR . 'lib/system/exception/PermissionDeniedException.class.php';
         throw new PermissionDeniedException();
     }
     AbstractForm::readData();
 }
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     $this->alliance = new AllianceEditor($this->allianceID);
     parent::readData();
 }
Exemplo n.º 11
0
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
 }
Exemplo n.º 12
0
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     $this->loadPlanetData();
 }
Exemplo n.º 13
0
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     $this->alliance = new AllianceEditor($this->allianceID);
     $this->ranks = $this->alliance->getRank();
     parent::readData();
 }
Exemplo n.º 14
0
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     // get preferred username
     if (!count($_POST)) {
         if (isset($_COOKIE[COOKIE_PREFIX . 'userID'])) {
             require_once WCF_DIR . 'lib/data/user/User.class.php';
             $user = new User(intval($_COOKIE[COOKIE_PREFIX . 'userID']));
             if ($user->userID) {
                 $this->username = $user->username;
             }
         }
     }
 }
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     $this->renderBoards();
     // default values
     if (!count($_POST)) {
         $ignoredBoardIDArray = array();
         $sql = "SELECT\tboardID\n\t\t\t\tFROM\twbb" . WBB_N . "_board_ignored_by_user\n\t\t\t\tWHERE\tuserID = " . WCF::getUser()->userID;
         $result = WCF::getDB()->sendQuery($sql);
         while ($row = WCF::getDB()->fetchArray($result)) {
             $ignoredBoardIDArray[] = $row['boardID'];
         }
         foreach ($this->boards as $board) {
             if (!in_array($board->boardID, $ignoredBoardIDArray) && $board->getPermission('canViewBoard')) {
                 $this->unignoredBoardIDArray[] = $board->boardID;
             }
         }
     }
 }
Exemplo n.º 16
0
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     $this->alliance = new AllianceEditor($this->allianceID);
     $this->interrelations = $this->alliance->getInterrelation();
     parent::readData();
 }
Exemplo n.º 17
0
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     WCF::getCache()->addResource('oventTypes-' . PACKAGE_ID, WCF_DIR . 'cache/cache.oventTypes-' . PACKAGE_ID . '.php', LW_DIR . 'lib/system/cache/CacheBuilderOventTypes.class.php');
     $this->oventTypes = WCF::getCache()->get('oventTypes-' . PACKAGE_ID);
     parent::readData();
 }
 /**
  * @see Page::assignVariables()
  */
 public function readData()
 {
     parent::readData();
     // get members list
     $this->membersList = new UserGroupMembersListPage($this->groupID);
 }
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     // captcha
     $this->captchaID = 0;
     if ($this->useCaptcha) {
         $this->captchaID = Captcha::create();
     }
 }
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     // default values
     if (!count($_POST)) {
         if ($this->avatarType == 'selected') {
             $this->avatarID = $this->avatar->avatarID;
         }
         if (MODULE_GRAVATAR == 1) {
             $this->gravatar = WCF::getUser()->gravatar;
         }
     } else {
         if ($this->avatarType == 'selected') {
             $this->userAvatar = false;
         } else {
             $this->userAvatar = true;
         }
     }
     // init avatar list
     new AvatarListPage($this->avatarID);
 }
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     // get predefined warnings
     $this->warnings = Warning::getWarnings();
 }