From: Alexander Ebert Date: Thu, 29 Sep 2011 15:00:24 +0000 (+0200) Subject: Added proper support for i18n in database and PIP X-Git-Tag: 2.0.0_Beta_1~1748 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cd6220f28e62cd370448b4f8685c050d18215d26;p=GitHub%2FWoltLab%2FWCF.git Added proper support for i18n in database and PIP --- diff --git a/wcfsetup/install/files/lib/system/package/plugin/OptionPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/OptionPackageInstallationPlugin.class.php index 0702b3eb6d..c91ad26f1e 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/OptionPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/OptionPackageInstallationPlugin.class.php @@ -21,7 +21,7 @@ class OptionPackageInstallationPlugin extends AbstractOptionPackageInstallationP */ public $tableName = 'option'; - public static $reservedTags = array('name', 'optiontype', 'defaultvalue', 'validationpattern', 'enableoptions', 'showorder', 'hidden', 'selectoptions', 'categoryname', 'permissions', 'options', 'attrs', 'cdata'); + public static $reservedTags = array('name', 'optiontype', 'defaultvalue', 'validationpattern', 'enableoptions', 'showorder', 'hidden', 'selectoptions', 'categoryname', 'permissions', 'options', 'attrs', 'cdata', 'supporti18n'); /** * @see wcf\system\package\plugin\AbstractOptionPackageInstallationPlugin::saveOption() @@ -30,7 +30,7 @@ class OptionPackageInstallationPlugin extends AbstractOptionPackageInstallationP // default values $optionName = $optionType = $defaultValue = $validationPattern = $selectOptions = $enableOptions = $permissions = $options = ''; $showOrder = null; - $hidden = 0; + $hidden = $supportI18n = 0; // get values if (isset($option['name'])) $optionName = $option['name']; @@ -44,6 +44,7 @@ class OptionPackageInstallationPlugin extends AbstractOptionPackageInstallationP if (isset($option['selectoptions'])) $selectOptions = $option['selectoptions']; if (isset($option['permissions'])) $permissions = $option['permissions']; if (isset($option['options'])) $options = $option['options']; + if (isset($option['supporti18n'])) $supportI18n = $option['supporti18n']; // check if optionType exists $className = 'wcf\system\option\\'.StringUtil::firstCharToUpperCase($optionType).'OptionType'; @@ -68,6 +69,7 @@ class OptionPackageInstallationPlugin extends AbstractOptionPackageInstallationP 'hidden' => $hidden, 'permissions' => $permissions, 'options' => $options, + 'supportI18n' => $supportI18n, 'additionalData' => serialize($additionalData) ); diff --git a/wcfsetup/setup/db/install.sql b/wcfsetup/setup/db/install.sql index f571904e80..4731a85fc1 100644 --- a/wcfsetup/setup/db/install.sql +++ b/wcfsetup/setup/db/install.sql @@ -244,6 +244,7 @@ CREATE TABLE wcf1_option ( hidden TINYINT(1) NOT NULL DEFAULT 0, permissions TEXT, options TEXT, + supportI18n TINYINT(1) NOT NULL DEFAULT 0, additionalData MEDIUMTEXT, UNIQUE KEY optionName (optionName, packageID) );