/**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     $serverList = new PackageUpdateServerList();
     $serverList->readObjects();
     foreach ($serverList as $server) {
         if (preg_match('~https?://store.woltlab.com/(?P<wcfMajorRelease>[a-z]+)/~', $server->serverURL, $matches)) {
             $this->updateServers[$matches['wcfMajorRelease']] = $server;
         }
     }
     foreach ($this->products as $packageUpdateID => $product) {
         $wcfMajorRelease = $product['wcfMajorRelease'];
         if (!isset($this->productData[$wcfMajorRelease])) {
             $this->productData[$wcfMajorRelease] = array();
         }
         $languageCode = WCF::getLanguage()->languageCode;
         $packageName = isset($product['packageName'][$languageCode]) ? $product['packageName'][$languageCode] : $product['packageName']['en'];
         $this->productData[$wcfMajorRelease][$packageUpdateID] = array('author' => $product['author'], 'authorURL' => $product['authorURL'], 'package' => $product['package'], 'packageName' => $packageName, 'pluginStoreURL' => $product['pluginStoreURL'], 'version' => array('available' => $product['lastVersion'], 'installed' => ''), 'status' => isset($this->updateServers[$wcfMajorRelease]) ? 'install' : 'unavailable');
         $package = PackageCache::getInstance()->getPackageByIdentifier($product['package']);
         if ($package !== null) {
             $this->productData[$wcfMajorRelease][$packageUpdateID]['version']['installed'] = $package->packageVersion;
             if (Package::compareVersion($product['lastVersion'], $package->packageVersion, '>')) {
                 $this->productData[$wcfMajorRelease][$packageUpdateID]['status'] = 'update';
             } else {
                 if (Package::compareVersion($product['lastVersion'], $package->packageVersion, '=')) {
                     $this->productData[$wcfMajorRelease][$packageUpdateID]['status'] = 'upToDate';
                 }
             }
         }
         if (isset($this->updateServers[$wcfMajorRelease]) && $this->updateServers[$wcfMajorRelease]->lastUpdateTime == 0) {
             $this->productData[$wcfMajorRelease][$packageUpdateID]['status'] = 'requireUpdate';
         }
     }
 }
 /**
  * Returns all active update package servers sorted by hostname.
  * 
  * @param	array		$packageUpdateServerIDs
  * @return	array		$servers
  */
 public static function getActiveUpdateServers(array $packageUpdateServerIDs = array())
 {
     $list = new PackageUpdateServerList();
     $list->getConditionBuilder()->add("isDisabled = ?", array(0));
     if (!empty($packageUpdateServerIDs)) {
         $list->getConditionBuilder()->add("packageUpdateServerID IN (?)", array($packageUpdateServerIDs));
     }
     $list->readObjects();
     return $list->getObjects();
 }