From fad5ab684d2c9c0cb2cc2a9810c4f4c607d6e342 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 23 Aug 2011 16:20:56 +0200 Subject: [PATCH] Implemented modifier fixes from pull request #133 I've omitted the pull request, since we do want to keep 'encodeJS' for better reading. Anyway, credits for this fix go to TimWolla. --- wcfsetup/install/files/acp/templates/header.tpl | 2 +- .../files/lib/system/template/TemplateEngine.class.php | 2 +- .../system/template/TemplateScriptingCompiler.class.php | 2 +- ...class.php => EncodeJSModifierTemplatePlugin.class.php} | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) rename wcfsetup/install/files/lib/system/template/plugin/{EncodejsModifierTemplatePlugin.class.php => EncodeJSModifierTemplatePlugin.class.php} (85%) diff --git a/wcfsetup/install/files/acp/templates/header.tpl b/wcfsetup/install/files/acp/templates/header.tpl index 7078500cca..2e7eef0502 100644 --- a/wcfsetup/install/files/acp/templates/header.tpl +++ b/wcfsetup/install/files/acp/templates/header.tpl @@ -18,7 +18,7 @@ diff --git a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php index 5a14c7f9df..219ef32c8a 100644 --- a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php @@ -482,7 +482,7 @@ class TemplateEngine extends SingletonFactory { * @return string class name */ public function getPluginClassName($type, $tag) { - return $this->pluginNamespace.StringUtil::firstCharToUpperCase(StringUtil::toLowerCase($tag)).StringUtil::firstCharToUpperCase(StringUtil::toLowerCase($type)).'TemplatePlugin'; + return $this->pluginNamespace.StringUtil::firstCharToUpperCase($tag).StringUtil::firstCharToUpperCase(StringUtil::toLowerCase($type)).'TemplatePlugin'; } /** diff --git a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php index b0ba8138e9..1e32b2f283 100644 --- a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php @@ -1093,7 +1093,7 @@ class TemplateScriptingCompiler { } // handle modifier name - $modifierData['name'] = StringUtil::toLowerCase($values[$i]); + $modifierData['name'] = $values[$i]; $className = $this->template->getPluginClassName('modifier', $modifierData['name']); if (class_exists($className)) { $modifierData['className'] = $className; diff --git a/wcfsetup/install/files/lib/system/template/plugin/EncodejsModifierTemplatePlugin.class.php b/wcfsetup/install/files/lib/system/template/plugin/EncodeJSModifierTemplatePlugin.class.php similarity index 85% rename from wcfsetup/install/files/lib/system/template/plugin/EncodejsModifierTemplatePlugin.class.php rename to wcfsetup/install/files/lib/system/template/plugin/EncodeJSModifierTemplatePlugin.class.php index eb517f2b82..8a5b66e763 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/EncodejsModifierTemplatePlugin.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/EncodeJSModifierTemplatePlugin.class.php @@ -4,12 +4,12 @@ use wcf\system\template\TemplateEngine; use wcf\util\StringUtil; /** - * The 'encodejs' modifier formats a string for usage in a single quoted javascript string. + * The 'encodeJS' modifier formats a string for usage in a single quoted javascript string. * Escapes single quotes and new lines. * * Usage: - * {$string|encodejs} - * {"bl''ah"|encodejs} + * {$string|encodeJS} + * {"bl''ah"|encodeJS} * * @author Marcel Werk * @copyright 2001-2011 WoltLab GmbH @@ -18,7 +18,7 @@ use wcf\util\StringUtil; * @subpackage system.template.plugin * @category Community Framework */ -class EncodejsModifierTemplatePlugin implements IModifierTemplatePlugin { +class EncodeJSModifierTemplatePlugin implements IModifierTemplatePlugin { /** * @see wcf\system\template\IModifierTemplatePlugin::execute() */ -- 2.20.1