From: Matthias Schmidt Date: Sat, 14 Jul 2012 17:24:18 +0000 (+0200) Subject: Removes first underscore from tableName of file handlers X-Git-Tag: 2.0.0_Beta_1~987^2~8^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=701dd3845292c2fb246c1a03336dbed8f83cad80;p=GitHub%2FWoltLab%2FWCF.git Removes first underscore from tableName of file handlers This way the tableName property behaves the same way like the property of the package installation plugins. --- diff --git a/wcfsetup/install/files/lib/system/package/ACPTemplatesFileHandler.class.php b/wcfsetup/install/files/lib/system/package/ACPTemplatesFileHandler.class.php index 09573f9cb8..1c566965bc 100644 --- a/wcfsetup/install/files/lib/system/package/ACPTemplatesFileHandler.class.php +++ b/wcfsetup/install/files/lib/system/package/ACPTemplatesFileHandler.class.php @@ -16,7 +16,11 @@ use wcf\system\WCF; * @category Community Framework */ class ACPTemplatesFileHandler extends PackageInstallationFileHandler { - protected $tableName = '_acp_template'; + /** + * name of the database table where the installed files are logged + * @var string + */ + protected $tableName = 'acp_template'; /** * @see wcf\system\setup\IFileHandler::checkFiles() @@ -41,7 +45,7 @@ class ACPTemplatesFileHandler extends PackageInstallationFileHandler { $conditions->add("templateName IN (?)", array($fileNames)); $sql = "SELECT * - FROM wcf".WCF_N.$this->tableName." + FROM wcf".WCF_N."_".$this->tableName." ".$conditions; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute($conditions->getParameters()); @@ -78,7 +82,7 @@ class ACPTemplatesFileHandler extends PackageInstallationFileHandler { // get existing templates $sql = "SELECT templateName - FROM wcf".WCF_N.$this->tableName." + FROM wcf".WCF_N."_".$this->tableName." WHERE packageID = ?"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(array($packageID)); @@ -92,7 +96,7 @@ class ACPTemplatesFileHandler extends PackageInstallationFileHandler { } if (count($files)) { - $sql = "INSERT INTO wcf".WCF_N.$this->tableName." + $sql = "INSERT INTO wcf".WCF_N."_".$this->tableName." (packageID, templateName) VALUES (?, ?)"; $statement = WCF::getDB()->prepareStatement($sql); diff --git a/wcfsetup/install/files/lib/system/package/TemplatesFileHandler.class.php b/wcfsetup/install/files/lib/system/package/TemplatesFileHandler.class.php index add7d2a58a..0f9a9e6c10 100644 --- a/wcfsetup/install/files/lib/system/package/TemplatesFileHandler.class.php +++ b/wcfsetup/install/files/lib/system/package/TemplatesFileHandler.class.php @@ -12,5 +12,8 @@ namespace wcf\system\package; * @category Community Framework */ class TemplatesFileHandler extends ACPTemplatesFileHandler { - protected $tableName = '_template'; + /** + * @var wcf\system\package\ACPTemplatesFileHandler::$tableName + */ + protected $tableName = 'template'; }