From: Joshua Rüsweg Date: Wed, 27 May 2015 15:32:27 +0000 (+0200) Subject: Add application support for OptionCacheBuilder X-Git-Tag: 3.0.0_Beta_1~2306 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=637b76a007395705aeada88f71fa48c9b992ed88;p=GitHub%2FWoltLab%2FWCF.git Add application support for OptionCacheBuilder Closes #1910 --- diff --git a/wcfsetup/install/files/lib/system/cache/builder/OptionCacheBuilder.class.php b/wcfsetup/install/files/lib/system/cache/builder/OptionCacheBuilder.class.php index 3ed649eaac..3d8e1ad517 100644 --- a/wcfsetup/install/files/lib/system/cache/builder/OptionCacheBuilder.class.php +++ b/wcfsetup/install/files/lib/system/cache/builder/OptionCacheBuilder.class.php @@ -27,6 +27,12 @@ class OptionCacheBuilder extends AbstractCacheBuilder { */ protected $tableName = 'option'; + /** + * application + * @var string + */ + protected $application = 'wcf'; + /** * @see \wcf\system\cache\builder\AbstractCacheBuilder::rebuild() */ @@ -41,7 +47,7 @@ class OptionCacheBuilder extends AbstractCacheBuilder { // option categories // get all option categories and sort categories by priority $sql = "SELECT categoryName, categoryID - FROM wcf".WCF_N."_".$this->tableName."_category"; + FROM ".$this->application.WCF_N."_".$this->tableName."_category"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(); $optionCategories = array(); @@ -55,7 +61,7 @@ class OptionCacheBuilder extends AbstractCacheBuilder { $conditions->add("categoryID IN (?)", array($optionCategories)); $sql = "SELECT option_category.*, package.packageDir - FROM wcf".WCF_N."_".$this->tableName."_category option_category + FROM ".$this->application.WCF_N."_".$this->tableName."_category option_category LEFT JOIN wcf".WCF_N."_package package ON (package.packageID = option_category.packageID) ".$conditions." @@ -76,7 +82,7 @@ class OptionCacheBuilder extends AbstractCacheBuilder { // get all options and sort options by priority $optionIDs = array(); $sql = "SELECT optionName, optionID - FROM wcf".WCF_N."_".$this->tableName; + FROM ".$this->application.WCF_N."_".$this->tableName; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(); while ($row = $statement->fetchArray()) { @@ -89,7 +95,7 @@ class OptionCacheBuilder extends AbstractCacheBuilder { $conditions->add("optionID IN (?)", array($optionIDs)); $sql = "SELECT * - FROM wcf".WCF_N."_".$this->tableName." + FROM ".$this->application.WCF_N."_".$this->tableName." ".$conditions." ORDER BY showOrder ASC"; $statement = WCF::getDB()->prepareStatement($sql);