[TASK] CGL violations DoubleQuoteUsage in t3lib/
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 25 May 2012 20:23:44 +0000 (22:23 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 10 Jun 2012 15:58:16 +0000 (17:58 +0200)
There are some violations against the CGL rule
"DoubleQuoteUsage" in /t3lib/. These will be
reduced by this commit.

Change-Id: I8c133a0ab6cd0638ef79148cabad378b04c985fe
Resolves: #37495
Releases: 6.0
Reviewed-on: http://review.typo3.org/11633
Reviewed-by: Oliver Klee
Tested-by: Oliver Klee
Reviewed-by: Roland Waldner
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
25 files changed:
t3lib/class.t3lib_befunc.php
t3lib/class.t3lib_clipboard.php
t3lib/class.t3lib_div.php
t3lib/class.t3lib_formmail.php
t3lib/class.t3lib_install.php
t3lib/class.t3lib_parsehtml_proc.php
t3lib/class.t3lib_positionmap.php
t3lib/class.t3lib_querygenerator.php
t3lib/class.t3lib_softrefproc.php
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_tceforms_inline.php
t3lib/class.t3lib_tcemain.php
t3lib/class.t3lib_tsparser.php
t3lib/class.t3lib_tsparser_ext.php
t3lib/class.t3lib_tsstyleconfig.php
t3lib/class.t3lib_xml.php
t3lib/config_default.php
t3lib/error/class.t3lib_error_debugexceptionhandler.php
t3lib/file/Driver/LocalDriver.php
t3lib/file/Repository/AbstractRepository.php
t3lib/file/Repository/FileRepository.php
t3lib/file/Storage.php
t3lib/mail/class.t3lib_mail_rfc822addressesparser.php
t3lib/spritemanager/class.t3lib_spritemanager_abstracthandler.php
t3lib/spritemanager/class.t3lib_spritemanager_spritegenerator.php

index 8aa7fea..4e3cee6 100644 (file)
@@ -820,7 +820,7 @@ final class t3lib_BEfunc {
 
                        // If current typeNum doesn't exist, set it to 0 (or to 1 for historical reasons, if 0 doesn't exist)
                if (!$GLOBALS['TCA'][$table]['types'][$typeNum]) {
-                       $typeNum = $GLOBALS['TCA'][$table]['types']["0"] ? 0 : 1;
+                       $typeNum = $GLOBALS['TCA'][$table]['types']['0'] ? 0 : 1;
                }
                        // Force to string. Necessary for eg '-1' to be recognized as a type value.
                $typeNum = (string)$typeNum;
@@ -1694,7 +1694,7 @@ final class t3lib_BEfunc {
                $params .= '&md5sum=' . md5($check);
 
                $url = $thumbScript . '?' . $params;
-               $th = '<img src="' . htmlspecialchars($url) . '" title="' . trim(basename($theFile)) . '"' . ($tparams ? " " . $tparams : "") . ' alt="" />';
+               $th = '<img src="' . htmlspecialchars($url) . '" title="' . trim(basename($theFile)) . '"' . ($tparams ? ' ' . $tparams : '') . ' alt="" />';
                return $th;
        }
 
@@ -2595,7 +2595,7 @@ final class t3lib_BEfunc {
         */
        public static function editOnClick($params, $backPath = '', $requestUri = '') {
                $retUrl = 'returnUrl=' . ($requestUri == -1 ? "'+T3_THIS_LOCATION+'" : rawurlencode($requestUri ? $requestUri : t3lib_div::getIndpEnv('REQUEST_URI')));
-               return "window.location.href='" . $backPath . "alt_doc.php?" . $retUrl . $params . "'; return false;";
+               return "window.location.href='" . $backPath . 'alt_doc.php?' . $retUrl . $params . "'; return false;";
        }
 
        /**
@@ -2830,7 +2830,7 @@ final class t3lib_BEfunc {
         * @return string HTML code for input text field.
         * @see getFuncMenu()
         */
-       public static function getFuncInput($mainParams, $elementName, $currentValue, $size = 10, $script = "", $addparams = "") {
+       public static function getFuncInput($mainParams, $elementName, $currentValue, $size = 10, $script = '', $addparams = '') {
                if (!is_array($mainParams)) {
                        $mainParams = array('id' => $mainParams);
                }
@@ -4222,7 +4222,7 @@ final class t3lib_BEfunc {
                                // Check if the Install Tool Password is still default: joh316
                        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword'] == md5('joh316')) {
                                $url = 'install/index.php?redirect_url=index.php' . urlencode('?TYPO3_INSTALL[type]=about');
-                               $warnings["install_password"] = sprintf(
+                               $warnings['install_password'] = sprintf(
                                        $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_password'),
                                                '<a href="' . $url . '">',
                                        '</a>');
@@ -4234,7 +4234,7 @@ final class t3lib_BEfunc {
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid, username, password', 'be_users', $where_clause);
                        if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                $url = 'alt_doc.php?returnUrl=alt_intro.php&edit[be_users][' . $row['uid'] . ']=edit';
-                               $warnings["backend_admin"] = sprintf(
+                               $warnings['backend_admin'] = sprintf(
                                        $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.backend_admin'),
                                                '<a href="' . htmlspecialchars($url) . '">',
                                        '</a>');
@@ -4254,7 +4254,7 @@ final class t3lib_BEfunc {
                                // Check if the encryption key is empty
                        if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] == '') {
                                $url = 'install/index.php?redirect_url=index.php' . urlencode('?TYPO3_INSTALL[type]=config#set_encryptionKey');
-                               $warnings["install_encryption"] = sprintf(
+                               $warnings['install_encryption'] = sprintf(
                                        $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_encryption'),
                                                '<a href="' . $url . '">',
                                        '</a>');
@@ -4271,14 +4271,14 @@ final class t3lib_BEfunc {
                        }
 
                                // Check if fileDenyPattern allows to upload .htaccess files which is dangerous on Apache
-                       if ($GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern'] != FILE_DENY_PATTERN_DEFAULT && t3lib_div::verifyFilenameAgainstDenyPattern(".htaccess")) {
+                       if ($GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern'] != FILE_DENY_PATTERN_DEFAULT && t3lib_div::verifyFilenameAgainstDenyPattern('.htaccess')) {
                                $warnings['file_deny_htaccess'] = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.file_deny_htaccess');
                        }
 
                                // Check if there are still updates to perform
                        if (!t3lib_div::compat_version(TYPO3_branch)) {
                                $url = 'install/index.php?redirect_url=index.php' . urlencode('?TYPO3_INSTALL[type]=update');
-                               $warnings["install_update"] = sprintf(
+                               $warnings['install_update'] = sprintf(
                                        $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_update'),
                                                '<a href="' . $url . '">',
                                        '</a>');
@@ -4290,7 +4290,7 @@ final class t3lib_BEfunc {
                        $lastRefIndexUpdate = $registry->get('core', 'sys_refindex_lastUpdate');
                        if (!$count && $lastRefIndexUpdate) {
                                $url = 'sysext/lowlevel/dbint/index.php?&id=0&SET[function]=refindex';
-                               $warnings["backend_reference"] = sprintf(
+                               $warnings['backend_reference'] = sprintf(
                                        $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.backend_reference_index'),
                                                '<a href="' . $url . '">',
                                        '</a>',
@@ -4488,4 +4488,4 @@ final class t3lib_BEfunc {
        }
 }
 
-?>
\ No newline at end of file
+?>
index a1804f7..ff99453 100644 (file)
@@ -273,8 +273,8 @@ class t3lib_clipboard {
                        // Delete:
                if ($elCount) {
                        if ($GLOBALS['BE_USER']->jsConfirmation(4)) {
-                               $js = "
-                       if(confirm(. $GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess.deleteClip'), $elCount)) . ")){
+                               $js = '
+                       if(confirm('. $GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess.deleteClip'), $elCount)) . ")){
                                window.location.href='" . $this->deleteUrl(0, $this->fileMode ? 1 : 0) . "&redirect='+top.rawurlencode(window.location.href);
                        }
                                        ";
@@ -472,7 +472,7 @@ class t3lib_clipboard {
                                        $lines[] = '
                                        <tr>
                                                <td class="' . $bgColClass . '">' .
-                                                       t3lib_iconWorks::getSpriteIconForRecord($table, $rec, array('style' => "margin-left: 38px;")) . '</td>
+                                                       t3lib_iconWorks::getSpriteIconForRecord($table, $rec, array('style' => 'margin-left: 38px;')) . '</td>
                                                <td class="' . $bgColClass . '" nowrap="nowrap" width="95%">&nbsp;' . htmlspecialchars(
                                                t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($table, $rec), $GLOBALS['BE_USER']->uc['titleLen'])) .
                                                        $modeData . '&nbsp;</td>
index c4ba074..5b9de23 100644 (file)
@@ -513,7 +513,7 @@ final class t3lib_div {
                        $hex = self::normalizeIPv6($hex);
                                // Replace colon to nothing
                        $hex = str_replace(':', '', $hex);
-                       $bin = pack("H*", $hex);
+                       $bin = pack('H*', $hex);
                }
                return $bin;
        }
@@ -530,7 +530,7 @@ final class t3lib_div {
                if (defined('AF_INET6')) {
                        $hex = inet_ntop($bin);
                } else {
-                       $hex = unpack("H*", $bin);
+                       $hex = unpack('H*', $bin);
                        $hex = chunk_split($hex[1], 4, ':');
                                // Strip last colon (from chunk_split)
                        $hex = substr($hex, 0, -1);
@@ -1134,9 +1134,9 @@ final class t3lib_div {
         */
        public static function slashJS($string, $extended = FALSE, $char = "'") {
                if ($extended) {
-                       $string = str_replace("\\", "\\\\", $string);
+                       $string = str_replace('\\', '\\\\', $string);
                }
-               return str_replace($char, "\\" . $char, $string);
+               return str_replace($char, '\\' . $char, $string);
        }
 
        /**
@@ -4415,7 +4415,7 @@ final class t3lib_div {
                                return $classObj;
                        } else {
                                if (!$silent) {
-                                       debug("<strong>ERROR:</strong> No class named: " . $class, 't3lib_div::getUserObj');
+                                       debug('<strong>ERROR:</strong> No class named: ' . $class, 't3lib_div::getUserObj');
                                }
                        }
                }
@@ -5434,4 +5434,4 @@ final class t3lib_div {
        }
 }
 
-?>
\ No newline at end of file
+?>
index 8d18757..78f6a30 100644 (file)
@@ -299,8 +299,8 @@ class t3lib_formmail {
                if ($this->autoRespondMessage) {
                        $theParts = explode('/', $this->autoRespondMessage, 2);
                        $theParts[0] = str_replace('###SUBJECT###', $this->subject, $theParts[0]);
-                       $theParts[1] = str_replace("/", LF, $theParts[1]);
-                       $theParts[1] = str_replace("###MESSAGE###", $this->plainContent, $theParts[1]);
+                       $theParts[1] = str_replace('/', LF, $theParts[1]);
+                       $theParts[1] = str_replace('###MESSAGE###', $this->plainContent, $theParts[1]);
 
                                /** @var $autoRespondMail t3lib_mail_Message */
                        $autoRespondMail = t3lib_div::makeInstance('t3lib_mail_Message');
index 95386ab..b2d69c5 100644 (file)
@@ -134,7 +134,7 @@ class t3lib_install {
                                                if ($quoteValue) {
                                                        $value = '\'' . $this->slashValueForSingleDashes($value) . '\'';
                                                }
-                                               $line_array[$k] = $mainparts[0] . $variable . " = " . $value . ";       " . ('//' . $comment . str_replace($comment, '', $subparts[1]));
+                                               $line_array[$k] = $mainparts[0] . $variable . ' = ' . $value . ';       ' . ('//' . $comment . str_replace($comment, '', $subparts[1]));
                                                $this->touchedLine = count($line_array) - $k - 1;
                                                $found = 1;
                                                break;
@@ -152,7 +152,7 @@ class t3lib_install {
                                                if ($quoteValue) {
                                                        $value = '\'' . $this->slashValueForSingleDashes($value) . '\'';
                                                }
-                                               $line_array[$k] = $mainparts[0] . $variable . " = " . $value . ";       " . ('//' . $comment . str_replace($comment, '', $subparts[1]));
+                                               $line_array[$k] = $mainparts[0] . $variable . ' = ' . $value . ';       ' . ('//' . $comment . str_replace($comment, '', $subparts[1]));
                                                $this->touchedLine = count($line_array) - $k - 1;
                                                $found = 1;
                                                break;
@@ -169,7 +169,7 @@ class t3lib_install {
                        if ($quoteValue) {
                                $value = '\'' . $this->slashValueForSingleDashes($value) . '\'';
                        }
-                       $line_array[] = $variable . " = " . $value . "; // " . $comment;
+                       $line_array[] = $variable . ' = ' . $value . '; // ' . $comment;
                        if (!$hasEndToken) {
                                $line_array[] = '';
                                $line_array[] = $this->localconf_endEditPointToken;
@@ -179,7 +179,7 @@ class t3lib_install {
                if ($variable == '$typo_db_password') {
                        $this->messages[] = 'Updated ' . $variable;
                } else {
-                       $this->messages[] = $variable . " = " . htmlspecialchars($value);
+                       $this->messages[] = $variable . ' = ' . htmlspecialchars($value);
                }
                $this->setLocalconf = 1;
        }
@@ -480,7 +480,7 @@ class t3lib_install {
                                        $out[] = '
                                        <tr>
                                                <td valign="top"></td>
-                                               <td nowrap="nowrap" style="color:#666666;">' . nl2br((!$cVfullMsg ? "Current value: " : "") . '<em>' . $currentValue[$key] . '</em>') . '</td>
+                                               <td nowrap="nowrap" style="color:#666666;">' . nl2br((!$cVfullMsg ? 'Current value: ' : '') . '<em>' . $currentValue[$key] . '</em>') . '</td>
                                        </tr>';
                                }
                        }
index 2108022..1afecc9 100644 (file)
@@ -141,10 +141,10 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                                return "ERROR: Editfile '" . $SW_relpath . "' did not exist";
                                        }
                                } else {
-                                       return "ERROR: Edit file name could not be found or was bad.";
+                                       return 'ERROR: Edit file name could not be found or was bad.';
                                }
                        } else {
-                               return "ERROR: staticFileEditPath was not set, not set correctly or did not exist!";
+                               return 'ERROR: staticFileEditPath was not set, not set correctly or did not exist!';
                        }
                }
        }
index 7897659..cdc19bf 100644 (file)
@@ -331,11 +331,11 @@ class t3lib_positionMap {
         * @return string HTML content.
         */
        function insertQuadLines($codes, $allBlank = FALSE) {
-               $codeA = t3lib_div::trimExplode(',', $codes . ",line", 1);
+               $codeA = t3lib_div::trimExplode(',', $codes . ',line', 1);
 
                $lines = array();
                foreach ($codeA as $code) {
-                       if ($code == "blank" || $allBlank) {
+                       if ($code == 'blank' || $allBlank) {
                                $lines[] = '<img src="clear.gif" width="18" height="8" align="top" alt="" />';
                        } else {
                                $lines[] = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/ol/halfline.gif', 'width="18" height="8"') . ' align="top" alt="" />';
@@ -591,4 +591,4 @@ class t3lib_positionMap {
        }
 }
 
-?>
\ No newline at end of file
+?>
index 4f53a6f..408fd53 100644 (file)
@@ -954,7 +954,7 @@ class t3lib_queryGenerator {
        function mkOperatorSelect($name, $op, $draw, $submit) {
                if ($draw) {
                        $out = '<select name="' . $name . '[operator]"' . ($submit ? ' onChange="submit();"' : '') . '>'; //
-                       $out .= '<option value="AND"' . (!$op || $op == "AND" ? ' selected' : '') . '>' . $this->lang["AND"] . '</option>';
+                       $out .= '<option value="AND"' . (!$op || $op == 'AND' ? ' selected' : '') . '>' . $this->lang['AND'] . '</option>';
                        $out .= '<option value="OR"' . ($op == 'OR' ? ' selected' : '') . '>' . $this->lang['OR'] . '</option>';
                        $out .= '</select>';
                } else {
index 3c3de35..8df2ccc 100644 (file)
@@ -431,7 +431,7 @@ class t3lib_softrefproc {
                $resultArray = array();
 
                        // Email:
-               $parts = preg_split("/([^[:alnum:]]+)([A-Za-z0-9\._-]+[@][A-Za-z0-9\._-]+[\.].[A-Za-z0-9]+)/", ' ' . $content . ' ', 10000, PREG_SPLIT_DELIM_CAPTURE);
+               $parts = preg_split('/([^[:alnum:]]+)([A-Za-z0-9\._-]+[@][A-Za-z0-9\._-]+[\.].[A-Za-z0-9]+)/', ' ' . $content . ' ', 10000, PREG_SPLIT_DELIM_CAPTURE);
                foreach ($parts as $idx => $value) {
                        if ($idx % 3 == 2) {
 
@@ -553,7 +553,7 @@ class t3lib_softrefproc {
        function fileadminReferences($content, &$elements) {
 
                        // Fileadmin files are found
-               $parts = preg_split("/([^[:alnum:]]+)(" . $this->fileAdminDir . "\/[^[:space:]\"'<>]*)/", ' ' . $content . ' ', 10000, PREG_SPLIT_DELIM_CAPTURE);
+               $parts = preg_split('/([^[:alnum:]]+)(' . $this->fileAdminDir . "\/[^[:space:]\"'<>]*)/", ' ' . $content . ' ', 10000, PREG_SPLIT_DELIM_CAPTURE);
 
                        // Traverse files:
                foreach ($parts as $idx => $value) {
index 9e135bc..f2ce579 100644 (file)
@@ -483,7 +483,7 @@ class t3lib_TCEforms {
                                                                                $out_array[$out_sheet] = array();
                                                                                $out_array_meta[$out_sheet]['title'] = $this->sL($parts[1]);
                                                                                        // Register newline for Tab
-                                                                               $out_array_meta[$out_sheet]['newline'] = ($parts[2] == "newline");
+                                                                               $out_array_meta[$out_sheet]['newline'] = ($parts[2] == 'newline');
                                                                        }
                                                                } else { // Setting alternative title for "General" tab if "--div--" is the very first element.
                                                                        $out_array_meta[$out_sheet]['title'] = $this->sL($parts[1]);
@@ -3270,7 +3270,7 @@ class t3lib_TCEforms {
 
                        // If current typeNum doesn't exist, set it to 0 (or to 1 for historical reasons, if 0 doesn't exist)
                if (!$GLOBALS['TCA'][$table]['types'][$typeNum]) {
-                       $typeNum = $GLOBALS['TCA'][$table]['types']["0"] ? 0 : 1;
+                       $typeNum = $GLOBALS['TCA'][$table]['types']['0'] ? 0 : 1;
                }
                        // Force to string. Necessary for eg '-1' to be recognized as a type value.
                $typeNum = (string)$typeNum;
index 35ae087..efb458a 100644 (file)
@@ -712,7 +712,7 @@ class t3lib_TCEforms_inline {
                                // If this is a virtual record offer a minimized set of icons for user interaction:
                } elseif ($isVirtualRecord) {
                        if ($enabledControls['localize'] && isset($rec['__create'])) {
-                               $onClick = "inline.synchronizeLocalizeRecords('" . $nameObjectFt . "', " . $rec['uid'] . ");";
+                               $onClick = "inline.synchronizeLocalizeRecords('" . $nameObjectFt . "', " . $rec['uid'] . ');';
                                $cells['localize'] = '<a href="#" onclick="' . htmlspecialchars($onClick) . '">' .
                                                                        t3lib_iconWorks::getSpriteIcon('actions-document-localize', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:localize', TRUE))) .
                                                                        '</a>';
@@ -1357,7 +1357,7 @@ class t3lib_TCEforms_inline {
                        $row = $this->getRecord($this->inlineFirstPid, $current['table'], $item);
                        $selectedValue = ($foreignSelector ? "'" . $row[$foreignSelector] . "'" : 'null');
                        $data .= $this->renderForeignRecord($parent['uid'], $row, $parent['config']);
-                       $jsonArrayScriptCall[] = "inline.memorizeAddRecord('" . $nameObjectForeignTable . "', '" . $item . "', null, " . $selectedValue . ");";
+                       $jsonArrayScriptCall[] = "inline.memorizeAddRecord('" . $nameObjectForeignTable . "', '" . $item . "', null, " . $selectedValue . ');';
                                // Remove possible virtual records in the form which showed that a child records could be localized:
                        if (isset($row[$transOrigPointerField]) && $row[$transOrigPointerField]) {
                                $jsonArrayScriptCall[] = "inline.fadeAndRemove('" . $nameObjectForeignTable . self::Structure_Separator . $row[$transOrigPointerField] . '_div' . "');";
index 40ce834..9a7ccf3 100644 (file)
@@ -601,7 +601,7 @@ class t3lib_TCEmain {
                                                                        $this->addDefaultPermittedLanguageIfNotSet($table, $incomingFieldArray);
                                                                        $recordAccess = $this->BE_USER->recordEditAccessInternals($table, $incomingFieldArray, TRUE);
                                                                        if (!$recordAccess) {
-                                                                               $this->newlog("recordEditAccessInternals() check failed. [" . $this->BE_USER->errorMsg . "]", 1);
+                                                                               $this->newlog('recordEditAccessInternals() check failed. [' . $this->BE_USER->errorMsg . ']', 1);
                                                                        } elseif (!$this->bypassWorkspaceRestrictions) {
                                                                                        // Workspace related processing:
                                                                                        // If LIVE records cannot be created in the current PID due to workspace restrictions, prepare creation of placeholder-record
@@ -635,7 +635,7 @@ class t3lib_TCEmain {
                                                                $recordAccess = $this->BE_USER->recordEditAccessInternals($table, $id);
                                                                if (!$recordAccess) {
                                                                        $propArr = $this->getRecordProperties($table, $id);
-                                                                       $this->newlog("recordEditAccessInternals() check failed. [" . $this->BE_USER->errorMsg . "]", 1);
+                                                                       $this->newlog('recordEditAccessInternals() check failed. [' . $this->BE_USER->errorMsg . ']', 1);
                                                                } else { // Here we fetch the PID of the record that we point to...
                                                                        $tempdata = $this->recordInfo($table, $id, 'pid' .
                                                                                ($GLOBALS['TCA'][$table]['ctrl']['versioningWS'] ? ',t3ver_wsid,t3ver_stage' : '')
@@ -1899,15 +1899,15 @@ class t3lib_TCEmain {
                        foreach ($actionCMDs as $key => $value) {
                                if ($key == '_ACTION') {
                                                // First, check if there are "commands":
-                                       if (current($actionCMDs[$key]) !== "") {
+                                       if (current($actionCMDs[$key]) !== '') {
                                                asort($actionCMDs[$key]);
                                                $newValueArray = array();
                                                foreach ($actionCMDs[$key] as $idx => $order) {
-                                                       if (substr($idx, 0, 3) == "ID-") {
+                                                       if (substr($idx, 0, 3) == 'ID-') {
                                                                $idx = $this->newIndexMap[$idx];
                                                        }
                                                                // Just one reflection here: It is clear that when removing elements from a flexform, then we will get lost files unless we act on this delete operation by traversing and deleting files that were referred to.
-                                                       if ($order != "DELETE") {
+                                                       if ($order != 'DELETE') {
                                                                $newValueArray[$idx] = $valueArray[$idx];
                                                        }
                                                        unset($valueArray[$idx]);
@@ -2361,7 +2361,7 @@ class t3lib_TCEmain {
                                                                                        // If element is added dynamically in the flexform of TCEforms, we map the ID-string to the next numerical index we can have in that particular section of elements:
                                                                                        // The fact that the order changes is not important since order is controlled by a separately submitted index.
 
-                                                                               if (substr($ik, 0, 3) == "ID-") {
+                                                                               if (substr($ik, 0, 3) == 'ID-') {
                                                                                        $newIndexCounter++;
                                                                                                // Set mapping index
                                                                                        $this->newIndexMap[$ik] = (is_array($dataValues_current[$key]['el']) && count($dataValues_current[$key]['el']) ? max(array_keys($dataValues_current[$key]['el'])) : 0) + $newIndexCounter;
@@ -3538,7 +3538,7 @@ class t3lib_TCEmain {
                                        $this->log($table, $uid, 4, 0, 1, "Attempt to move record '%s' (%s) without having permissions to do so.", 14, array($propArr['header'], $table . ':' . $uid), $propArr['event_pid']);
                                }
                        } else {
-                               $this->log($table, $uid, 4, 0, 1, "Attempt to move record '%s' (%s) without having permissions to do so. [" . $this->BE_USER->errorMsg . "]", 14, array($propArr['header'], $table . ':' . $uid), $propArr['event_pid']);
+                               $this->log($table, $uid, 4, 0, 1, 'Attempt to move record "%s" (%s) without having permissions to do so. [' . $this->BE_USER->errorMsg . ']', 14, array($propArr['header'], $table . ':' . $uid), $propArr['event_pid']);
                        }
                }
        }
index 95526d4..56c4ee9 100644 (file)
@@ -186,7 +186,7 @@ class t3lib_TSparser {
                        $lineP = $this->rawP;
                        $this->rawP++;
                        if ($this->syntaxHighLight) {
-                               $this->regHighLight("prespace", $lineP, strlen($line));
+                               $this->regHighLight('prespace', $lineP, strlen($line));
                        }
 
                                // Breakpoint?
@@ -207,7 +207,7 @@ class t3lib_TSparser {
                                                // Multiline ends...
                                        if (substr($line, 0, 1) == ')') {
                                                if ($this->syntaxHighLight) {
-                                                       $this->regHighLight("operator", $lineP, strlen($line) - 1);
+                                                       $this->regHighLight('operator', $lineP, strlen($line) - 1);
                                                }
                                                        // Disable multiline
                                                $this->multiLineEnabled = 0;
@@ -227,20 +227,20 @@ class t3lib_TSparser {
                                                }
                                        } else {
                                                if ($this->syntaxHighLight) {
-                                                       $this->regHighLight("value", $lineP);
+                                                       $this->regHighLight('value', $lineP);
                                                }
                                                $this->multiLineValue[] = $this->raw[($this->rawP - 1)];
                                        }
                                } elseif ($this->inBrace == 0 && substr($line, 0, 1) == '[') { // Beginning of condition (only on level zero compared to brace-levels
                                        if ($this->syntaxHighLight) {
-                                               $this->regHighLight("condition", $lineP);
+                                               $this->regHighLight('condition', $lineP);
                                        }
                                        return $line;
                                } else {
                                                // Return if GLOBAL condition is set - no matter what.
                                        if (substr($line, 0, 1) == '[' && strtoupper(trim($line)) == '[GLOBAL]') {
                                                if ($this->syntaxHighLight) {
-                                                       $this->regHighLight("condition", $lineP);
+                                                       $this->regHighLight('condition', $lineP);
                                                }
                                                $this->error('Line ' . ($this->lineNumberOffset + $this->rawP - 1) . ': On return to [GLOBAL] scope, the script was short of ' . $this->inBrace . ' end brace(s)', 1);
                                                $this->inBrace = 0;
@@ -250,7 +250,7 @@ class t3lib_TSparser {
                                                $varL = strcspn($line, ' {=<>:(');
                                                $objStrName = trim(substr($line, 0, $varL));
                                                if ($this->syntaxHighLight) {
-                                                       $this->regHighLight("objstr", $lineP, strlen(substr($line, $varL)));
+                                                       $this->regHighLight('objstr', $lineP, strlen(substr($line, $varL)));
                                                }
                                                if (strlen($objStrName)) {
                                                        $r = array();
@@ -259,10 +259,10 @@ class t3lib_TSparser {
                                                        } else {
                                                                $line = ltrim(substr($line, $varL));
                                                                if ($this->syntaxHighLight) {
-                                                                       $this->regHighLight("objstr_postspace", $lineP, strlen($line));
+                                                                       $this->regHighLight('objstr_postspace', $lineP, strlen($line));
                                                                        if (strlen($line) > 0) {
-                                                                               $this->regHighLight("operator", $lineP, strlen($line) - 1);
-                                                                               $this->regHighLight("operator_postspace", $lineP, strlen(ltrim(substr($line, 1))));
+                                                                               $this->regHighLight('operator', $lineP, strlen($line) - 1);
+                                                                               $this->regHighLight('operator_postspace', $lineP, strlen(ltrim(substr($line, 1))));
                                                                        }
                                                                }
 
@@ -363,7 +363,7 @@ class t3lib_TSparser {
                                                                        break;
                                                                        case '<':
                                                                                if ($this->syntaxHighLight) {
-                                                                                       $this->regHighLight("value_copy", $lineP, strlen(ltrim(substr($line, 1))) - strlen(trim(substr($line, 1))));
+                                                                                       $this->regHighLight('value_copy', $lineP, strlen(ltrim(substr($line, 1))) - strlen(trim(substr($line, 1))));
                                                                                }
                                                                                $theVal = trim(substr($line, 1));
                                                                                if (substr($theVal, 0, 1) == '.') {
@@ -375,7 +375,7 @@ class t3lib_TSparser {
                                                                        break;
                                                                        case '>':
                                                                                if ($this->syntaxHighLight) {
-                                                                                       $this->regHighLight("value_unset", $lineP, strlen(ltrim(substr($line, 1))) - strlen(trim(substr($line, 1))));
+                                                                                       $this->regHighLight('value_unset', $lineP, strlen(ltrim(substr($line, 1))) - strlen(trim(substr($line, 1))));
                                                                                }
                                                                                $this->setVal($objStrName, $setup, 'UNSET');
                                                                        break;
@@ -390,7 +390,7 @@ class t3lib_TSparser {
                                                $this->inBrace--;
                                                $this->lastComment = '';
                                                if ($this->syntaxHighLight) {
-                                                       $this->regHighLight("operator", $lineP, strlen($line) - 1);
+                                                       $this->regHighLight('operator', $lineP, strlen($line) - 1);
                                                }
                                                if ($this->inBrace < 0) {
                                                        $this->error('Line ' . ($this->lineNumberOffset + $this->rawP - 1) . ': An end brace is in excess.', 1);
@@ -400,7 +400,7 @@ class t3lib_TSparser {
                                                }
                                        } else {
                                                if ($this->syntaxHighLight) {
-                                                       $this->regHighLight("comment", $lineP);
+                                                       $this->regHighLight('comment', $lineP);
                                                }
 
                                                        // Comment. The comments are concatenated in this temporary string:
@@ -414,7 +414,7 @@ class t3lib_TSparser {
                                // Unset comment
                        if ($this->commentSet) {
                                if ($this->syntaxHighLight) {
-                                       $this->regHighLight("comment", $lineP);
+                                       $this->regHighLight('comment', $lineP);
                                }
                                if (substr($line, 0, 2) == '*/') {
                                        $this->commentSet = 0;
@@ -903,4 +903,4 @@ class t3lib_TSparser {
        }
 }
 
-?>
\ No newline at end of file
+?>
index a998e29..dff2108 100644 (file)
@@ -346,7 +346,7 @@ class t3lib_tsparser_ext extends t3lib_TStemplate {
                                } else {
                                        $aHref = 'index.php?id=' . $GLOBALS['SOBE']->id .
                                                        '&tsbr[' . $depth . ']=' . ($deeper ? 0 : 1) .
-                                                       (t3lib_div::_GP("breakPointLN") ? '&breakPointLN=' . t3lib_div::_GP("breakPointLN") : '') .
+                                                       (t3lib_div::_GP('breakPointLN') ? '&breakPointLN=' . t3lib_div::_GP('breakPointLN') : '') .
                                                        '#' . $goto;
                                        $HTML .= '<a name="' . $goto . '" href="' . htmlspecialchars($aHref) . '">' . $theIcon . '</a>';
                                }
@@ -359,7 +359,7 @@ class t3lib_tsparser_ext extends t3lib_TStemplate {
                                        if ($this->linkObjects) {
                                                $aHref = 'index.php?id=' . $GLOBALS['SOBE']->id .
                                                                '&sObj=' . $depth .
-                                                               (t3lib_div::_GP("breakPointLN") ? '&breakPointLN=' . t3lib_div::_GP("breakPointLN") : '');
+                                                               (t3lib_div::_GP('breakPointLN') ? '&breakPointLN=' . t3lib_div::_GP('breakPointLN') : '');
                                                if ($this->bType != 'const') {
                                                        $ln = is_array($arr[$key . '.ln..']) ? 'Defined in: ' . $this->lineNumberToScript($arr[$key . '.ln..']) : 'N/A';
                                                } else {
@@ -703,7 +703,7 @@ class t3lib_tsparser_ext extends t3lib_TStemplate {
         * @return string
         */
        function ext_lnBreakPointWrap($lineNumber, $str) {
-               return '<a href="#" id="line-' . $lineNumber . '" onClick="return brPoint(' . $lineNumber . ',' . ($this->ext_lineNumberOffset_mode == "setup" ? 1 : 0) . ');">' . $str . '</a>';
+               return '<a href="#" id="line-' . $lineNumber . '" onClick="return brPoint(' . $lineNumber . ',' . ($this->ext_lineNumberOffset_mode == 'setup' ? 1 : 0) . ');">' . $str . '</a>';
        }
 
        /**
@@ -1394,18 +1394,18 @@ class t3lib_tsparser_ext extends t3lib_TStemplate {
                                                $deleteIconHTML = t3lib_iconWorks::getSpriteIcon(
                                                        'actions-edit-undo',
                                                        array(
-                                                               'class' => "typo3-tstemplate-ceditor-control undoIcon",
-                                                               'alt' => "Revert to default Constant",
-                                                               'title' => "Revert to default Constant",
+                                                               'class' => 'typo3-tstemplate-ceditor-control undoIcon',
+                                                               'alt' => 'Revert to default Constant',
+                                                               'title' => 'Revert to default Constant',
                                                                'rel' => $params['name']
                                                        )
                                                );
                                                $editIconHTML = t3lib_iconWorks::getSpriteIcon(
                                                        'actions-document-open',
                                                        array(
-                                                               'class' => "typo3-tstemplate-ceditor-control editIcon",
-                                                               'alt' => "Edit this Constant",
-                                                               'title' => "Edit this Constant",
+                                                               'class' => 'typo3-tstemplate-ceditor-control editIcon',
+                                                               'alt' => 'Edit this Constant',
+                                                               'title' => 'Edit this Constant',
                                                                'rel' => $params['name']
                                                        )
                                                );
index e638390..eaeddfc 100644 (file)
@@ -41,14 +41,13 @@ class t3lib_tsStyleConfig extends t3lib_tsparser_ext {
                // Internal
        var $categories = array();
        var $ext_dontCheckIssetValues = 1;
-       var $ext_CEformName = "tsStyleConfigForm";
+       var $ext_CEformName = 'tsStyleConfigForm';
        var $ext_noCEUploadAndCopying = 1;
        var $ext_printAll = 1;
        var $ext_defaultOnlineResourceFlag = 1;
 
        var $ext_incomingValues = array();
 
-
        /**
         * @param string $configTemplate
         * @param string $pathRel PathRel is the path relative to the typo3/ directory
@@ -89,7 +88,7 @@ class t3lib_tsStyleConfig extends t3lib_tsparser_ext {
 
                foreach ($theConstants as $k => $p) {
                        if (isset($this->objReg[$k])) {
-                               $theConstants[$k]["value"] = $this->ext_realValues[$k];
+                               $theConstants[$k]['value'] = $this->ext_realValues[$k];
                        }
                }
 
@@ -131,7 +130,7 @@ class t3lib_tsStyleConfig extends t3lib_tsparser_ext {
         * @param boolean Adds opening <form> tag to the ouput, if TRUE
         * @return string The form
         */
-       function ext_getForm($cat, $theConstants, $script = "", $addFields = "", $extKey = "", $addFormTag = TRUE) {
+       function ext_getForm($cat, $theConstants, $script = '', $addFields = '', $extKey = '', $addFormTag = TRUE) {
                $this->ext_makeHelpInformationForCategory($cat);
                $printFields = trim($this->ext_printFields($theConstants, $cat));
 
@@ -151,7 +150,7 @@ class t3lib_tsStyleConfig extends t3lib_tsparser_ext {
                                $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tsfe.xml:update', TRUE) . '" id="configuration-submit-' . htmlspecialchars($extKey) . '" />';
 
                $example = $this->ext_displayExample();
-               $content .= $example ? '<hr/>' . $example : "";
+               $content .= $example ? '<hr/>' . $example : '';
 
                return $content;
        }
@@ -162,10 +161,10 @@ class t3lib_tsStyleConfig extends t3lib_tsparser_ext {
         * @return      [type]          ...
         */
        function ext_displayExample() {
-               if ($this->helpConfig["imagetag"] || $this->helpConfig["description"] || $this->helpConfig["header"]) {
-                       $out = '<div align="center">' . $this->helpConfig["imagetag"] . '</div><BR>' .
-                               ($this->helpConfig["description"] ? implode(explode("//", $this->helpConfig["description"]), "<BR>") . "<BR>" : "") .
-                               ($this->helpConfig["bulletlist"] ? "<ul><li>" . implode(explode("//", $this->helpConfig["bulletlist"]), "<li>") . "</ul>" : "<BR>");
+               if ($this->helpConfig['imagetag'] || $this->helpConfig['description'] || $this->helpConfig['header']) {
+                       $out = '<div align="center">' . $this->helpConfig['imagetag'] . '</div><BR>' .
+                               ($this->helpConfig['description'] ? implode(explode('//', $this->helpConfig['description']), '<BR>') . '<BR>' : '') .
+                               ($this->helpConfig['bulletlist'] ? '<ul><li>' . implode(explode('//', $this->helpConfig['bulletlist']), '<li>') . '</ul>' : '<BR>');
                }
                return $out;
        }
@@ -177,7 +176,7 @@ class t3lib_tsStyleConfig extends t3lib_tsparser_ext {
         * @return      [type]          ...
         */
        function ext_mergeIncomingWithExisting($arr) {
-               $parseObj = t3lib_div::makeInstance("t3lib_TSparser");
+               $parseObj = t3lib_div::makeInstance('t3lib_TSparser');
                $parseObj->parse(implode(LF, $this->ext_incomingValues));
                $arr2 = $parseObj->setup;
                return t3lib_div::array_merge_recursive_overrule($arr, $arr2);
@@ -208,12 +207,12 @@ class t3lib_tsStyleConfig extends t3lib_tsparser_ext {
         * @return      [type]          ...
         */
        function ext_fNandV($params) {
-               $fN = 'data[' . $params["name"] . ']';
-               $fV = $params["value"] = isset($this->ext_realValues[$params["name"]]) ? $this->ext_realValues[$params["name"]] : $params["default_value"];
+               $fN = 'data[' . $params['name'] . ']';
+               $fV = $params['value'] = isset($this->ext_realValues[$params['name']]) ? $this->ext_realValues[$params['name']] : $params['default_value'];
                $reg = array();
                        // Values entered from the constantsedit cannot be constants!
                if (preg_match('/^\{[\$][a-zA-Z0-9\.]*\}$/', trim($fV), $reg)) {
-                       $fV = "";
+                       $fV = '';
                }
                $fV = htmlspecialchars($fV);
 
@@ -227,7 +226,7 @@ class t3lib_tsStyleConfig extends t3lib_tsparser_ext {
         * @return      [type]          ...
         */
        function ext_loadResources($absPath) {
-               $this->ext_readDirResources($GLOBALS["TYPO3_CONF_VARS"]["MODS"]["web_ts"]["onlineResourceDir"]);
+               $this->ext_readDirResources($GLOBALS['TYPO3_CONF_VARS']['MODS']['web_ts']['onlineResourceDir']);
                if (is_dir($absPath)) {
                        $absPath = rtrim($absPath, '/');
                        $this->readDirectory($absPath);
@@ -243,7 +242,7 @@ class t3lib_tsStyleConfig extends t3lib_tsparser_ext {
         * @return      [type]          ...
         */
        function ext_putValueInConf($key, $var) {
-               $this->ext_incomingValues[$key] = $key . "=" . $var;
+               $this->ext_incomingValues[$key] = $key . '=' . $var;
        }
 
        /**
index 719467c..f64c801 100644 (file)
@@ -200,7 +200,7 @@ class t3lib_xml {
         * @return void
         */
        function addRecord($table, $row) {
-               $this->lines[] = $this->Icode . '<' . $table . ' uid="' . $row["uid"] . '">';
+               $this->lines[] = $this->Icode . '<' . $table . ' uid="' . $row['uid'] . '">';
                $this->indent(1);
                $this->getRowInXML($table, $row);
                $this->indent(0);
index f8a200e..5c4b473 100644 (file)
@@ -1019,8 +1019,8 @@ if (($displayErrors = intval($TYPO3_CONF_VARS['SYS']['displayErrors'])) != '-1')
 
 
        // Set PHP memory limit depending on value of $TYPO3_CONF_VARS["SYS"]["setMemoryLimit"]
-if(intval($TYPO3_CONF_VARS["SYS"]["setMemoryLimit"])>16) {
-       @ini_set('memory_limit',intval($TYPO3_CONF_VARS["SYS"]["setMemoryLimit"]).'m');
+if(intval($TYPO3_CONF_VARS['SYS']['setMemoryLimit']) > 16) {
+       @ini_set('memory_limit', intval($TYPO3_CONF_VARS['SYS']['setMemoryLimit']) . 'm');
 }
 
 
index 3279034..993b3c8 100644 (file)
@@ -142,8 +142,8 @@ class t3lib_error_DebugExceptionHandler extends t3lib_error_AbstractExceptionHan
                $this->writeLogEntries($exception, self::CONTEXT_CLI);
 
                echo "\nUncaught TYPO3 Exception " . $exceptionCodeNumber . $exception->getMessage() . LF;
-               echo "thrown in file " . $filePathAndName . LF;
-               echo "in line " . $exception->getLine() . "\n\n";
+               echo 'thrown in file ' . $filePathAndName . LF;
+               echo 'in line ' . $exception->getLine() . "\n\n";
        }
 
        /**
@@ -228,4 +228,4 @@ class t3lib_error_DebugExceptionHandler extends t3lib_error_AbstractExceptionHan
        }
 }
 
-?>
\ No newline at end of file
+?>
index 02b5159..d2448c9 100644 (file)
@@ -328,7 +328,7 @@ class t3lib_file_Driver_LocalDriver extends t3lib_file_Driver_AbstractDriver {
                $realPath = rtrim($this->absoluteBasePath . trim($path, '/'), '/') . '/';
 
                if (!is_dir($realPath)) {
-                       throw new InvalidArgumentException('Cannot list items in directory ' . $path. ' - does not exist or is no directory', 1314349666);
+                       throw new InvalidArgumentException('Cannot list items in directory ' . $path . ' - does not exist or is no directory', 1314349666);
                }
 
                if ($start > 0) {
@@ -625,7 +625,7 @@ class t3lib_file_Driver_LocalDriver extends t3lib_file_Driver_AbstractDriver {
                        // as for the "virtual storage" for backwards-compatibility, this check always fails, as the file probably lies under PATH_site
                        // thus, it is not checked here
                if (t3lib_div::isFirstPartOfStr($localFilePath, $this->absoluteBasePath) && $this->storage->getUid() > 0) {
-                       throw new InvalidArgumentException("Cannot add a file that is already part of this storage.", 1314778269);
+                       throw new InvalidArgumentException('Cannot add a file that is already part of this storage.', 1314778269);
                }
 
                $relativeTargetPath = ltrim($targetFolder->getIdentifier(), '/');
@@ -967,7 +967,7 @@ class t3lib_file_Driver_LocalDriver extends t3lib_file_Driver_AbstractDriver {
 
                // The target should not exist already
                if ($this->fileExists($newIdentifier)) {
-                       throw new t3lib_file_exception_ExistingTargetFileNameException("The target file already exists.", 1320291063);
+                       throw new t3lib_file_exception_ExistingTargetFileNameException('The target file already exists.', 1320291063);
                }
 
                $sourcePath = $this->getAbsolutePath($file);
@@ -1049,7 +1049,7 @@ class t3lib_file_Driver_LocalDriver extends t3lib_file_Driver_AbstractDriver {
 
                $result = unlink($filePath);
                if ($result === FALSE) {
-                       throw new RuntimeException("Deletion of file " . $file->getIdentifier() . " failed.", 1320855304);
+                       throw new RuntimeException('Deletion of file ' . $file->getIdentifier() . ' failed.', 1320855304);
                }
 
                return $result;
index 9f3276d..30f521a 100644 (file)
@@ -190,7 +190,7 @@ abstract class t3lib_file_Repository_AbstractRepository implements Tx_Extbase_Pe
         */
        public function findByUid($uid) {
                if (!is_numeric($uid)) {
-                       throw new InvalidArgumentException("uid has to be numeric.", 1316779798);
+                       throw new InvalidArgumentException('uid has to be numeric.', 1316779798);
                }
 
                $row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', $this->table, 'uid=' . intval($uid) . ' AND deleted=0');
index e44dadc..11ee474 100644 (file)
@@ -237,7 +237,7 @@ class t3lib_file_Repository_FileRepository extends t3lib_file_Repository_Abstrac
                $fileReferenceObject = FALSE;
 
                if (!is_numeric($uid)) {
-                       throw new InvalidArgumentException("uid of record has to be numeric.", 1316889798);
+                       throw new InvalidArgumentException('uid of record has to be numeric.', 1316889798);
                }
 
                $row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
index 12c0835..60358be 100644 (file)
@@ -1134,7 +1134,7 @@ class t3lib_file_Storage {
 
                        // Makes sure this is an uploaded file
                if (!is_uploaded_file($localFilePath)) {
-                       throw new t3lib_file_exception_UploadException("The upload has failed, no uploaded file found!", 1322110455);
+                       throw new t3lib_file_exception_UploadException('The upload has failed, no uploaded file found!', 1322110455);
                }
 
                        // Max upload size (kb) for files.
index 438a1e1..68e0b95 100644 (file)
@@ -592,7 +592,7 @@ class t3lib_mail_Rfc822AddressesParser {
                }
 
                foreach ($comments as $comment) {
-                       $mailbox = str_replace("($comment)", '', $mailbox);
+                       $mailbox = str_replace('(' . $comment . ')', '', $mailbox);
                }
 
                $mailbox = trim($mailbox);
index 87f79bf..033a60a 100644 (file)
@@ -50,7 +50,7 @@ abstract class t3lib_spritemanager_AbstractHandler implements t3lib_spritemanage
         * path to CSS file for generated styles
         * @var string
         */
-       protected $cssTcaFile = "";
+       protected $cssTcaFile = '';
 
        /**
         * constructor just init's the temp-file-name
index 8cfc3fd..f11eb7c 100644 (file)
@@ -557,7 +557,7 @@ class t3lib_spritemanager_SpriteGenerator {
         * @return array
         */
        protected function explodeSizeTag($tag = '') {
-               $size = t3lib_div::trimExplode("x", $tag);
+               $size = t3lib_div::trimExplode('x', $tag);
                return array(
                        'width' => $size[0],
                        'height' => $size[1]