Fixed bug #12872: Use "strong" instead of "b": typo3/sysext/
[Packages/TYPO3.CMS.git] / typo3 / wizard_forms.php
old mode 100755 (executable)
new mode 100644 (file)
index 97ad8d7..14220a7
@@ -291,8 +291,8 @@ class SC_wizard_forms {
 
                        // Close
                        $buttons['close'] = '<a href="#" onclick="' . htmlspecialchars('jumpToUrl(unescape(\'' . rawurlencode($this->P['returnUrl']) . '\')); return false;') . '">' .
-                               '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/closedok.gif') . ' class="c-inputButton" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', 1) . '" alt="" />' .
-                               '</a>';
+                               t3lib_iconWorks::getSpriteIcon('actions-document-close', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', TRUE))) . 
+                 '</a>';
 
                        // Save
                        $buttons['save'] = '<input type="image" class="c-inputButton" name="savedok"' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/savedok.gif') . ' title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc', 1) . '" />';
@@ -400,9 +400,8 @@ class SC_wizard_forms {
                                $row = t3lib_BEfunc::getRecord($this->P['table'],$this->P['uid']);
 
                                        // If the save/close button was pressed, then redirect the screen:
-                               if ($_POST['saveandclosedok_x'])        {
-                                       header('Location: '.t3lib_div::locationHeaderUrl($this->P['returnUrl']));
-                                       exit;
+                               if ($_POST['saveandclosedok_x']) {
+                                       t3lib_utility_Http::redirect($this->P['returnUrl']);
                                }
                        }
                } else {        // If nothing has been submitted, load the $bodyText variable from the selected database row:
@@ -801,7 +800,7 @@ class SC_wizard_forms {
 
                                                // Default:
                                        if ($vv['type']=='select' || $vv['type']=='radio')      {
-                                               $thisLine[2]=str_replace(chr(10),', ',str_replace(',','',$vv['options']));
+                                               $thisLine[2]=str_replace(LF,', ',str_replace(',','',$vv['options']));
                                        } elseif ($vv['type']=='check') {
                                                if ($vv['default'])     $thisLine[2]=1;
                                        } elseif (strcmp(trim($vv['default']),'')) {
@@ -811,11 +810,11 @@ class SC_wizard_forms {
                                }
 
                                        // Compile the final line:
-                               $inLines[]=ereg_replace("[\n\r]*",'',implode(' | ',$thisLine));
+                               $inLines[]=preg_replace("/[\n\r]*/",'',implode(' | ',$thisLine));
                        }
                }
                        // Finally, implode the lines into a string, and return it:
-               return implode(chr(10),$inLines);
+               return implode(LF,$inLines);
        }
 
        /**
@@ -828,7 +827,7 @@ class SC_wizard_forms {
        function cfgString2CfgArray($cfgStr)    {
 
                        // Traverse the number of form elements:
-               $tLines=explode(chr(10),$cfgStr);
+               $tLines=explode(LF,$cfgStr);
                foreach($tLines as $k => $v)    {
 
                                // Initialize:
@@ -857,7 +856,7 @@ class SC_wizard_forms {
 
                                if ($confData['type'])  {
                                        if (count($typeParts)==1)       {
-                                               $confData['fieldname'] = substr(ereg_replace('[^a-zA-Z0-9_]','',str_replace(' ','_',trim($parts[0]))),0,30);
+                                               $confData['fieldname'] = substr(preg_replace('/[^a-zA-Z0-9_]/','',str_replace(' ','_',trim($parts[0]))),0,30);
 
                                                        // Attachment names...
                                                if ($confData['type']=='file')  {
@@ -871,7 +870,7 @@ class SC_wizard_forms {
                                        switch((string)$confData['type'])       {
                                                case 'select':
                                                case 'radio':
-                                                       $confData['default'] = implode(chr(10),t3lib_div::trimExplode(',',$parts[2]));
+                                                       $confData['default'] = implode(LF,t3lib_div::trimExplode(',',$parts[2]));
                                                break;
                                                default:
                                                        $confData['default'] = trim($parts[2]);