Fixed bug #16187: Optimize stdWrap usage for TypoScript content element CASE (Thanks...
authorSteffen Kamper <info@sk-typo3.de>
Sat, 6 Nov 2010 13:58:26 +0000 (13:58 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sat, 6 Nov 2010 13:58:26 +0000 (13:58 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9298 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/content/class.tslib_content_case.php

index a57f163..90e1710 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-11-06  Steffen Kamper  <steffen@typo3.org>
 
+       * Fixed bug #16187: Optimize stdWrap usage for TypoScript content element CASE (Thanks to Jo Hasenau)
        * Fixed bug #16261: Clearing input field using clear icon doesn't get saved. (Thanks to Peter Beernink)
        * Fixed bug #16250: prototype methods are used to determine the available viewport dimensions in ExtJS plugins
        * Fixed bug #16254: Dead logo function in backend.php
index 4ef755c..14feb12 100644 (file)
@@ -43,14 +43,15 @@ class tslib_content_Case extends tslib_content_Abstract {
         */
        public function render($conf = array()) {
                if ($this->cObj->checkIf($conf['if.'])) {
-                       if ($conf['setCurrent'] || $conf['setCurrent.']) {
-                               $this->cObj->data[$this->cObj->currentValKey] = $this->cObj->stdWrap($conf['setCurrent'], $conf['setCurrent.']);
+                       $setCurrent = isset($conf['setCurrent.']) ? $this->cObj->stdWrap($conf['setCurrent'], $conf['setCurrent.']) : $conf['setCurrent'];
+                       if($setCurrent) {
+                               $this->cObj->data[$this->cObj->currentValKey] = $setCurrent;
                        }
-                       $key = $this->cObj->stdWrap($conf['key'], $conf['key.']);
+                       $key = isset($conf['key.']) ? $this->cObj->stdWrap($conf['key'], $conf['key.']) : $conf['key'];
                        $key = strlen($conf[$key]) ? $key : 'default';
                        $name = $conf[$key];
                        $theValue = $this->cObj->cObjGetSingle($name, $conf[$key . '.'], $key);
-                       if ($conf['stdWrap.']) {
+                       if (isset($conf['stdWrap.'])) {
                                $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
                        }
                        return $theValue;