/**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     // get default values
     if (!count($_POST)) {
         $sql = "SELECT\t*\n\t\t\t\tFROM\twcf" . WCF_N . "_style_to_package";
         $result = WCF::getDB()->sendQuery($sql);
         while ($row = WCF::getDB()->fetchArray($result)) {
             if ($row['isDefault']) {
                 $this->defaultStyleIDArray[$row['packageID']] = $row['styleID'];
             }
             if ($row['disabled']) {
                 if (!isset($this->disabledStyleIDArray[$row['packageID']])) {
                     $this->disabledStyleIDArray[$row['packageID']] = array();
                 }
                 $this->disabledStyleIDArray[$row['packageID']][] = $row['styleID'];
             }
         }
     }
     // get standalone packages
     $sql = "SELECT\tpackage.*,\n\t\t\t\tCASE WHEN package.instanceName <> '' THEN package.instanceName ELSE package.packageName END AS packageName\n\t\t\tFROM\twcf" . WCF_N . "_package package\n\t\t\tWHERE\tpackage.packageID IN (\n\t\t\t\t\tSELECT\tpackageID\n\t\t\t\t\tFROM\twcf" . WCF_N . "_package_dependency\n\t\t\t\t\tWHERE\tdependency IN (\n\t\t\t\t\t\t\tSELECT\tpackageID\n\t\t\t\t\t\t\tFROM\twcf" . WCF_N . "_package\n\t\t\t\t\t\t\tWHERE\tpackage = 'com.woltlab.wcf.system.style'\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\tAND standalone = 1";
     $result = WCF::getDB()->sendQuery($sql);
     while ($row = WCF::getDB()->fetchArray($result)) {
         $this->packages[] = $row;
     }
     // get available styles
     $this->styles = Style::getStyles();
 }
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     // get available styles
     $this->styles = Style::getStyles();
 }