[TASK] Fix CGL violations against DoubleQuoteUsage
authorWouter Wolters <typo3@wouterwolters.nl>
Sun, 24 Jun 2012 20:08:39 +0000 (22:08 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 28 Jun 2012 18:59:17 +0000 (20:59 +0200)
Fix CGL violations against DoubleQuoteUsage

Change-Id: I6e97a8f02130b246c4eeaa9493722a53974c0a21
Resolves: #38358
Releases: 6.0
Reviewed-on: http://review.typo3.org/12338
Reviewed-by: Oliver Klee
Reviewed-by: Andy Grunwald
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
33 files changed:
typo3/sysext/cms/layout/class.tx_cms_layout.php
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_menu.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php
typo3/sysext/cms/tslib/content/class.tslib_content_form.php
typo3/sysext/cms/tslib/showpic.php
typo3/sysext/em/classes/parser/class.tx_em_parser_extensionxmlabstractparser.php
typo3/sysext/em/classes/parser/class.tx_em_parser_extensionxmlpushparser.php
typo3/sysext/em/classes/parser/class.tx_em_parser_mirrorxmlabstractparser.php
typo3/sysext/em/classes/parser/class.tx_em_parser_mirrorxmlpushparser.php
typo3/sysext/em/classes/parser/class.tx_em_parser_xmlabstractparser.php
typo3/sysext/em/classes/repository/class.tx_em_repository_utility.php
typo3/sysext/felogin/tests/tx_feloginTest.php
typo3/sysext/form/Classes/View/Wizard/Load.php
typo3/sysext/form/Classes/View/Wizard/Save.php
typo3/sysext/indexed_search/mod/index.php
typo3/sysext/indexed_search/modfunc2/class.tx_indexedsearch_modfunc2.php
typo3/sysext/info/mod1/index.php
typo3/sysext/lowlevel/admin_cli.php
typo3/sysext/lowlevel/class.tx_lowlevel_admin_core.php
typo3/sysext/lowlevel/class.tx_lowlevel_cleaner_core.php
typo3/sysext/lowlevel/clmods/class.deleted.php
typo3/sysext/lowlevel/clmods/class.double_files.php
typo3/sysext/lowlevel/clmods/class.missing_files.php
typo3/sysext/lowlevel/clmods/class.rte_images.php
typo3/sysext/lowlevel/dbint/cli/cleaner_cli.php
typo3/sysext/lowlevel/dbint/cli/refindex_cli.php
typo3/sysext/statictemplates/ext_tables.php
typo3/sysext/sys_action/task/class.tx_sysaction_task.php
typo3/sysext/t3editor/classes/class.tx_t3editor.php
typo3/sysext/tsconfig_help/mod1/index.php
typo3/sysext/tstemplate/ts/index.php
typo3/sysext/tstemplate_info/class.tx_tstemplateinfo.php

index d313142..62c8892 100755 (executable)
@@ -818,19 +818,19 @@ class tx_cms_layout extends recordList {
 
                        if (!$GLOBALS['SOBE']->current_sys_language) {
                                if ($this->ext_CALC_PERMS & 2) {
-                                       $bArray[0] = $GLOBALS['SOBE']->doc->t3Button(t3lib_BEfunc::editOnClick('&edit[pages][' . $id . "]=edit", $this->backPath, ''), $GLOBALS['LANG']->getLL('editPageProperties'));
+                                       $bArray[0] = $GLOBALS['SOBE']->doc->t3Button(t3lib_BEfunc::editOnClick('&edit[pages][' . $id . ']=edit', $this->backPath, ''), $GLOBALS['LANG']->getLL('editPageProperties'));
                                }
                        } else {
                                if ($this->doEdit && $GLOBALS['BE_USER']->check('tables_modify', 'pages_language_overlay')) {
                                        list($languageOverlayRecord) = t3lib_BEfunc::getRecordsByField('pages_language_overlay', 'pid', $id, 'AND sys_language_uid=' . intval($GLOBALS['SOBE']->current_sys_language));
-                                       $bArray[0] = $GLOBALS['SOBE']->doc->t3Button(t3lib_BEfunc::editOnClick('&edit[pages_language_overlay][' . $languageOverlayRecord['uid'] . "]=edit", $this->backPath, ''), $GLOBALS['LANG']->getLL('editPageProperties_curLang'));
+                                       $bArray[0] = $GLOBALS['SOBE']->doc->t3Button(t3lib_BEfunc::editOnClick('&edit[pages_language_overlay][' . $languageOverlayRecord['uid'] . ']=edit', $this->backPath, ''), $GLOBALS['LANG']->getLL('editPageProperties_curLang'));
                                }
                        }
                        if ($this->ext_CALC_PERMS & 4 || $this->ext_CALC_PERMS & 2) {
-                               $bArray[1] = $GLOBALS['SOBE']->doc->t3Button("window.location.href='" . $this->backPath . "move_el.php?table=pages&uid=" . $id . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . "';", $GLOBALS['LANG']->getLL('move_page'));
+                               $bArray[1] = $GLOBALS['SOBE']->doc->t3Button("window.location.href='" . $this->backPath . 'move_el.php?table=pages&uid=' . $id . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . "';", $GLOBALS['LANG']->getLL('move_page'));
                        }
                        if ($this->ext_CALC_PERMS & 8) {
-                               $bArray[2] = $GLOBALS['SOBE']->doc->t3Button("window.location.href='" . $this->backPath . "db_new.php?id=" . $id . '&pagesOnly=1&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . "';", $GLOBALS['LANG']->getLL('newPage2'));
+                               $bArray[2] = $GLOBALS['SOBE']->doc->t3Button("window.location.href='" . $this->backPath . 'db_new.php?id=' . $id . '&pagesOnly=1&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . "';", $GLOBALS['LANG']->getLL('newPage2'));
                        }
                        if ($this->doEdit && $this->ext_function == 1) {
                                $bArray[3] = $GLOBALS['SOBE']->doc->t3Button("window.location.href='db_new_content_el.php?id=" . $id . '&sys_language_uid=' . $GLOBALS['SOBE']->current_sys_language . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . "';", $GLOBALS['LANG']->getLL('newPageContent2'));
@@ -1630,7 +1630,7 @@ class tx_cms_layout extends recordList {
                $params['pid'] = $row['pid'];
                $params['field'] = 'bodytext';
                $params['returnUrl'] = t3lib_div::linkThisScript();
-               $RTEonClick = "window.location.href='" . $this->backPath . "wizard_rte.php?" . t3lib_div::implodeArrayForUrl('', array('P' => $params)) . "';return false;";
+               $RTEonClick = "window.location.href='" . $this->backPath . 'wizard_rte.php?' . t3lib_div::implodeArrayForUrl('', array('P' => $params)) . "';return false;";
                $addButton = $this->option_showBigButtons && $this->doEdit ? $GLOBALS['SOBE']->doc->t3Button($RTEonClick, $GLOBALS['LANG']->getLL('editInRTE')) : '';
 
                return $addButton;
index 4287028..1fa4a57 100644 (file)
@@ -3725,13 +3725,13 @@ class tslib_cObj {
                        // Split $content into an array(even items in the array are outside the tags, odd numbers are tag-blocks).
                $tags = 'a|b|blockquote|body|div|em|font|form|h1|h2|h3|h4|h5|h6|i|li|map|ol|option|p|pre|sub|sup|select|span|strong|table|thead|tbody|tfoot|td|textarea|tr|u|ul|br|hr|img|input|area|link';
                        // TODO We should not crop inside <script> tags.
-               $tagsRegEx = "
+               $tagsRegEx = '
                        (
                                (?:
                                        <!--.*?-->                                      # a comment
                                )
                                |
-                               </?(?:" . $tags . ")+                   # opening tag ('<tag') or closing tag ('</tag')
+                               </?(?:' . $tags . ")+                   # opening tag ('<tag') or closing tag ('</tag')
                                (?:
                                        (?:
                                                (?:
@@ -6211,7 +6211,7 @@ class tslib_cObj {
                                        $target = '';
                                }
 
-                               $onClick = "vHWin=window.open(" . t3lib_div::quoteJSvalue($GLOBALS['TSFE']->baseUrlWrap($finalTagParts['url']), TRUE) .
+                               $onClick = 'vHWin=window.open(' . t3lib_div::quoteJSvalue($GLOBALS['TSFE']->baseUrlWrap($finalTagParts['url']), TRUE) .
                                        ",'FEopenLink','" . $JSwindowParams . "');vHWin.focus();return false;";
                                $res = '<a href="' . htmlspecialchars($finalTagParts['url']) . '"' .
                                        $target . ' onclick="' . htmlspecialchars($onClick) . '"' .
@@ -7020,12 +7020,12 @@ class tslib_cObj {
                        if (is_array($value)) {
                                foreach ($value as $Nvalue) {
                                        $JSPart .= "
-       updateForm('" . $formName . "','" . $arrPrefix . "[" . $fKey . "][]'," . t3lib_div::quoteJSvalue($Nvalue, TRUE) . ");";
+       updateForm('" . $formName . "','" . $arrPrefix . '[' . $fKey . "][]'," . t3lib_div::quoteJSvalue($Nvalue, TRUE) . ');';
                                }
 
                        } else {
                                $JSPart .= "
-       updateForm('" . $formName . "','" . $arrPrefix . "[" . $fKey . "]'," . t3lib_div::quoteJSvalue($value, TRUE) . ");";
+       updateForm('" . $formName . "','" . $arrPrefix . '[' . $fKey . "]'," . t3lib_div::quoteJSvalue($value, TRUE) . ');';
                        }
                }
                $JSPart = '<script type="text/javascript">
index 92618b2..b8efcd4 100644 (file)
@@ -2592,7 +2592,7 @@ class tslib_gmenu extends tslib_menu {
                                                // Set rollover
                                        if ($this->result['RO'][$key] && !$this->I['noLink']) {
                                                $this->I['theName'] = $this->imgNamePrefix.$this->I['uid'].$this->I['INPfix'];
-                                               $this->I['name'] = ' '.$this->nameAttribute.'="'.$this->I["theName"].'"';
+                                               $this->I['name'] = ' '.$this->nameAttribute.'="'.$this->I['theName'].'"';
                                                $this->I['linkHREF']['onMouseover']=$this->WMfreezePrefix.'over(\''.$this->I['theName'].'\');';
                                                $this->I['linkHREF']['onMouseout']=$this->WMfreezePrefix.'out(\''.$this->I['theName'].'\');';
                                                $GLOBALS['TSFE']->JSImgCode.= LF.$this->I['theName'].'_n=new Image(); '.$this->I['theName'].'_n.src = "'.$GLOBALS['TSFE']->absRefPrefix.$this->I['val']['output_file'].'"; ';
@@ -3022,10 +3022,10 @@ class tslib_jsmenu extends tslib_menu {
                        $this->JSVarName = 'eid' . $uniqueParam;
                        $this->JSMenuName = ($this->mconf['menuName'] ? $this->mconf['menuName'] : 'JSmenu' . $uniqueParam);
 
-                       $JScode="\n var ".$this->JSMenuName." = new JSmenu(".$levels.", '".$this->JSMenuName."Form');";
+                       $JScode="\n var ".$this->JSMenuName . ' = new JSmenu(' . $levels.", '".$this->JSMenuName."Form');";
 
                        for ($a = 1; $a <= $levels; $a++) {
-                               $JScode.="\n var ".$this->JSVarName.$a."=0;";
+                               $JScode .= "\n var " . $this->JSVarName . $a . '=0;';
                        }
                        $JScode.= $this->generate_level($levels, 1, $this->id, $this->menuArr, $this->MP_array).LF;
 
@@ -3139,9 +3139,9 @@ class tslib_jsmenu extends tslib_menu {
                                                // do it...
                                        if ($active || $first) {
                                                if ($count == 1) {
-                                                       $codeLines.=LF.$menuName.".openID = ".$var.$count.";";
+                                                       $codeLines .= LF . $menuName . '.openID = ' .$var.$count.';';
                                                } else {
-                                                       $codeLines.=LF.$menuName.".entry[".$parent."].openID = ".$var.$count.";";
+                                                       $codeLines .= LF . $menuName . '.entry[' . $parent . '].openID = ' . $var . $count . ';';
                                                }
                                        }
                                                // Add submenu...
index 6269652..30c60ab 100644 (file)
@@ -1003,7 +1003,7 @@ class TSpagegen {
                        $defBT = $GLOBALS['TSFE']->defaultBodyTag;
                $bodyTag = $GLOBALS['TSFE']->pSetup['bodyTag'] ? $GLOBALS['TSFE']->pSetup['bodyTag'] : $defBT;
                if ($bgImg = $GLOBALS['TSFE']->cObj->getImgResource($GLOBALS['TSFE']->pSetup['bgImg'], $GLOBALS['TSFE']->pSetup['bgImg.'])) {
-                       $bodyTag = preg_replace('/>$/', '', trim($bodyTag)) . ' background="' . $GLOBALS["TSFE"]->absRefPrefix . $bgImg[3] . '">';
+                       $bodyTag = preg_replace('/>$/', '', trim($bodyTag)) . ' background="' . $GLOBALS['TSFE']->absRefPrefix . $bgImg[3] . '">';
                }
 
                if (isset($GLOBALS['TSFE']->pSetup['bodyTagMargins'])) {
index 1e02f3f..20c4ed5 100644 (file)
@@ -321,7 +321,7 @@ class tslib_content_Form extends tslib_content_Abstract {
                                                        $default = '';
                                                }
 
-                                               $max = trim($fParts[2]) ? ' maxlength="' . t3lib_utility_Math::forceIntegerInRange($fParts[2], 1, 1000) . '"' : "";
+                                               $max = trim($fParts[2]) ? ' maxlength="' . t3lib_utility_Math::forceIntegerInRange($fParts[2], 1, 1000) . '"' : '';
                                                $theType = $confData['type'] == 'input' ? 'text' : 'password';
 
                                                $fieldCode = sprintf(
index 8572bec..efcf456 100644 (file)
@@ -157,7 +157,7 @@ class SC_tslib_showpic {
 
 <html>
 <head>
-       <title>' . htmlspecialchars($this->title ? $this->title : "Image").'</title>
+       <title>' . htmlspecialchars($this->title ? $this->title : 'Image').'</title>
        ' . ($this->title ? '' : '<meta name="robots" content="noindex,follow" />') . '
 </head>
                ' . ($this->bodyTag ? $this->bodyTag : '<body>');
index 4cdc7ba..6997bf5 100644 (file)
@@ -421,7 +421,7 @@ abstract class tx_em_Parser_ExtensionXmlAbstractParser extends tx_em_Parser_XmlA
         * @param   integer     $code  the exception code
         * @return  void
         */
-       protected function throwException($message = "", $code = 0) {
+       protected function throwException($message = '', $code = 0) {
                throw new tx_em_ExtensionXmlException(get_class($this) . ': ' . $message, $code);
        }
 
index c8c862c..7151d13 100644 (file)
@@ -94,7 +94,7 @@ class tx_em_Parser_ExtensionXmlPushParser extends tx_em_Parser_ExtensionXmlAbstr
                xml_set_element_handler($this->objXML, 'startElement', 'endElement');
                xml_set_character_data_handler($this->objXML, 'characterData');
 
-               if (!($fp = fopen($file, "r"))) {
+               if (!($fp = fopen($file, 'r'))) {
                        $this->throwException(sprintf('Unable to open file resource %s.', htmlspecialchars($file)));
                }
                while ($data = fread($fp, 4096)) {
index 6374799..7f993b4 100644 (file)
@@ -215,7 +215,7 @@ abstract class tx_em_Parser_MirrorXmlAbstractParser extends tx_em_Parser_XmlAbst
         * @param   integer     $code  the exception code.
         * @return  void
         */
-       protected function throwException($message = "", $code = 0) {
+       protected function throwException($message = '', $code = 0) {
                throw new tx_em_MirrorXmlException(get_class($this) . ': ' . $message, $code);
        }
 }
index fc55880..c540b17 100644 (file)
@@ -93,7 +93,7 @@ class tx_em_Parser_MirrorXmlPushParser extends tx_em_Parser_MirrorXmlAbstractPar
                xml_set_element_handler($this->objXML, 'startElement', 'endElement');
                xml_set_character_data_handler($this->objXML, 'characterData');
 
-               if (!($fp = fopen($file, "r"))) {
+               if (!($fp = fopen($file, 'r'))) {
                        $this->throwException(sprintf('Unable to open file resource %s.', htmlspecialchars($file)));
                }
                while ($data = fread($fp, 4096)) {
index 37045f6..4a1f0f9 100644 (file)
@@ -98,6 +98,6 @@ abstract class tx_em_Parser_XmlAbstractParser {
         * @param   integer     $code  the exception code
         * @return  void
         */
-       abstract protected function throwException($message = "", $code = 0);
+       abstract protected function throwException($message = '', $code = 0);
 }
 ?>
\ No newline at end of file
index bb71c7d..b3c85b8 100644 (file)
@@ -103,7 +103,7 @@ class tx_em_Repository_Utility implements t3lib_Singleton {
         * @param   integer     $code  the exception code.
         * @return  void
         */
-       protected function throwConnectionException($message = "", $code = 0) {
+       protected function throwConnectionException($message = '', $code = 0) {
                throw new tx_em_ConnectionException(get_class($this) . ': ' . $message, $code);
        }
 
index e4b9c74..0e4e19c 100644 (file)
@@ -195,8 +195,8 @@ class tx_feloginTest extends tx_phpunit_testcase {
                        'invalid URL, UNC path' => array('\\\\foo\\bar\\'),
                        'invalid URL, backslashes in path' => array('http://domainhostname.tld\\bla\\blupp'),
                        'invalid URL, linefeed in path' => array("http://domainhostname.tld/bla/blupp\n"),
-                       'invalid URL, only one slash after scheme' => array("http:/domainhostname.tld/bla/blupp"),
-                       'invalid URL, illegal chars' => array("http://(<>domainhostname).tld/bla/blupp"),
+                       'invalid URL, only one slash after scheme' => array('http:/domainhostname.tld/bla/blupp'),
+                       'invalid URL, illegal chars' => array('http://(<>domainhostname).tld/bla/blupp'),
 
                );
        }
index 341a095..b6c6d0d 100644 (file)
@@ -60,7 +60,7 @@ class tx_form_View_Wizard_Load extends tx_form_View_Wizard_Abstract {
                $json = json_encode($jsonArray);
 
                header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
-               header('Last-Modified: ' . gmdate( "D, d M Y H:i:s" ) . 'GMT');
+               header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT');
                header('Cache-Control: no-cache, must-revalidate');
                header('Pragma: no-cache');
                header('Content-Length: '.strlen($json));
index b82016e..4236521 100644 (file)
@@ -68,7 +68,7 @@ class tx_form_View_Wizard_Save extends tx_form_View_Wizard_Abstract {
                $json = json_encode($jsonArray);
 
                header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
-               header('Last-Modified: ' . gmdate( "D, d M Y H:i:s" ) . 'GMT');
+               header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT');
                header('Cache-Control: no-cache, must-revalidate');
                header('Pragma: no-cache');
                header('Content-Length: '.strlen($json));
index 40e538e..fd68539 100755 (executable)
@@ -357,7 +357,7 @@ class SC_mod_tools_isearch_index {
                                t3lib_BEfunc::datetime($row['item_mtime']),
                                t3lib_BEfunc::datetime($row['crdate']),
                                ($row['tstamp']!=$row['crdate'] ? t3lib_BEfunc::datetime($row['tstamp']) : ''),
-                               $row["parsetime"],
+                               $row['parsetime'],
                                $this->getNumberOfSections($row['phash']).'/'.$grListRec[0]['pcount'].'/'.$this->getNumberOfFulltext($row['phash']),
                                $row['pcount'],
                                $cHash,
@@ -451,7 +451,7 @@ class SC_mod_tools_isearch_index {
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('index_grlist.*', 'index_grlist', 'phash='.intval($phash));
                $allRows = array();
                while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                       $row["pcount"] = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
+                       $row['pcount'] = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
                        $allRows[] = $row;
                }
                return $allRows;
@@ -485,7 +485,7 @@ class SC_mod_tools_isearch_index {
                );
 
                $revTypes=array_flip($Itypes);
-               $revTypes[0]="TYPO3 page";
+               $revTypes[0] = 'TYPO3 page';
 
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*),item_type', 'index_phash', '', 'item_type', 'item_type');
                while($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res)) {
index ac6b163..41470f1 100644 (file)
@@ -157,7 +157,7 @@ class tx_indexedsearch_modfunc2 extends t3lib_extobjbase {
                }
 
                if ($i==0) {
-                       $table1='<tr class="bgColor4"><td callspan="3">'.$LANG->getLL("noresults").'</td></tr>';
+                       $table1='<tr class="bgColor4"><td callspan="3">'.$LANG->getLL('noresults').'</td></tr>';
                }
 
                $table1='<table class="bgColor5" cellpadding="2" cellspacing="1"><tr class="tableheader"><td colspan="3">'.$title.'</td></tr>'.$table1.'</table>';
index aef6220..a623da5 100755 (executable)
@@ -86,11 +86,11 @@ class SC_mod_web_info_index extends t3lib_SCbase {
                        $this->doc->tableLayout = array (
                                '0' => array (
                                        '0' => array('<td valign="top"><strong>', '</strong></td>'),
-                                       "defCol" => array('<td><img src="'.$this->doc->backPath.'clear.gif" width="10" height="1" alt="" /></td><td valign="top"><strong>', '</strong></td>')
+                                       'defCol' => array('<td><img src="'.$this->doc->backPath.'clear.gif" width="10" height="1" alt="" /></td><td valign="top"><strong>', '</strong></td>')
                                ),
-                               "defRow" => array (
-                                       "0" => array('<td valign="top">', '</td>'),
-                                       "defCol" => array('<td><img src="'.$this->doc->backPath.'clear.gif" width="10" height="1" alt="" /></td><td valign="top">', '</td>')
+                               'defRow' => array (
+                                       '0' => array('<td valign="top">', '</td>'),
+                                       'defCol' => array('<td><img src="'.$this->doc->backPath.'clear.gif" width="10" height="1" alt="" /></td><td valign="top">', '</td>')
                                )
                        );
 
index 9f80ef0..5ce65ca 100755 (executable)
@@ -8,6 +8,6 @@ require_once(t3lib_extMgm::extPath('lowlevel').'class.tx_lowlevel_admin_core.php
 
        // Call the functionality
 $adminObj = t3lib_div::makeInstance('tx_lowlevel_admin_core');
-$adminObj->cli_main($_SERVER["argv"]);
+$adminObj->cli_main($_SERVER['argv']);
 
 ?>
\ No newline at end of file
index 24f75bb..c4c0649 100644 (file)
@@ -59,8 +59,8 @@ class tx_lowlevel_admin_core extends t3lib_cli {
                $this->cli_help['name'] = 'lowlevel_admin -- Various functions for administration and maintenance of TYPO3 from the command line';
                $this->cli_help['synopsis'] = 'toolkey ###OPTIONS###';
                $this->cli_help['description'] = "The 'toolkey' keywords are:\n\n  ".implode("\n  ", array_keys($this->adminModules));
-               $this->cli_help['examples'] = "/.../cli_dispatch.phpsh lowlevel_admin setBElock --redirect=http://url_which_explains_why.com/";
-               $this->cli_help['author'] = "Kasper Skaarhoej, (c) 2009";
+               $this->cli_help['examples'] = '/.../cli_dispatch.phpsh lowlevel_admin setBElock --redirect=http://url_which_explains_why.com/';
+               $this->cli_help['author'] = 'Kasper Skaarhoej, (c) 2009';
        }
 
        /**************************
index 9331778..fa537c7 100644 (file)
@@ -76,7 +76,7 @@ class tx_lowlevel_cleaner_core extends t3lib_cli {
                $this->cli_help['synopsis'] = 'toolkey ###OPTIONS###';
                $this->cli_help['description'] = "Dispatches to various analysis and clean-up tools which can plug into the API of this script. Typically you can run tests that will take longer than the usual max execution time of PHP. Such tasks could be checking for orphan records in the page tree or flushing all published versions in the system. For the complete list of options, please explore each of the 'toolkey' keywords below:\n\n  ".implode("\n  ", array_keys($this->cleanerModules));
                $this->cli_help['examples'] = "/.../cli_dispatch.phpsh lowlevel_cleaner missing_files -s -r\nThis will show you missing files in the TYPO3 system and only report back if errors were found.";
-               $this->cli_help['author'] = "Kasper Skaarhoej, (c) 2006";
+               $this->cli_help['author'] = 'Kasper Skaarhoej, (c) 2006';
        }
 
        /**************************
index baf79ae..55dd210 100644 (file)
@@ -134,7 +134,9 @@ Although deleted records are not errors to be repaired, this tool allows you to
                                                // Return errors if any:
                                        if (count($tce->errorLog)) {
                                                echo '  ERROR from "TCEmain":'.LF.'TCEmain:'.implode(LF.'TCEmain:', $tce->errorLog);
-                                       } else echo "DONE";
+                                       } else {
+                                               echo 'DONE';
+                                       }
                                }
                                echo LF;
                        }
index 7b82345..6055a64 100644 (file)
@@ -192,7 +192,9 @@ This will check the system for double files relations.';
                                                                if ($error) {
                                                                        echo '  ERROR:  t3lib_refindex::setReferenceValue(): '.$error.LF;
                                                                        exit;
-                                                               } else echo "DONE";
+                                                               } else {
+                                                                       echo 'DONE';
+                                                               }
                                                        } else {
                                                                echo '  ERROR: File "'.$newName.'" was not created!';
                                                        }
index 5f52d0d..ec7a467 100644 (file)
@@ -153,7 +153,9 @@ This will show you missing files in the TYPO3 system and only report back if err
                                                echo '          t3lib_refindex::setReferenceValue(): '.$error.LF;
                                                echo 'missing_files: exit on error'.LF;
                                                exit;
-                                       } else echo "DONE";
+                                       } else {
+                                               echo 'DONE';
+                                       }
                                }
                                echo LF;
                        }
index 80e482a..c386cdb 100644 (file)
@@ -229,7 +229,9 @@ Reports problems with RTE images';
                                                                                                if ($error) {
                                                                                                        echo '  - ERROR:        t3lib_refindex::setReferenceValue(): '.$error.LF;
                                                                                                        exit;
-                                                                                               } else echo " - DONE";
+                                                                                               } else {
+                                                                                                       echo ' - DONE';
+                                                                                               }
                                                                                        } else {
                                                                                                echo '  - ERROR: File "'.$copyDestName.'" was not created!';
                                                                                        }
index 95de30c..bfdb41f 100755 (executable)
@@ -8,6 +8,6 @@ require_once(t3lib_extMgm::extPath('lowlevel') . 'class.tx_lowlevel_cleaner_core
 
        // Call the functionality
 $cleanerObj = t3lib_div::makeInstance('tx_lowlevel_cleaner_core');
-$cleanerObj->cli_main($_SERVER["argv"]);
+$cleanerObj->cli_main($_SERVER['argv']);
 
 ?>
\ No newline at end of file
index 6ace503..64c6948 100755 (executable)
@@ -5,17 +5,17 @@ if (!defined('TYPO3_cliMode')) {
 }
 
        // Call the functionality
-if (in_array('-e', $_SERVER["argv"]) || in_array('-c', $_SERVER["argv"])) {
-       $testOnly = in_array('-c', $_SERVER["argv"]);
+if (in_array('-e', $_SERVER['argv']) || in_array('-c', $_SERVER['argv'])) {
+       $testOnly = in_array('-c', $_SERVER['argv']);
        $refIndexObj = t3lib_div::makeInstance('t3lib_refindex');
-       list($headerContent, $bodyContent) = $refIndexObj->updateIndex($testOnly, !in_array('-s', $_SERVER["argv"]));
+       list($headerContent, $bodyContent) = $refIndexObj->updateIndex($testOnly, !in_array('-s', $_SERVER['argv']));
 } else {
-       echo "
+       echo '
 Options:
 -c = Check refindex
 -e = Update refindex
 -s = Silent
-";
+';
                exit;
 }
 ?>
\ No newline at end of file
index bd7aee8..0599bd5 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
-if (!defined("TYPO3_MODE")) {
-       die("Access denied.");
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
 }
 
        // static_template
index 2104390..f0cc4bf 100644 (file)
@@ -506,7 +506,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                $link = '<a href="' . htmlspecialchars($href) . '">' . htmlspecialchars($username) . '</a>';
 
                        // Link to delete the user record
-               $onClick = ' onClick="return confirm('.$GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL("lDelete_warning")).');"';
+               $onClick = ' onClick="return confirm('.$GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL('lDelete_warning')).');"';
                $link .= '
                                <a href="' . htmlspecialchars($href . '&delete=1') . '" ' . $onClick . '>
                                        <img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/delete_record.gif') . ' alt="" />
@@ -572,7 +572,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
 
                        // Save/update user by using TCEmain
                if (is_array($data)) {
-                       $tce = t3lib_div::makeInstance("t3lib_TCEmain");
+                       $tce = t3lib_div::makeInstance('t3lib_TCEmain');
                        $tce->stripslashes_values = 0;
                        $tce->start($data, array(), $GLOBALS['BE_USER']);
                        $tce->admin = 1;
@@ -681,7 +681,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
         * @return void
         */
        protected function JScode() {
-               $this->t3lib_TCEforms = t3lib_div::makeInstance("t3lib_TCEforms");
+               $this->t3lib_TCEforms = t3lib_div::makeInstance('t3lib_TCEforms');
                $this->t3lib_TCEforms->backPath = $GLOBALS['BACK_PATH'];
                $js = $this->t3lib_TCEforms->dbFileCon();
                $this->taskObject->doc->JScodeArray[] = $js;
@@ -791,7 +791,7 @@ class tx_sysaction_task implements tx_taskcenter_Task {
                                'title'                         => $title,
                                'description'           => t3lib_BEfunc::getRecordTitle($el['table'], $dbAnalysis->results[$el['table']][$el['id']]),
                                'descriptionHtml'       => $description,
-                               'link'                          => $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . rawurlencode(t3lib_div::getIndpEnv("REQUEST_URI")) . '&edit[' . $el['table'] . '][' . $el['id'] . ']=edit',
+                               'link'                          => $GLOBALS['BACK_PATH'] . 'alt_doc.php?returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . '&edit[' . $el['table'] . '][' . $el['id'] . ']=edit',
                                'icon'                          => t3lib_iconworks::getSpriteIconForRecord($el['table'], $dbAnalysis->results[$el['table']][$el['id']], array('title' => htmlspecialchars($path)))
                        );
                }
index 7293ce6..e669293 100644 (file)
@@ -162,7 +162,7 @@ class tx_t3editor implements t3lib_Singleton {
         */
        public function __construct() {
                        // Disable pmktextarea to avoid conflicts (thanks Peter Klein for this suggestion)
-               $GLOBALS["BE_USER"]->uc['disablePMKTextarea'] = 1;
+               $GLOBALS['BE_USER']->uc['disablePMKTextarea'] = 1;
        }
 
        /**
index 7b20a9c..681e34e 100644 (file)
@@ -196,8 +196,8 @@ class tx_tsconfighelp_module1 extends t3lib_SCbase {
                                                                                'doc/manual.sxw">manual</a>)</p>';
                                                                }
                                                        } else  {
-                                                                       // this should never happen!
-                                                               die ("Fatal error : loaded extension not actually loaded? Please file a bug report at http://bugs.typo3.org!");
+                                                                       // This should never happen!
+                                                               die('Fatal error : loaded extension not actually loaded? Please file a bug report at http://forge.typo3.org!');
                                                        }
                                                }
 
index bf7b6ae..63e0b8a 100644 (file)
@@ -470,7 +470,7 @@ class SC_mod_web_ts_index extends t3lib_SCbase {
                        $recData = array();
                        $recData['sys_template']['NEW'] = array(
                                'pid' => $actTemplateId ? -1 * $actTemplateId : $id,
-                               'title' => "+ext",
+                               'title' => '+ext',
                        );
 
                        $tce->start($recData, array());
@@ -557,16 +557,16 @@ page.10.value = HELLO WORLD!
                        static $i;
                        foreach ($pArray as $k => $v) {
                                if (t3lib_utility_Math::canBeInterpretedAsInteger($k)) {
-                                       if (isset($pArray[$k . "_"])) {
+                                       if (isset($pArray[$k . '_'])) {
                                                $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
                                                        <td nowrap><img src="clear.gif" width="1" height="1" hspace=' . ($c * 10) . ' align="top">' .
                                                        '<a href="' . t3lib_div::linkThisScript(array('id' => $k)) . '">' .
-                                                       t3lib_iconWorks::getSpriteIconForRecord('pages', t3lib_BEfunc::getRecordWSOL('pages', $k), array("title"=>'ID: ' . $k )) .
+                                                       t3lib_iconWorks::getSpriteIconForRecord('pages', t3lib_BEfunc::getRecordWSOL('pages', $k), array('title' => 'ID: ' . $k )) .
                                                        t3lib_div::fixed_lgd_cs($pArray[$k], 30) . '</a></td>
                                                        <td align="center">' . $pArray[$k . '_']['count'] . '</td>
-                                                       <td align="center" class="bgColor5">' . ($pArray[$k . '_']['root_max_val'] > 0 ? t3lib_iconWorks::getSpriteIcon('status-status-checked') : "&nbsp;") .
+                                                       <td align="center" class="bgColor5">' . ($pArray[$k . '_']['root_max_val'] > 0 ? t3lib_iconWorks::getSpriteIcon('status-status-checked') : '&nbsp;') .
                                                        '</td>
-                                                       <td align="center">' . ($pArray[$k . '_']['root_min_val'] == 0 ? t3lib_iconWorks::getSpriteIcon('status-status-checked') : "&nbsp;") .
+                                                       <td align="center">' . ($pArray[$k . '_']['root_min_val'] == 0 ? t3lib_iconWorks::getSpriteIcon('status-status-checked') : '&nbsp;') .
                                                        '</td>
                                                        </tr>';
                                                } else {
index 915049c..e98c493 100644 (file)
@@ -493,8 +493,8 @@ class tx_tstemplateinfo extends t3lib_extobjbase {
                                }
                        }
                        if ($e['config']) {
-                               $outCode='<textarea name="data[config]" rows="'.$numberOfRows.'" wrap="off" class="fixed-font enable-tab"'.$this->pObj->doc->formWidthText(48, "width:98%;height:70%", "off").' class="fixed-font">'.t3lib_div::formatForTextarea($tplRow["config"]).'</textarea>';
-                               $outCode.= '<input type="Hidden" name="e[config]" value="1">';
+                               $outCode = '<textarea name="data[config]" rows="'.$numberOfRows.'" wrap="off" class="fixed-font enable-tab"'.$this->pObj->doc->formWidthText(48, 'width:98%;height:70%', 'off').' class="fixed-font">'.t3lib_div::formatForTextarea($tplRow['config']).'</textarea>';
+                               $outCode .= '<input type="Hidden" name="e[config]" value="1">';
 
                                        // Display "Include TypoScript file content?" checkbox
                                $outCode .= t3lib_BEfunc::getFuncCheck(