[BUGFIX ] CGL violations FunctionCallArgumentSpacing in /typo3/sysext/cms/
authorRoland Waldner <most.wanted@gmx.at>
Sat, 26 May 2012 11:18:57 +0000 (13:18 +0200)
committerGeorg Ringer <mail@ringerge.org>
Fri, 1 Jun 2012 06:35:23 +0000 (08:35 +0200)
There were violations against the CGL rule
"FunctionCallArgumentSpacingNoSpaceAfterComma" in /typo3/sysext/cms/.
These will be reduced by this commit.

Change-Id: I7b2f9f6e4aa3638046658bd59dd2ec51b7243d81
Resolves: #37500
Releases: 6.0
Reviewed-on: http://review.typo3.org/11639
Reviewed-by: Oliver Klee
Tested-by: Oliver Klee
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
31 files changed:
typo3/sysext/cms/ext_tables.php
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/layout/db_new_content_el.php
typo3/sysext/cms/tbl_cms.php
typo3/sysext/cms/tbl_tt_content.php
typo3/sysext/cms/tslib/class.tslib_adminpanel.php
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_feuserauth.php
typo3/sysext/cms/tslib/class.tslib_gifbuilder.php
typo3/sysext/cms/tslib/class.tslib_menu.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php
typo3/sysext/cms/tslib/class.tslib_pibase.php
typo3/sysext/cms/tslib/class.tslib_search.php
typo3/sysext/cms/tslib/content/class.tslib_content_content.php
typo3/sysext/cms/tslib/content/class.tslib_content_contenttable.php
typo3/sysext/cms/tslib/content/class.tslib_content_flowplayer.php
typo3/sysext/cms/tslib/content/class.tslib_content_form.php
typo3/sysext/cms/tslib/index_ts.php
typo3/sysext/cms/tslib/media/scripts/example_callfunction.php
typo3/sysext/cms/tslib/media/scripts/example_itemArrayProcFunc.php
typo3/sysext/cms/tslib/media/scripts/example_keepRollover.php
typo3/sysext/cms/tslib/media/scripts/example_languageMenu.php
typo3/sysext/cms/tslib/media/scripts/example_typolinkpop.php
typo3/sysext/cms/tslib/media/scripts/gmenu_foldout.php
typo3/sysext/cms/tslib/media/scripts/gmenu_layers.php
typo3/sysext/cms/tslib/media/scripts/testscript_EXT.php
typo3/sysext/cms/tslib/media/scripts/tmenu_layers.php
typo3/sysext/cms/tslib/showpic.php
typo3/sysext/cms/web_info/class.tx_cms_webinfo.php
typo3/sysext/cms/web_info/class.tx_cms_webinfo_lang.php

index fa50120..cf38e08 100755 (executable)
@@ -3,9 +3,9 @@ if (!defined ('TYPO3_MODE'))    die ('Access denied.');
 
 
 if (TYPO3_MODE == 'BE') {
-       t3lib_extMgm::addModule('web','layout','top',t3lib_extMgm::extPath($_EXTKEY).'layout/');
-       t3lib_extMgm::addLLrefForTCAdescr('_MOD_web_layout','EXT:cms/locallang_csh_weblayout.xml');
-       t3lib_extMgm::addLLrefForTCAdescr('_MOD_web_info','EXT:cms/locallang_csh_webinfo.xml');
+       t3lib_extMgm::addModule('web', 'layout', 'top', t3lib_extMgm::extPath($_EXTKEY).'layout/');
+       t3lib_extMgm::addLLrefForTCAdescr('_MOD_web_layout', 'EXT:cms/locallang_csh_weblayout.xml');
+       t3lib_extMgm::addLLrefForTCAdescr('_MOD_web_info', 'EXT:cms/locallang_csh_webinfo.xml');
 
        t3lib_extMgm::insertModuleFunction(
                'web_info',
index 333e7b1..97abc60 100755 (executable)
@@ -43,13 +43,13 @@ require($BACK_PATH.'template.php');
 $LANG->includeLLFile('EXT:cms/layout/locallang.xml');
 require_once(PATH_typo3.'class.db_list.inc');
 require_once('class.tx_cms_layout.php');
-$BE_USER->modAccess($MCONF,1);
+$BE_USER->modAccess($MCONF, 1);
 
 // Will open up records locked by current user. It's assumed that the locking should end if this script is hit.
 t3lib_BEfunc::lockRecords();
 
 // Exits if 'cms' extension is not loaded:
-t3lib_extMgm::isLoaded('cms',1);
+t3lib_extMgm::isLoaded('cms', 1);
 
 
 
@@ -79,7 +79,7 @@ class ext_posMap extends t3lib_positionMap {
         * @param       array           The record row.
         * @return      string          Wrapped title string.
         */
-       function wrapRecordTitle($str,$row) {
+       function wrapRecordTitle($str, $row) {
                $aOnClick = 'jumpToUrl(\''.$GLOBALS['SOBE']->local_linkThisScript(array('edit_record'=>'tt_content:'.$row['uid'])).'\');return false;';
                return '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$str.'</a>';
        }
@@ -92,7 +92,7 @@ class ext_posMap extends t3lib_positionMap {
         * @return      string
         * @see printRecordMap()
         */
-       function wrapColumnHeader($str,$vv) {
+       function wrapColumnHeader($str, $vv) {
                $aOnClick = 'jumpToUrl(\''.$GLOBALS['SOBE']->local_linkThisScript(array('edit_record'=>'_EDIT_COL:'.$vv)).'\');return false;';
                return '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$str.'</a>';
        }
@@ -123,9 +123,9 @@ class ext_posMap extends t3lib_positionMap {
         * @param       array           Record array.
         * @return      string          HTML content
         */
-       function wrapRecordHeader($str,$row) {
+       function wrapRecordHeader($str, $row) {
                if ($row['uid']==$this->moveUid) {
-                       return '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/content_client.gif','width="7" height="10"').' alt="" />'.$str;
+                       return '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/content_client.gif', 'width="7" height="10"').' alt="" />'.$str;
                } else return $str;
        }
 }
@@ -223,7 +223,7 @@ class SC_db_layout {
                $this->externalTables = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['cms']['db_layout']['addTables'];
 
                        // Load page info array:
-               $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
+               $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
 
                        // Initialize menu
                $this->menuConfig();
@@ -310,9 +310,9 @@ class SC_db_layout {
 
                        // page/be_user TSconfig settings and blinding of menu-items
                $this->modSharedTSconfig = t3lib_BEfunc::getModTSconfig($this->id, 'mod.SHARED');
-               $this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id,'mod.'.$this->MCONF['name']);
+               $this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id, 'mod.'.$this->MCONF['name']);
                if ($this->modTSconfig['properties']['QEisDefault'])    ksort($this->MOD_MENU['function']);
-               $this->MOD_MENU['function'] = t3lib_BEfunc::unsetMenuItems($this->modTSconfig['properties'],$this->MOD_MENU['function'],'menu.function');
+               $this->MOD_MENU['function'] = t3lib_BEfunc::unsetMenuItems($this->modTSconfig['properties'], $this->MOD_MENU['function'], 'menu.function');
 
                if (!$this->modTSconfig['properties']['disablePageInformation']) {
                        $this->MOD_MENU['function'][3] = $GLOBALS['LANG']->getLL('pageInformation');
@@ -346,7 +346,7 @@ class SC_db_layout {
                if ($this->clear_cache) {
                        $tce = t3lib_div::makeInstance('t3lib_TCEmain');
                        $tce->stripslashes_values=0;
-                       $tce->start(Array(),Array());
+                       $tce->start(Array(), Array());
                        $tce->clear_cacheCmd($this->id);
                }
        }
@@ -478,13 +478,13 @@ class SC_db_layout {
                        $this->doc->form='<form action="'.htmlspecialchars('db_layout.php?id='.$this->id.'&imagemode='.$this->imagemode).'" method="post">';
 
                                // Creating the top function menu:
-                       $this->topFuncMenu = t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'],'db_layout.php','');
-                       $this->languageMenu = (count($this->MOD_MENU['language'])>1 ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.language',1) . t3lib_BEfunc::getFuncMenu($this->id,'SET[language]',$this->current_sys_language,$this->MOD_MENU['language'],'db_layout.php','') : '');
+                       $this->topFuncMenu = t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'], 'db_layout.php', '');
+                       $this->languageMenu = (count($this->MOD_MENU['language'])>1 ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.language', 1) . t3lib_BEfunc::getFuncMenu($this->id, 'SET[language]', $this->current_sys_language, $this->MOD_MENU['language'], 'db_layout.php', '') : '');
 
                                // Find columns
-                       $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->id,'mod.SHARED');             // SHARED page-TSconfig settings.
-                       $this->colPosList = strcmp(trim($this->modTSconfig['properties']['tt_content.']['colPos_list']),'') ? trim($this->modTSconfig['properties']['tt_content.']['colPos_list']) : $modTSconfig_SHARED['properties']['colPos_list'];
-                       if (!strcmp($this->colPosList,'')) {
+                       $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->id, 'mod.SHARED');            // SHARED page-TSconfig settings.
+                       $this->colPosList = strcmp(trim($this->modTSconfig['properties']['tt_content.']['colPos_list']), '') ? trim($this->modTSconfig['properties']['tt_content.']['colPos_list']) : $modTSconfig_SHARED['properties']['colPos_list'];
+                       if (!strcmp($this->colPosList, '')) {
                                $backendLayout = t3lib_div::callUserFunction( 'EXT:cms/classes/class.tx_cms_backendlayout.php:tx_cms_BackendLayout->getSelectedBackendLayout', $this->id, $this );
 
                                if(count($backendLayout['__colPosList'])) {
@@ -494,7 +494,7 @@ class SC_db_layout {
                        if( !strcmp($this->colPosList, '') ){
                                $this->colPosList = '1,0,2,3';
                        }
-                       $this->colPosList = implode(',', array_unique(t3lib_div::intExplode(',',$this->colPosList)));           // Removing duplicates, if any
+                       $this->colPosList = implode(',', array_unique(t3lib_div::intExplode(',', $this->colPosList)));          // Removing duplicates, if any
 
                                // Render the primary module content:
                        if ($this->MOD_SETTINGS['function']==0) {
@@ -638,7 +638,7 @@ class SC_db_layout {
                $edit_record = $this->edit_record;
 
                        // If a command to edit all records in a column is issue, then select all those elements, and redirect to alt_doc.php:
-               if (substr($edit_record,0,9)=='_EDIT_COL') {
+               if (substr($edit_record, 0, 9)=='_EDIT_COL') {
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                                                '*',
                                                'tt_content',
@@ -678,7 +678,7 @@ class SC_db_layout {
                $is_selected=0;
                $languageOverlayRecord='';
                if ($this->current_sys_language) {
-                       list($languageOverlayRecord) = t3lib_BEfunc::getRecordsByField('pages_language_overlay','pid',$this->id,'AND sys_language_uid='.intval($this->current_sys_language));
+                       list($languageOverlayRecord) = t3lib_BEfunc::getRecordsByField('pages_language_overlay', 'pid', $this->id, 'AND sys_language_uid='.intval($this->current_sys_language));
                }
                if (is_array($languageOverlayRecord)) {
                        $inValue = 'pages_language_overlay:'.$languageOverlayRecord['uid'];
@@ -714,7 +714,7 @@ class SC_db_layout {
                                        }
                                        $first = 0;
                                }
-                               if (strcmp($cRow['colPos'],$colPos)) {
+                               if (strcmp($cRow['colPos'], $colPos)) {
                                        $colPos=$cRow['colPos'];
                                        $opt[]='<option value=""></option>';
                                        $opt[] = '<option value="_EDIT_COL:' . $colPos . '">__' . $GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'colPos', $colPos), 1) . ':__</option>';
@@ -750,7 +750,7 @@ class SC_db_layout {
 
 
                        // Splitting the edit-record cmd value into table/uid:
-               $this->eRParts = explode(':',$edit_record);
+               $this->eRParts = explode(':', $edit_record);
 
 
 
@@ -771,7 +771,7 @@ class SC_db_layout {
                unset($R_URL_getvars['popView']);
                unset($R_URL_getvars['new_unique_uid']);
                $R_URL_getvars['edit_record']=$edit_record;
-               $this->R_URI = $R_URL_parts['path'].'?'.t3lib_div::implodeArrayForUrl('',$R_URL_getvars);
+               $this->R_URI = $R_URL_parts['path'].'?'.t3lib_div::implodeArrayForUrl('', $R_URL_getvars);
 
                        // Setting close url/return url for exiting this script:
                $this->closeUrl = $this->local_linkThisScript(array('SET'=>array('function'=>1)));      // Goes to 'Columns' view if close is pressed (default)
@@ -789,11 +789,11 @@ class SC_db_layout {
                $this->editSelect = '<select name="edit_record" onchange="' . htmlspecialchars('jumpToUrl(\'db_layout.php?id=' . $this->id . '&edit_record=\'+escape(this.options[this.selectedIndex].value)' . $retUrlStr . ',this);') . '">' . implode('', $opt) . '</select>';
 
                        // Creating editing form:
-               if ($GLOBALS['BE_USER']->check('tables_modify',$this->eRParts[0]) && $edit_record
+               if ($GLOBALS['BE_USER']->check('tables_modify', $this->eRParts[0]) && $edit_record
                        && (($this->eRParts[0] !== 'pages' && $this->EDIT_CONTENT) || ($this->eRParts[0] === 'pages' && ($this->CALC_PERMS&1)))) {
 
                                // Splitting uid parts for special features, if new:
-                       list($uidVal,$ex_pid,$ex_colPos) = explode('/',$this->eRParts[1]);
+                       list($uidVal, $ex_pid, $ex_colPos) = explode('/', $this->eRParts[1]);
 
                                // Convert $uidVal to workspace version if any:
                        if ($uidVal!='new') {
@@ -811,7 +811,7 @@ class SC_db_layout {
                        );
                        $trData->disableRTE = $this->MOD_SETTINGS['disableRTE'];
                        $trData->lockRecords=1;
-                       $trData->fetchRecord($this->eRParts[0],($uidVal=='new'?$this->id:$uidVal),$uidVal);     // 'new'
+                       $trData->fetchRecord($this->eRParts[0], ($uidVal=='new'?$this->id:$uidVal), $uidVal);   // 'new'
 
                                // Getting/Making the record:
                        reset($trData->regTableItems_data);
@@ -854,8 +854,8 @@ class SC_db_layout {
 
                                        // Render form, wrap it:
                                $panel='';
-                               $panel.=$tceforms->getMainFields($this->eRParts[0],$rec);
-                               $panel=$tceforms->wrapTotal($panel,$rec,$this->eRParts[0]);
+                               $panel.=$tceforms->getMainFields($this->eRParts[0], $rec);
+                               $panel=$tceforms->wrapTotal($panel, $rec, $this->eRParts[0]);
 
                                        // Add hidden fields:
                                $theCode=$panel;
@@ -894,29 +894,29 @@ class SC_db_layout {
 
                        // Bottom controls (function menus):
                $q_count = $this->getNumberOfHiddenElements();
-               $h_func_b= t3lib_BEfunc::getFuncCheck($this->id,'SET[tt_content_showHidden]',$this->MOD_SETTINGS['tt_content_showHidden'],'db_layout.php','','id="checkTt_content_showHidden"').
+               $h_func_b= t3lib_BEfunc::getFuncCheck($this->id, 'SET[tt_content_showHidden]', $this->MOD_SETTINGS['tt_content_showHidden'], 'db_layout.php', '', 'id="checkTt_content_showHidden"').
                                        '<label for="checkTt_content_showHidden">' .
                                        (!$q_count ? $GLOBALS['TBE_TEMPLATE']->dfw($GLOBALS['LANG']->getLL('hiddenCE', 1)) : $GLOBALS['LANG']->getLL('hiddenCE', 1) .
                                        ' (' . $q_count . ')') . '</label>';
 
                $h_func_b.= '<br />'.
-                                       t3lib_BEfunc::getFuncCheck($this->id,'SET[showPalettes]',$this->MOD_SETTINGS['showPalettes'],'db_layout.php','','id="checkShowPalettes"').
+                                       t3lib_BEfunc::getFuncCheck($this->id, 'SET[showPalettes]', $this->MOD_SETTINGS['showPalettes'], 'db_layout.php', '', 'id="checkShowPalettes"').
                                        '<label for="checkShowPalettes">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPalettes', 1) . '</label>';
 
                if (t3lib_extMgm::isLoaded('context_help') && $GLOBALS['BE_USER']->uc['edit_showFieldHelp'] !== 'text') {
                        $h_func_b.= '<br />'.
-                                               t3lib_BEfunc::getFuncCheck($this->id,'SET[showDescriptions]',$this->MOD_SETTINGS['showDescriptions'],'db_layout.php','','id="checkShowDescriptions"').
+                                               t3lib_BEfunc::getFuncCheck($this->id, 'SET[showDescriptions]', $this->MOD_SETTINGS['showDescriptions'], 'db_layout.php', '', 'id="checkShowDescriptions"').
                                                '<label for="checkShowDescriptions">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showDescriptions', 1) . '</label>';
                }
 
                if ($GLOBALS['BE_USER']->isRTE()) {
                        $h_func_b.= '<br />'.
-                                               t3lib_BEfunc::getFuncCheck($this->id,'SET[disableRTE]',$this->MOD_SETTINGS['disableRTE'],'db_layout.php','','id="checkDisableRTE"').
+                                               t3lib_BEfunc::getFuncCheck($this->id, 'SET[disableRTE]', $this->MOD_SETTINGS['disableRTE'], 'db_layout.php', '', 'id="checkDisableRTE"').
                                                '<label for="checkDisableRTE">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.disableRTE', 1) . '</label>';
                }
 
                        // Add the function menus to bottom:
-               $content.=$this->doc->section('',$h_func_b,0,0);
+               $content.=$this->doc->section('', $h_func_b, 0, 0);
                $content.=$this->doc->spacer(10);
 
 
@@ -931,7 +931,7 @@ class SC_db_layout {
                                // CSH:
                        $HTMLcode.= t3lib_BEfunc::cshItem($this->descrTable, 'quickEdit_selElement', $GLOBALS['BACK_PATH'], '|<br />');
 
-                       $HTMLcode.=$posMap->printContentElementColumns($this->id,$this->eRParts[1],$this->colPosList,$this->MOD_SETTINGS['tt_content_showHidden'],$this->R_URI);
+                       $HTMLcode.=$posMap->printContentElementColumns($this->id, $this->eRParts[1], $this->colPosList, $this->MOD_SETTINGS['tt_content_showHidden'], $this->R_URI);
 
                        $content.=$this->doc->spacer(20);
                        $content.=$this->doc->section($GLOBALS['LANG']->getLL('CEonThisPage'), $HTMLcode, 0, 1);
@@ -942,7 +942,7 @@ class SC_db_layout {
                if (count($tceforms->commentMessages)) {
                        $content.='
        <!-- TCEFORM messages
-       '.htmlspecialchars(implode(LF,$tceforms->commentMessages)).'
+       '.htmlspecialchars(implode(LF, $tceforms->commentMessages)).'
        -->
        ';
                }
@@ -963,7 +963,7 @@ class SC_db_layout {
                $dblist->no_noWrap = 1;
                $dblist->descrTable = $this->descrTable;
 
-               $this->pointer = t3lib_utility_Math::forceIntegerInRange($this->pointer,0,100000);
+               $this->pointer = t3lib_utility_Math::forceIntegerInRange($this->pointer, 0, 100000);
                $dblist->script = 'db_layout.php';
                $dblist->showIcon = 0;
                $dblist->setLMargin=0;
@@ -972,7 +972,7 @@ class SC_db_layout {
 
                $dblist->agePrefixes = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears');
                $dblist->id = $this->id;
-               $dblist->nextThree = t3lib_utility_Math::forceIntegerInRange($this->modTSconfig['properties']['editFieldsAtATime'],0,10);
+               $dblist->nextThree = t3lib_utility_Math::forceIntegerInRange($this->modTSconfig['properties']['editFieldsAtATime'], 0, 10);
                $dblist->option_showBigButtons = ($this->modTSconfig['properties']['disableBigButtons'] === '0');
                $dblist->option_newWizard = $this->modTSconfig['properties']['disableNewContentElementWizard'] ? 0 : 1;
                $dblist->defLangBinding = $this->modTSconfig['properties']['defLangBinding'] ? 1 : 0;
@@ -1024,10 +1024,10 @@ class SC_db_layout {
                                                $colList[] = $temp[1];
                                        }
                                } else {        // ... should be impossible that colPos has no array. But this is the fallback should it make any sense:
-                                       $colList = array('1','0','2','3');
+                                       $colList = array('1', '0', '2', '3');
                                }
-                               if (strcmp($this->colPosList,'')) {
-                                       $colList = array_intersect(t3lib_div::intExplode(',',$this->colPosList),$colList);
+                               if (strcmp($this->colPosList, '')) {
+                                       $colList = array_intersect(t3lib_div::intExplode(',', $this->colPosList), $colList);
                                }
 
                                        // If only one column found, display the single-column view.
@@ -1035,7 +1035,7 @@ class SC_db_layout {
                                        $dblist->tt_contentConfig['single'] = 1;        // Boolean: If set, the content of column(s) $this->tt_contentConfig['showSingleCol'] is shown in the total width of the page
                                        $dblist->tt_contentConfig['showSingleCol'] = current($colList); // The column(s) to show if single mode (under each other)
                                }
-                               $dblist->tt_contentConfig['cols'] = implode(',',$colList);              // The order of the rows: Default is left(1), Normal(0), right(2), margin(3)
+                               $dblist->tt_contentConfig['cols'] = implode(',', $colList);             // The order of the rows: Default is left(1), Normal(0), right(2), margin(3)
                                $dblist->tt_contentConfig['showHidden'] = $this->MOD_SETTINGS['tt_content_showHidden'];
                                $dblist->tt_contentConfig['sys_language_uid'] = intval($this->current_sys_language);
 
@@ -1056,7 +1056,7 @@ class SC_db_layout {
 
                                // Start the dblist object:
                        $dblist->itemsLimitSingleTable = 1000;
-                       $dblist->start($this->id,$table,$this->pointer,$this->search_field,$this->search_levels,$this->showLimit);
+                       $dblist->start($this->id, $table, $this->pointer, $this->search_field, $this->search_levels, $this->showLimit);
                        $dblist->counter = $CMcounter;
                        $dblist->ext_function = $this->MOD_SETTINGS['function'];
 
@@ -1206,7 +1206,7 @@ class SC_db_layout {
                                // Move record
                        if (t3lib_utility_Math::canBeInterpretedAsInteger($this->eRParts[1])) {
                                $buttons['move_record'] = '<a href="' . htmlspecialchars($GLOBALS['BACK_PATH'] . 'move_el.php?table=' . $this->eRParts[0] . '&uid=' . $this->eRParts[1] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
-                                               t3lib_iconWorks::getSpriteIcon('actions-' . ($this->eRParts[0] == 'tt_content' ? 'document' : 'page') . '-move',array('class'=>'c-inputButton','title' => $GLOBALS['LANG']->getLL('move_' . ($this->eRParts[0] == 'tt_content' ? 'record' : 'page'), 1))) .
+                                               t3lib_iconWorks::getSpriteIcon('actions-' . ($this->eRParts[0] == 'tt_content' ? 'document' : 'page') . '-move', array('class'=>'c-inputButton','title' => $GLOBALS['LANG']->getLL('move_' . ($this->eRParts[0] == 'tt_content' ? 'record' : 'page'), 1))) .
                                                '</a>';
                        }
                                // Edit page properties
index 0a7e2fb..fc9a120 100644 (file)
@@ -48,10 +48,10 @@ unset($MLANG);
 $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_misc.xml');
 $LOCAL_LANG_orig = $LOCAL_LANG;
 $LANG->includeLLFile('EXT:cms/layout/locallang_db_new_content_el.xml');
-$LOCAL_LANG = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG_orig,$LOCAL_LANG);
+$LOCAL_LANG = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG_orig, $LOCAL_LANG);
 
        // Exits if 'cms' extension is not loaded:
-t3lib_extMgm::isLoaded('cms',1);
+t3lib_extMgm::isLoaded('cms', 1);
 
 
 
@@ -76,7 +76,7 @@ class ext_posMap extends t3lib_positionMap {
         * @param       array           The record row.
         * @return      string          Wrapped title string.
         */
-       function wrapRecordTitle($str,$row) {
+       function wrapRecordTitle($str, $row) {
                return $str;
        }
 
@@ -90,7 +90,7 @@ class ext_posMap extends t3lib_positionMap {
         * @param       integer         System language
         * @return      string
         */
-       function onClickInsertRecord($row,$vv,$moveUid,$pid,$sys_lang=0) {
+       function onClickInsertRecord($row, $vv, $moveUid, $pid, $sys_lang=0) {
                $table='tt_content';
 
                $location=$this->backPath.'alt_doc.php?edit[tt_content]['.(is_array($row)?-$row['uid']:$pid).']=new&defVals[tt_content][colPos]='.$vv.'&defVals[tt_content][sys_language_uid]='.$sys_lang.'&returnUrl='.rawurlencode($GLOBALS['SOBE']->R_URI);
@@ -180,7 +180,7 @@ class SC_db_new_content_el {
 
                        // Getting the current page and receiving access information (used in main())
                $perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
-               $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$perms_clause);
+               $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $perms_clause);
                $this->access = is_array($this->pageinfo) ? 1 : 0;
        }
 
@@ -332,19 +332,19 @@ class SC_db_new_content_el {
                        if (!$this->onClickEvent) {
 
                                        // Add anchor "sel2"
-                               $this->content.= $this->doc->section('','<a name="sel2"></a>');
+                               $this->content.= $this->doc->section('', '<a name="sel2"></a>');
                                $this->content.= $this->doc->spacer(20);
 
                                        // Select position
                                $code = $GLOBALS['LANG']->getLL('sel2', 1) . '<br /><br />';
 
                                        // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable:
-                               $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->id,'mod.SHARED');
-                               $colPosList = strcmp(trim($modTSconfig_SHARED['properties']['colPos_list']),'') ? trim($modTSconfig_SHARED['properties']['colPos_list']) : '1,0,2,3';
-                               $colPosList = implode(',',array_unique(t3lib_div::intExplode(',',$colPosList)));                // Removing duplicates, if any
+                               $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->id, 'mod.SHARED');
+                               $colPosList = strcmp(trim($modTSconfig_SHARED['properties']['colPos_list']), '') ? trim($modTSconfig_SHARED['properties']['colPos_list']) : '1,0,2,3';
+                               $colPosList = implode(',', array_unique(t3lib_div::intExplode(',', $colPosList)));              // Removing duplicates, if any
 
                                        // Finally, add the content of the column selector to the content:
-                               $code.= $posMap->printContentElementColumns($this->id,0,$colPosList,1,$this->R_URI);
+                               $code.= $posMap->printContentElementColumns($this->id, 0, $colPosList, 1, $this->R_URI);
                                $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('2_selectPosition'), $code, 0, 1);
                        }
 
@@ -543,12 +543,12 @@ class SC_db_new_content_el {
                                // Exploding parameter string, if any (old style)
                        if ($wizardItems[$key]['params']) {
                                        // Explode GET vars recursively
-                               $tempGetVars = t3lib_div::explodeUrl2Array($wizardItems[$key]['params'],TRUE);
+                               $tempGetVars = t3lib_div::explodeUrl2Array($wizardItems[$key]['params'], TRUE);
                                        // If tt_content values are set, merge them into the tt_content_defValues array, unset them from $tempGetVars and re-implode $tempGetVars into the param string (in case remaining parameters are around).
                                if (is_array($tempGetVars['defVals']['tt_content'])) {
                                        $wizardItems[$key]['tt_content_defValues'] = array_merge(is_array($wizardItems[$key]['tt_content_defValues']) ? $wizardItems[$key]['tt_content_defValues'] : array(), $tempGetVars['defVals']['tt_content']);
                                        unset($tempGetVars['defVals']['tt_content']);
-                                       $wizardItems[$key]['params'] = t3lib_div::implodeArrayForUrl('',$tempGetVars);
+                                       $wizardItems[$key]['params'] = t3lib_div::implodeArrayForUrl('', $tempGetVars);
                                }
                        }
 
@@ -563,7 +563,7 @@ class SC_db_new_content_el {
                                                $authModeDeny = ($config['type']=='select' && $config['authMode'] && !$GLOBALS['BE_USER']->checkAuthMode('tt_content', $fN, $fV, $config['authMode']));
                                                $isNotInKeepItems = (count($keepItems) && !in_array($fV, $keepItems));
 
-                                               if ($authModeDeny || ($fN=='CType' && in_array($fV,$removeItems)) || $isNotInKeepItems) {
+                                               if ($authModeDeny || ($fN=='CType' && in_array($fV, $removeItems)) || $isNotInKeepItems) {
                                                                // Remove element all together:
                                                        unset($wizardItems[$key]);
                                                        break;
@@ -579,7 +579,7 @@ class SC_db_new_content_el {
                }
                        // remove headers without elements
                foreach ($wizardItems as $key => $cfg) {
-                       $tmp = explode('_',$key);
+                       $tmp = explode('_', $key);
                        if ($tmp[0] && !$tmp[1] && !in_array($tmp[0], $headersUsed)) {
                                unset($wizardItems[$key]);
                        }
index 62c5333..e5fb956 100755 (executable)
@@ -268,7 +268,7 @@ $TCA['fe_users'] = array(
                                'eval' => 'datetime',
                                'default' => '0',
                                'range' => array(
-                                       'upper' => mktime(0,0,0,12,31,2020),
+                                       'upper' => mktime(0, 0, 0, 12, 31, 2020),
                                )
                        )
                ),
@@ -542,7 +542,7 @@ $TCA['pages_language_overlay'] = array(
                                'eval' => 'datetime',
                                'default' => '0',
                                'range' => array(
-                                       'upper' => mktime(0,0,0,12,31,2020),
+                                       'upper' => mktime(0, 0, 0, 12, 31, 2020),
                                )
                        )
                ),
@@ -685,7 +685,7 @@ $TCA['pages_language_overlay'] = array(
                                'foreign_table' => 'sys_language',
                                'foreign_table_where' => 'ORDER BY sys_language.title',
                                'items' => array(
-                                       array('LLL:EXT:lang/locallang_general.xml:LGL.default_value',0)
+                                       array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
                                )
                        )
                ),
@@ -922,7 +922,7 @@ $TCA['sys_template'] = array(
                                'eval' => 'datetime',
                                'default' => '0',
                                'range' => array(
-                                       'upper' => mktime(0,0,0,12,31,2020),
+                                       'upper' => mktime(0, 0, 0, 12, 31, 2020),
                                )
                        )
                ),
index 7b626a5..671427a 100755 (executable)
@@ -200,7 +200,7 @@ $TCA['tt_content'] = array(
                                'eval' => 'datetime',
                                'default' => '0',
                                'range' => array(
-                                       'upper' => mktime(0,0,0,12,31,2020),
+                                       'upper' => mktime(0, 0, 0, 12, 31, 2020),
                                ),
                        ),
                        'l10n_mode' => 'exclude',
index 031c554..5b01bee 100644 (file)
@@ -673,7 +673,7 @@ $query . '<table class="typo3-adminPanel">' .
         */
        public function ext_makeToolBar() {
                        //  If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's create new content wizard instead:
-               $tsConfig = t3lib_BEfunc::getModTSconfig($this->pageinfo['uid'],'mod.web_list');
+               $tsConfig = t3lib_BEfunc::getModTSconfig($this->pageinfo['uid'], 'mod.web_list');
                $tsConfig = $tsConfig['properties']['newContentWiz.']['overrideWithExtension'];
                $newContentWizScriptPath = t3lib_extMgm::isLoaded($tsConfig) ? (t3lib_extMgm::extRelPath($tsConfig) . 'mod1/db_new_content_el.php') : (TYPO3_mainDir . 'sysext/cms/layout/db_new_content_el.php');
 
@@ -712,7 +712,7 @@ $query . '<table class="typo3-adminPanel">' .
                                        'pid=' . intval($id) . ' AND sys_language_uid=' . $GLOBALS['TSFE']->sys_language_uid . $GLOBALS['TSFE']->sys_page->enableFields('pages_language_overlay'),
                                        '', '', '1');
                                $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
-                               $GLOBALS['TSFE']->sys_page->versionOL('pages_language_overlay',$row);
+                               $GLOBALS['TSFE']->sys_page->versionOL('pages_language_overlay', $row);
                                if (is_array($row)) {
                                        $params = '&edit[pages_language_overlay][' . $row['uid'] . ']=edit';
                                        $toolBar .= '<a href="' . htmlspecialchars(TYPO3_mainDir . 'alt_doc.php?' . $params . '&noView=1&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
index c656849..1f14727 100644 (file)
@@ -1160,7 +1160,7 @@ class tslib_cObj {
        /**
         * Returns a <img> tag with the image file defined by $file and processed according to the properties in the TypoScript array.
         * Mostly this function is a sub-function to the IMAGE function which renders the IMAGE cObject in TypoScript.
-        * This function is called by "$this->cImage($conf['file'],$conf);" from IMAGE().
+        * This function is called by "$this->cImage($conf['file'], $conf);" from IMAGE().
         *
         * @param       string          File TypoScript resource
         * @param       array           TypoScript configuration properties
@@ -4345,13 +4345,13 @@ class tslib_cObj {
                                // calculate splitCount
                        $splitCount = count($valArr);
                        $max = isset($conf['max.'])
-                               ? $this->stdWrap($conf['max'],$conf['max.'])
+                               ? $this->stdWrap($conf['max'], $conf['max.'])
                                : $conf['max'];
                        if ($max && $splitCount > $max) {
                                $splitCount = $max;
                        }
                        $min = isset($conf['min.'])
-                               ? $this->stdWrap($conf['min'],$conf['min.'])
+                               ? $this->stdWrap($conf['min'], $conf['min.'])
                                : $conf['min'];
                        if ($min && $splitCount < $min) {
                                $splitCount = $min;
@@ -4896,7 +4896,7 @@ class tslib_cObj {
                                        $backParts = t3lib_div::revExplode('<', substr($fwParts[1],0,-1), 2);
                                        $attrib = t3lib_div::get_tag_attributes('<'.$fwParts[0].'>');
                                        $str_content = $backParts[0];
-                                       $sameBeginEnd = (substr(strtolower($backParts[1]),1,strlen($tagName))==strtolower($tagName));
+                                       $sameBeginEnd = (substr(strtolower($backParts[1]), 1, strlen($tagName))==strtolower($tagName));
                                }
                        }
 
@@ -5097,7 +5097,7 @@ class tslib_cObj {
         * The value ($file) can either be a file reference (TypoScript resource) or the string "GIFBUILDER".
         * In the first case a current image is returned, possibly scaled down or otherwise processed.
         * In the latter case a GIFBUILDER image is returned; This means an image is made by TYPO3 from layers of elements as GIFBUILDER defines.
-        * In the function IMG_RESOURCE() this function is called like $this->getImgResource($conf['file'],$conf['file.']);
+        * In the function IMG_RESOURCE() this function is called like $this->getImgResource($conf['file'], $conf['file.']);
         *
         * @param       string          A "imgResource" TypoScript data type. Either a TypoScript file resource or the string GIFBUILDER. See description above.
         * @param       array           TypoScript properties for the imgResource type
index 7089d82..4c8ee3a 100644 (file)
@@ -2049,7 +2049,7 @@ class tslib_fe {
                                $GLOBALS['TCA'] = $newTc;
                                // Store it in cache if cache is enabled
                                if ($this->TYPO3_CONF_VARS['EXT']['extCache'] != 0) {
-                                       $this->sys_page->storeHash($tempHash, serialize(array($newTc,$this->TCAcachedExtras)), 'SHORT_TC');
+                                       $this->sys_page->storeHash($tempHash, serialize(array($newTc, $this->TCAcachedExtras)), 'SHORT_TC');
                                }
                        }
                }
index 8d62161..d0dee3a 100644 (file)
@@ -243,7 +243,7 @@ class tslib_feUserAuth extends t3lib_userAuth {
 
                if ($this->writeDevLog)         {
                        if (is_array($this->user)) {
-                               t3lib_div::devLog('Get usergroups for user: '.t3lib_div::arrayToLogString($this->user, array($this->userid_column,$this->username_column)), 'tslib_feUserAuth');
+                               t3lib_div::devLog('Get usergroups for user: '.t3lib_div::arrayToLogString($this->user, array($this->userid_column, $this->username_column)), 'tslib_feUserAuth');
                        } else {
                                t3lib_div::devLog('Get usergroups for "anonymous" user', 'tslib_feUserAuth');
                        }
@@ -325,7 +325,7 @@ class tslib_feUserAuth extends t3lib_userAuth {
                if (!$this->userTSUpdated) {
                                // Parsing the user TS (or getting from cache)
                        $this->TSdataArray = t3lib_TSparser::checkIncludeLines_array($this->TSdataArray);
-                       $userTS = implode(LF.'[GLOBAL]'.LF,$this->TSdataArray);
+                       $userTS = implode(LF.'[GLOBAL]'.LF, $this->TSdataArray);
                        $parseObj = t3lib_div::makeInstance('t3lib_TSparser');
                        $parseObj->parse($userTS);
                        $this->userTS = $parseObj->setup;
@@ -453,7 +453,7 @@ class tslib_feUserAuth extends t3lib_userAuth {
         * @return      mixed           Returns whatever value there was in the array for the key, $key
         * @see setKey()
         */
-       function getKey($type,$key) {
+       function getKey($type, $key) {
                if ($key) {
                        switch($type) {
                                case 'user':
@@ -478,7 +478,7 @@ class tslib_feUserAuth extends t3lib_userAuth {
         * @return      void
         * @see setKey(), storeSessionData(), record_registration()
         */
-       function setKey($type,$key,$data) {
+       function setKey($type, $key, $data) {
                if ($key) {
                        switch($type) {
                                case 'user':
@@ -529,7 +529,7 @@ class tslib_feUserAuth extends t3lib_userAuth {
         * @param       integer         The maximum size of stored session data. If zero, no limit is applied and even confirmation of cookie session is discarded.
         * @return      void
         */
-       function record_registration($recs,$maxSizeOfSessionData=0) {
+       function record_registration($recs, $maxSizeOfSessionData=0) {
 
                        // Storing value ONLY if there is a confirmed cookie set (->cookieID),
                        // otherwise a shellscript could easily be spamming the fe_sessions table
@@ -539,7 +539,7 @@ class tslib_feUserAuth extends t3lib_userAuth {
                                $this->setKey('ses', 'recs', array());
                        }
                        $change=0;
-                       $recs_array=$this->getKey('ses','recs');
+                       $recs_array=$this->getKey('ses', 'recs');
                        foreach ($recs as $table => $data) {
                                if (is_array($data)) {
                                        foreach ($data as $rec_id => $value) {
@@ -551,7 +551,7 @@ class tslib_feUserAuth extends t3lib_userAuth {
                                }
                        }
                        if ($change && (!$maxSizeOfSessionData || strlen(serialize($recs_array))<$maxSizeOfSessionData)) {
-                               $this->setKey('ses','recs',$recs_array);
+                               $this->setKey('ses', 'recs', $recs_array);
                        }
                }
        }
index 98ad95e..5685e32 100644 (file)
@@ -66,7 +66,7 @@
  * $gifCreator->init();
  * $theImage='';
  * if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib']) {
- * $gifCreator->start($fileArray,$this->data);
+ * $gifCreator->start($fileArray, $this->data);
  * $theImage = $gifCreator->gifBuild();
  * }
  * return $gifCreator->getImageDimensions($theImage);
@@ -102,7 +102,7 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
         * @return      void
         * @see tslib_cObj::getImgResource(), tslib_gmenu::makeGifs(), tslib_gmenu::findLargestDims()
         */
-       function start($conf,$data) {
+       function start($conf, $data) {
 
                if (is_array($conf)) {
                        $this->setup = $conf;
@@ -122,7 +122,7 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
                        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_gifbuilder.php']['gifbuilder-ConfPreProcess']))    {
                                foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_gifbuilder.php']['gifbuilder-ConfPreProcess'] as $_funcRef)    {
                                        $_params = $this->setup;
-                                       $this->setup = t3lib_div::callUserFunction($_funcRef,$_params,$this);
+                                       $this->setup = t3lib_div::callUserFunction($_funcRef, $_params, $this);
                                }
                        }
 
@@ -133,10 +133,10 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
                                        if (is_array($cRMcfg)) {
 
                                                        // Initializing:
-                                               $cRMkey = $GLOBALS['TSFE']->tmpl->setup['_GIFBUILDER.']['charRangeMap.'][substr($cRMcfgkey,0,-1)];
+                                               $cRMkey = $GLOBALS['TSFE']->tmpl->setup['_GIFBUILDER.']['charRangeMap.'][substr($cRMcfgkey, 0, -1)];
                                                $this->charRangeMap[$cRMkey] = array();
                                                $this->charRangeMap[$cRMkey]['charMapConfig'] =  $cRMcfg['charMapConfig.'];
-                                               $this->charRangeMap[$cRMkey]['cfgKey'] = substr($cRMcfgkey,0,-1);
+                                               $this->charRangeMap[$cRMkey]['cfgKey'] = substr($cRMcfgkey, 0, -1);
                                                $this->charRangeMap[$cRMkey]['multiplicator'] = (double)$cRMcfg['fontSizeMultiplicator'];
                                                $this->charRangeMap[$cRMkey]['pixelSpace'] = intval($cRMcfg['pixelSpaceFontSizeRef']);
                                        }
@@ -201,14 +201,14 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
                                                        }
                                                break;
                                                case 'IMAGE':
-                                                       $fileInfo = $this->getResource($conf['file'],$conf['file.']);
+                                                       $fileInfo = $this->getResource($conf['file'], $conf['file.']);
                                                        if ($fileInfo) {
-                                                               $this->combinedFileNames[] = preg_replace('/\.[[:alnum:]]+$/','',basename($fileInfo[3]));
+                                                               $this->combinedFileNames[] = preg_replace('/\.[[:alnum:]]+$/', '', basename($fileInfo[3]));
                                                                $this->setup[$theKey.'.']['file'] = $fileInfo[3];
                                                                $this->setup[$theKey.'.']['BBOX'] = $fileInfo;
                                                                $this->objBB[$theKey] = $fileInfo;
                                                                if ($conf['mask']) {
-                                                                       $maskInfo = $this->getResource($conf['mask'],$conf['mask.']);
+                                                                       $maskInfo = $this->getResource($conf['mask'], $conf['mask.']);
                                                                        if ($maskInfo) {
                                                                                $this->setup[$theKey.'.']['mask'] = $maskInfo[3];
                                                                        } else {
@@ -303,7 +303,7 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
                                }
                        }
                                // Get trivial data
-                       $XY = t3lib_div::intExplode(',',$this->setup['XY']);
+                       $XY = t3lib_div::intExplode(',', $this->setup['XY']);
                        $maxWidth = isset($this->setup['maxWidth.'])
                                ? intval($this->cObj->stdWrap($this->setup['maxWidth'], $this->setup['maxWidth.']))
                                : intval($this->setup['maxWidth']);
@@ -311,12 +311,12 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
                                ? intval($this->cObj->stdWrap($this->setup['maxHeight'], $this->setup['maxHeight.']))
                                : intval($this->setup['maxHeight']);
 
-                       $XY[0] = t3lib_utility_Math::forceIntegerInRange($XY[0],1, $maxWidth?$maxWidth:2000);
-                       $XY[1] = t3lib_utility_Math::forceIntegerInRange($XY[1],1, $maxHeight?$maxHeight:2000);
+                       $XY[0] = t3lib_utility_Math::forceIntegerInRange($XY[0], 1, $maxWidth?$maxWidth:2000);
+                       $XY[1] = t3lib_utility_Math::forceIntegerInRange($XY[1], 1, $maxHeight?$maxHeight:2000);
                        $this->XY = $XY;
                        $this->w = $XY[0];
                        $this->h = $XY[1];
-                       $this->OFFSET = t3lib_div::intExplode(',',$this->setup['offset']);
+                       $this->OFFSET = t3lib_div::intExplode(',', $this->setup['offset']);
 
                        $this->setWorkArea($this->setup['workArea']);   // this sets the workArea
                        $this->defaultWorkArea = $this->workArea;       // this sets the default to the current;
@@ -393,7 +393,7 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
 
                                // Fill the background with the given color
                        $BGcols = $this->convertColor($this->setup['backColor']);
-                       $Bcolor = ImageColorAllocate($this->im, $BGcols[0],$BGcols[1],$BGcols[2]);
+                       $Bcolor = ImageColorAllocate($this->im, $BGcols[0], $BGcols[1], $BGcols[2]);
                        ImageFilledRectangle($this->im, 0, 0, $XY[0], $XY[1], $Bcolor);
                }
 
@@ -415,9 +415,9 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
                                                        // Images
                                                case 'IMAGE':
                                                        if ($conf['mask']) {
-                                                               $this->maskImageOntoImage($this->im,$conf,$this->workArea);
+                                                               $this->maskImageOntoImage($this->im, $conf, $this->workArea);
                                                        } else {
-                                                               $this->copyImageOntoImage($this->im,$conf,$this->workArea);
+                                                               $this->copyImageOntoImage($this->im, $conf, $this->workArea);
                                                        }
                                                break;
 
@@ -427,73 +427,73 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
                                                                if (is_array($conf['shadow.'])) {
                                                                        $isStdWrapped = array();
                                                                        foreach($conf['shadow.'] as $key => $value) {
-                                                                               $parameter = rtrim($key,'.');
+                                                                               $parameter = rtrim($key, '.');
                                                                                if(!$isStdWrapped[$parameter] && isset($conf[$parameter.'.'])) {
                                                                                        $conf['shadow.'][$parameter] = $this->cObj->stdWrap($conf[$parameter], $conf[$parameter.'.']);
                                                                                        $isStdWrapped[$parameter] = 1;
                                                                                }
                                                                        }
-                                                                       $this->makeShadow($this->im,$conf['shadow.'],$this->workArea,$conf);
+                                                                       $this->makeShadow($this->im,$conf['shadow.'], $this->workArea, $conf);
                                                                }
                                                                if (is_array($conf['emboss.'])) {
                                                                        $isStdWrapped = array();
                                                                        foreach($conf['emboss.'] as $key => $value) {
-                                                                               $parameter = rtrim($key,'.');
+                                                                               $parameter = rtrim($key, '.');
                                                                                if(!$isStdWrapped[$parameter] && isset($conf[$parameter.'.'])) {
                                                                                        $conf['emboss.'][$parameter] = $this->cObj->stdWrap($conf[$parameter], $conf[$parameter.'.']);
                                                                                        $isStdWrapped[$parameter] = 1;
                                                                                }
                                                                        }
-                                                                       $this->makeEmboss($this->im,$conf['emboss.'],$this->workArea,$conf);
+                                                                       $this->makeEmboss($this->im,$conf['emboss.'], $this->workArea, $conf);
                                                                }
                                                                if (is_array($conf['outline.'])) {
                                                                        $isStdWrapped = array();
                                                                        foreach($conf['outline.'] as $key => $value) {
-                                                                               $parameter = rtrim($key,'.');
+                                                                               $parameter = rtrim($key, '.');
                                                                                if(!$isStdWrapped[$parameter] && isset($conf[$parameter.'.'])) {
                                                                                        $conf['outline.'][$parameter] = $this->cObj->stdWrap($conf[$parameter], $conf[$parameter.'.']);
                                                                                        $isStdWrapped[$parameter] = 1;
                                                                                }
                                                                        }
-                                                                       $this->makeOutline($this->im,$conf['outline.'],$this->workArea,$conf);
+                                                                       $this->makeOutline($this->im, $conf['outline.'], $this->workArea, $conf);
                                                                }
                                                                $conf['imgMap']=1;
-                                                               $this->makeText($this->im,$conf,$this->workArea);
+                                                               $this->makeText($this->im, $conf, $this->workArea);
                                                        }
                                                break;
 
                                                        // Text effects:
                                                case 'OUTLINE':
                                                        if ($this->setup[$conf['textObjNum']]=='TEXT' && $txtConf=$this->checkTextObj($this->setup[$conf['textObjNum'].'.'])) {
-                                                               $this->makeOutline($this->im,$conf,$this->workArea,$txtConf);
+                                                               $this->makeOutline($this->im, $conf, $this->workArea, $txtConf);
                                                        }
                                                break;
                                                case 'EMBOSS':
                                                        if ($this->setup[$conf['textObjNum']]=='TEXT' && $txtConf=$this->checkTextObj($this->setup[$conf['textObjNum'].'.'])) {
-                                                               $this->makeEmboss($this->im,$conf,$this->workArea,$txtConf);
+                                                               $this->makeEmboss($this->im, $conf, $this->workArea, $txtConf);
                                                        }
                                                break;
                                                case 'SHADOW':
                                                        if ($this->setup[$conf['textObjNum']]=='TEXT' && $txtConf=$this->checkTextObj($this->setup[$conf['textObjNum'].'.'])) {
-                                                               $this->makeShadow($this->im,$conf,$this->workArea,$txtConf);
+                                                               $this->makeShadow($this->im, $conf, $this->workArea, $txtConf);
                                                        }
                                                break;
 
                                                        // Other
                                                case 'BOX':
-                                                       $this->makeBox($this->im,$conf,$this->workArea);
+                                                       $this->makeBox($this->im, $conf, $this->workArea);
                                                break;
                                                case 'EFFECT':
-                                                       $this->makeEffect($this->im,$conf);
+                                                       $this->makeEffect($this->im, $conf);
                                                break;
                                                case 'ADJUST':
-                                                       $this->adjust($this->im,$conf);
+                                                       $this->adjust($this->im, $conf);
                                                break;
                                                case 'CROP':
-                                                       $this->crop($this->im,$conf);
+                                                       $this->crop($this->im, $conf);
                                                break;
                                                case 'SCALE':
-                                                       $this->scale($this->im,$conf);
+                                                       $this->scale($this->im, $conf);
                                                break;
                                                case 'WORKAREA':
                                                        if ($conf['set']) {
@@ -574,7 +574,7 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
 
                $isStdWrapped = array();
                foreach($conf as $key => $value) {
-                       $parameter = rtrim($key,'.');
+                       $parameter = rtrim($key, '.');
                        if(!$isStdWrapped[$parameter] && isset($conf[$parameter.'.'])) {
                                $conf[$parameter] = $cObj->stdWrap($conf[$parameter], $conf[$parameter . '.']);
                                $isStdWrapped[$parameter] = 1;
@@ -628,7 +628,7 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
                                        }
                                                // multiplicator of pixelSpace:
                                        if ($this->charRangeMap[$fontBaseName]['pixelSpace']) {
-                                               $travKeys = array('xSpaceBefore','xSpaceAfter','ySpaceBefore','ySpaceAfter');
+                                               $travKeys = array('xSpaceBefore', 'xSpaceAfter', 'ySpaceBefore', 'ySpaceAfter');
                                                foreach($travKeys as $pxKey) {
                                                        if (isset($conf['splitRendering.'][$cfgK.'.'][$pxKey])) {
                                                                $conf['splitRendering.'][$cfgK.'.'][$pxKey] = round($conf['splitRendering.'][$cfgK.'.'][$pxKey] * ($conf['fontSize'] / $this->charRangeMap[$fontBaseName]['pixelSpace']));
@@ -687,13 +687,13 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
         * @access private
         * @see tslib_cObj::getImgResource()
         */
-       function getResource($file,$fileArray) {
+       function getResource($file, $fileArray) {
                if (!t3lib_div::inList($this->imageFileExt, $fileArray['ext'])) {
                        $fileArray['ext'] = $this->gifExtension;
                }
                $cObj =t3lib_div::makeInstance('tslib_cObj');
                $cObj->start($this->data);
-               return $cObj->getImgResource($file,$fileArray);
+               return $cObj->getImgResource($file, $fileArray);
        }
 
        /**
index aaa82b8..d4dbd33 100644 (file)
@@ -63,7 +63,7 @@
  *
  * $menu = t3lib_div::makeInstance('tslib_'.$cls);
  * $menu->parent_cObj = $this;
- * $menu->start($GLOBALS['TSFE']->tmpl,$GLOBALS['TSFE']->sys_page,'',$conf,1);
+ * $menu->start($GLOBALS['TSFE']->tmpl, $GLOBALS['TSFE']->sys_page, '', $conf,1);
  * $menu->makeMenu();
  * $content.=$menu->writeMenu();
  *
@@ -136,7 +136,7 @@ class tslib_menu {
         * @return      boolean         Returns TRUE on success
         * @see tslib_cObj::HMENU()
         */
-       function start(&$tmpl,&$sys_page,$id,$conf,$menuNumber,$objSuffix='') {
+       function start(&$tmpl, &$sys_page, $id, $conf, $menuNumber, $objSuffix='') {
 
                        // Init:
                $this->conf = $conf;
@@ -228,7 +228,7 @@ class tslib_menu {
                                        }
 
                                                // Add to register:
-                                       $this->rL_uidRegister[] = 'ITEM:'.$v_rl['uid'].(count($rl_MParray) ? ':'.implode(',',$rl_MParray) : '');
+                                       $this->rL_uidRegister[] = 'ITEM:'.$v_rl['uid'].(count($rl_MParray) ? ':'.implode(',', $rl_MParray) : '');
 
                                                // For normal mount points, set the variable for next level.
                                        if ($v_rl['_MP_PARAM'] && !$v_rl['_MOUNT_OL']) {
@@ -281,7 +281,7 @@ class tslib_menu {
 
                        $retVal = TRUE;
                } else {
-                       $GLOBALS['TT']->setTSlogMessage('ERROR in menu',3);
+                       $GLOBALS['TT']->setTSlogMessage('ERROR in menu', 3);
                        $retVal = FALSE;
                }
                return $retVal;
@@ -317,7 +317,7 @@ class tslib_menu {
                                        case 'userfunction':
                                                $temp = $this->parent_cObj->callUserFunction(
                                                        $this->conf['special.']['userFunc'],
-                                                       array_merge($this->conf['special.'],array('_altSortField'=>$altSortField)),
+                                                       array_merge($this->conf['special.'], array('_altSortField'=>$altSortField)),
                                                        ''
                                                );
                                                if (!is_array($temp))   $temp=array();
@@ -326,14 +326,14 @@ class tslib_menu {
                                                $temp = array();
 
                                                        // Getting current page record NOT overlaid by any translation:
-                                               $currentPageWithNoOverlay = $this->sys_page->getRawRecord('pages',$GLOBALS['TSFE']->page['uid']);
+                                               $currentPageWithNoOverlay = $this->sys_page->getRawRecord('pages', $GLOBALS['TSFE']->page['uid']);
 
                                                        // Traverse languages set up:
-                                               $languageItems = t3lib_div::intExplode(',',$value);
+                                               $languageItems = t3lib_div::intExplode(',', $value);
                                                foreach($languageItems as $sUid) {
                                                                // Find overlay record:
                                                        if ($sUid) {
-                                                               $lRecs = $this->sys_page->getPageOverlay($GLOBALS['TSFE']->page['uid'],$sUid);
+                                                               $lRecs = $this->sys_page->getPageOverlay($GLOBALS['TSFE']->page['uid'], $sUid);
                                                        } else $lRecs=array();
                                                                // Checking if the "disabled" state should be set.
                                                        if (
@@ -347,7 +347,7 @@ class tslib_menu {
                                                        }
 
                                                        if ($this->conf['addQueryString']) {
-                                                               $getVars = $this->parent_cObj->getQueryArguments($this->conf['addQueryString.'],array('L'=>$sUid),TRUE);
+                                                               $getVars = $this->parent_cObj->getQueryArguments($this->conf['addQueryString.'], array('L'=>$sUid), TRUE);
                                                        } else {
                                                                $getVars = '&L='.$sUid;
                                                        }
@@ -367,7 +367,7 @@ class tslib_menu {
                                                if ($value=='') {
                                                        $value=$GLOBALS['TSFE']->page['uid'];
                                                }
-                                               $items=t3lib_div::intExplode(',',$value);
+                                               $items=t3lib_div::intExplode(',', $value);
 
                                                foreach($items as $id) {
                                                        $MP = $this->tmpl->getFromMPmap($id);
@@ -385,9 +385,9 @@ class tslib_menu {
                                                        }
 
                                                                // Get sub-pages:
-                                                       $res = $this->parent_cObj->exec_getQuery('pages',Array('pidInList'=>$id,'orderBy'=>$altSortField));
+                                                       $res = $this->parent_cObj->exec_getQuery('pages', Array('pidInList'=>$id, 'orderBy'=>$altSortField));
                                                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                                                               $GLOBALS['TSFE']->sys_page->versionOL('pages',$row);
+                                                               $GLOBALS['TSFE']->sys_page->versionOL('pages', $row);
 
                                                                if (is_array($row)) {
                                                                                // Keep mount point?
@@ -454,13 +454,13 @@ class tslib_menu {
                                                if ($value=='') {
                                                        $value=$GLOBALS['TSFE']->page['uid'];
                                                }
-                                               $items=t3lib_div::intExplode(',',$value);
+                                               $items=t3lib_div::intExplode(',', $value);
                                                if (t3lib_utility_Math::canBeInterpretedAsInteger($this->conf['special.']['depth'])) {
-                                                       $depth = t3lib_utility_Math::forceIntegerInRange($this->conf['special.']['depth'],1,20);                // Tree depth
+                                                       $depth = t3lib_utility_Math::forceIntegerInRange($this->conf['special.']['depth'], 1, 20);              // Tree depth
                                                } else {
                                                        $depth=20;
                                                }
-                                               $limit = t3lib_utility_Math::forceIntegerInRange($this->conf['special.']['limit'],0,100);       // max number of items
+                                               $limit = t3lib_utility_Math::forceIntegerInRange($this->conf['special.']['limit'], 0, 100);     // max number of items
                                                $maxAge = intval(tslib_cObj::calc($this->conf['special.']['maxAge']));
                                                if (!$limit)    $limit=10;
                                                $mode = $this->conf['special.']['mode'];        // *'auto', 'manual', 'tstamp'
@@ -468,10 +468,10 @@ class tslib_menu {
                                                $id_list_arr = Array();
 
                                                foreach($items as $id) {
-                                                       $bA = t3lib_utility_Math::forceIntegerInRange($this->conf['special.']['beginAtLevel'],0,100);
-                                                       $id_list_arr[] = tslib_cObj::getTreeList(-1*$id,$depth-1+$bA,$bA-1);
+                                                       $bA = t3lib_utility_Math::forceIntegerInRange($this->conf['special.']['beginAtLevel'], 0,100);
+                                                       $id_list_arr[] = tslib_cObj::getTreeList(-1*$id, $depth-1+$bA, $bA-1);
                                                }
-                                               $id_list = implode(',',$id_list_arr);
+                                               $id_list = implode(',', $id_list_arr);
                                                        // Get sortField (mode)
                                                switch($mode) {
                                                        case 'starttime':
@@ -503,14 +503,14 @@ class tslib_menu {
 
                                                $res = $this->parent_cObj->exec_getQuery('pages',Array('pidInList'=>'0', 'uidInList'=>$id_list, 'where'=>$sortField.'>=0'.$extraWhere, 'orderBy'=>($altSortFieldValue ? $altSortFieldValue : $sortField.' desc'),'max'=>$limit));
                                                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                                                       $GLOBALS['TSFE']->sys_page->versionOL('pages',$row);
+                                                       $GLOBALS['TSFE']->sys_page->versionOL('pages', $row);
                                                        if (is_array($row)) {
                                                                $temp[$row['uid']]=$this->sys_page->getPageOverlay($row);
                                                        }
                                                }
                                        break;
                                        case 'keywords':
-                                               list($value)=t3lib_div::intExplode(',',$value);
+                                               list($value)=t3lib_div::intExplode(',', $value);
                                                if (!$value) {
                                                        $value=$GLOBALS['TSFE']->page['uid'];
                                                }
@@ -547,11 +547,11 @@ class tslib_menu {
 
                                                        // depth, limit, extra where
                                                if (t3lib_utility_Math::canBeInterpretedAsInteger($this->conf['special.']['depth'])) {
-                                                       $depth = t3lib_utility_Math::forceIntegerInRange($this->conf['special.']['depth'],0,20);                // Tree depth
+                                                       $depth = t3lib_utility_Math::forceIntegerInRange($this->conf['special.']['depth'], 0, 20);              // Tree depth
                                                } else {
                                                        $depth=20;
                                                }
-                                               $limit = t3lib_utility_Math::forceIntegerInRange($this->conf['special.']['limit'],0,100);       // max number of items
+                                               $limit = t3lib_utility_Math::forceIntegerInRange($this->conf['special.']['limit'], 0, 100);     // max number of items
                                                $extraWhere = ' AND pages.uid<>'.$value.($this->conf['includeNotInMenu'] ? '' : ' AND pages.nav_hide=0').$this->getDoktypeExcludeWhere();
                                                if ($this->conf['special.']['excludeNoSearchPages']) {
                                                        $extraWhere.= ' AND pages.no_search=0';
@@ -568,24 +568,24 @@ class tslib_menu {
                                                        // which field is for keywords
                                                $kfield = 'keywords';
                                                if ( $this->conf['special.']['keywordsField'] ) {
-                                                       list($kfield) = explode(' ',trim ($this->conf['special.']['keywordsField']));
+                                                       list($kfield) = explode(' ', trim ($this->conf['special.']['keywordsField']));
                                                }
 
                                                        // If there are keywords and the startuid is present.
                                                if ($kw && $startUid) {
-                                                       $bA = t3lib_utility_Math::forceIntegerInRange($this->conf['special.']['beginAtLevel'],0,100);
-                                                       $id_list=tslib_cObj::getTreeList(-1*$startUid,$depth-1+$bA,$bA-1);
+                                                       $bA = t3lib_utility_Math::forceIntegerInRange($this->conf['special.']['beginAtLevel'], 0, 100);
+                                                       $id_list=tslib_cObj::getTreeList(-1*$startUid, $depth-1+$bA, $bA-1);
 
-                                                       $kwArr = explode(',',$kw);
+                                                       $kwArr = explode(',', $kw);
                                                        foreach($kwArr as $word) {
                                                                $word = trim($word);
                                                                if ($word) {
                                                                        $keyWordsWhereArr[] = $kfield.' LIKE \'%'.$GLOBALS['TYPO3_DB']->quoteStr($word, 'pages').'%\'';
                                                                }
                                                        }
-                                                       $res = $this->parent_cObj->exec_getQuery('pages',Array('pidInList'=>'0', 'uidInList'=>$id_list, 'where'=>'('.implode(' OR ',$keyWordsWhereArr).')'.$extraWhere, 'orderBy'=>($altSortFieldValue ? $altSortFieldValue : $sortField.' desc'),'max'=>$limit));
+                                                       $res = $this->parent_cObj->exec_getQuery('pages', Array('pidInList'=>'0', 'uidInList'=>$id_list, 'where'=>'('.implode(' OR ', $keyWordsWhereArr).')'.$extraWhere, 'orderBy'=>($altSortFieldValue ? $altSortFieldValue : $sortField.' desc'), 'max'=>$limit));
                                                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                                                               $GLOBALS['TSFE']->sys_page->versionOL('pages',$row);
+                                                               $GLOBALS['TSFE']->sys_page->versionOL('pages', $row);
                                                                if (is_array($row)) {
                                                                        $temp[$row['uid']]=$this->sys_page->getPageOverlay($row);
                                                                }
@@ -602,8 +602,8 @@ class tslib_menu {
                                                        $begin_end[1] = -1;
                                                }
 
-                                               $beginKey = tslib_cObj::getKey ($begin_end[0],$this->tmpl->rootLine);
-                                               $endKey = tslib_cObj::getKey ($begin_end[1],$this->tmpl->rootLine);
+                                               $beginKey = tslib_cObj::getKey ($begin_end[0], $this->tmpl->rootLine);
+                                               $endKey = tslib_cObj::getKey ($begin_end[1], $this->tmpl->rootLine);
                                                if ($endKey<$beginKey)  {$endKey=$beginKey;}
 
                                                $rl_MParray = array();
@@ -619,7 +619,7 @@ class tslib_menu {
                                                                if (count($temp[$temp_key])) {
                                                                        if (!$temp[$temp_key]['target'])        {       // If there are no specific target for the page, put the level specific target on.
                                                                                $temp[$temp_key]['target'] = $this->conf['special.']['targets.'][$k_rl];
-                                                                               $temp[$temp_key]['_MP_PARAM'] = implode(',',$rl_MParray);
+                                                                               $temp[$temp_key]['_MP_PARAM'] = implode(',', $rl_MParray);
                                                                        }
                                                                } else unset($temp[$temp_key]);
                                                        }
@@ -635,7 +635,7 @@ class tslib_menu {
                                                }
                                        break;
                                        case 'browse':
-                                               list($value)=t3lib_div::intExplode(',',$value);
+                                               list($value)=t3lib_div::intExplode(',', $value);
                                                if (!$value) {
                                                        $value=$GLOBALS['TSFE']->page['uid'];
                                                }
@@ -650,7 +650,7 @@ class tslib_menu {
                                                        }
 
                                                                // prev / next is found
-                                                       $prevnext_menu = $this->sys_page->getMenu($value_rec['pid'],'*',$altSortField);
+                                                       $prevnext_menu = $this->sys_page->getMenu($value_rec['pid'], '*', $altSortField);
                                                        $lastKey=0;
                                                        $nextActive=0;
                                                        foreach ($prevnext_menu as $k_b => $v_b) {
@@ -673,12 +673,12 @@ class tslib_menu {
 
                                                                // prevsection / nextsection is found
                                                        if (is_array($recArr['index'])) {       // You can only do this, if there is a valid page two levels up!
-                                                               $prevnextsection_menu = $this->sys_page->getMenu($recArr['index']['uid'],'*',$altSortField);
+                                                               $prevnextsection_menu = $this->sys_page->getMenu($recArr['index']['uid'], '*', $altSortField);
                                                                $lastKey=0;
                                                                $nextActive=0;
                                                                foreach ($prevnextsection_menu as $k_b => $v_b) {
                                                                        if ($nextActive) {
-                                                                               $sectionRec_temp = $this->sys_page->getMenu($v_b['uid'],'*',$altSortField);
+                                                                               $sectionRec_temp = $this->sys_page->getMenu($v_b['uid'], '*', $altSortField);
                                                                                if (count($sectionRec_temp)) {
                                                                                        reset($sectionRec_temp);
                                                                                        $recArr['nextsection']=pos($sectionRec_temp);
@@ -689,7 +689,7 @@ class tslib_menu {
                                                                        }
                                                                        if ($v_b['uid']==$value_rec['pid']) {
                                                                                if ($lastKey) {
-                                                                                       $sectionRec_temp = $this->sys_page->getMenu($prevnextsection_menu[$lastKey]['uid'],'*',$altSortField);
+                                                                                       $sectionRec_temp = $this->sys_page->getMenu($prevnextsection_menu[$lastKey]['uid'], '*', $altSortField);
                                                                                        if (count($sectionRec_temp)) {
                                                                                                reset($sectionRec_temp);
                                                                                                $recArr['prevsection']=pos($sectionRec_temp);
@@ -711,7 +711,7 @@ class tslib_menu {
                                                                }
                                                        }
 
-                                                       $items = explode('|',$this->conf['special.']['items']);
+                                                       $items = explode('|', $this->conf['special.']['items']);
                                                        $c=0;
                                                        foreach ($items as $k_b => $v_b) {
                                                                $v_b=strtolower(trim($v_b));
@@ -749,7 +749,7 @@ class tslib_menu {
                        } elseif ($this->mconf['sectionIndex']) {
                                $temp = $this->sectionIndex($altSortField);
                        } else {        // Default:
-                               $temp = $this->sys_page->getMenu($this->id,'*',$altSortField);          // gets the menu
+                               $temp = $this->sys_page->getMenu($this->id, '*', $altSortField);                // gets the menu
                        }
 
                        $c=0;
@@ -785,7 +785,7 @@ class tslib_menu {
                                // Fill in the menuArr with elements that should go into the menu:
                        $this->menuArr = Array();
                        foreach($temp as $data) {
-                               $spacer = (t3lib_div::inList($this->spacerIDList,$data['doktype']) || !strcmp($data['ITEM_STATE'],'SPC')) ? 1 : 0;              // if item is a spacer, $spacer is set
+                               $spacer = (t3lib_div::inList($this->spacerIDList, $data['doktype']) || !strcmp($data['ITEM_STATE'], 'SPC')) ? 1 : 0;            // if item is a spacer, $spacer is set
                                if ($this->filterMenuPages($data, $banUidArray, $spacer)) {
                                        $c_b++;
                                        if ($begin<=$c_b)       {               // If the beginning item has been reached.
@@ -812,7 +812,7 @@ class tslib_menu {
                                //      Passing the menuArr through a user defined function:
                        if ($this->mconf['itemArrayProcFunc']) {
                                if (!is_array($this->parentMenuArr)) {$this->parentMenuArr=array();}
-                               $this->menuArr = $this->userProcess('itemArrayProcFunc',$this->menuArr);
+                               $this->menuArr = $this->userProcess('itemArrayProcFunc', $this->menuArr);
                        }
                                // Setting number of menu items
                        $GLOBALS['TSFE']->register['count_menuItems'] = count($this->menuArr);
@@ -850,7 +850,7 @@ class tslib_menu {
         * @param       boolean         If set, then the page is a spacer.
         * @return      boolean         Returns TRUE if the page can be safely included.
         */
-       function filterMenuPages(&$data,$banUidArray,$spacer) {
+       function filterMenuPages(&$data, $banUidArray, $spacer) {
 
                $includePage = TRUE;
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/tslib/class.tslib_menu.php']['filterMenuPages'])) {
@@ -872,9 +872,9 @@ class tslib_menu {
 
                $uid = $data['uid'];
                if ($this->mconf['SPC'] || !$spacer)    {       // If the spacer-function is not enabled, spacers will not enter the $menuArr
-                       if (!t3lib_div::inList($this->doktypeExcludeList,$data['doktype']))     {               // Page may not be 'not_in_menu' or 'Backend User Section'
+                       if (!t3lib_div::inList($this->doktypeExcludeList, $data['doktype']))    {               // Page may not be 'not_in_menu' or 'Backend User Section'
                                if (!$data['nav_hide'] || $this->conf['includeNotInMenu'])      {       // Not hidden in navigation
-                                       if (!t3lib_div::inArray($banUidArray,$uid))     {       // not in banned uid's
+                                       if (!t3lib_div::inArray($banUidArray, $uid))    {       // not in banned uid's
 
                                                        // Checks if the default language version can be shown:
                                                        // Block page is set, if l18n_cfg allows plus: 1) Either default language or 2) another language but NO overlay record set for page!
@@ -926,12 +926,12 @@ class tslib_menu {
 
                        // Prepare normal settings
                if (!is_array($this->mconf['NO.']) && $this->mconf['NO'])       $this->mconf['NO.']=array();    // Setting a blank array if NO=1 and there are no properties.
-               $NOconf = $this->tmpl->splitConfArray($this->mconf['NO.'],$splitCount);
+               $NOconf = $this->tmpl->splitConfArray($this->mconf['NO.'], $splitCount);
 
                        // Prepare rollOver settings, overriding normal settings
                $ROconf=array();
                if ($this->mconf['RO']) {
-                       $ROconf = $this->tmpl->splitConfArray($this->mconf['RO.'],$splitCount);
+                       $ROconf = $this->tmpl->splitConfArray($this->mconf['RO.'], $splitCount);
                }
 
                        // Prepare IFSUB settings, overriding normal settings
@@ -939,11 +939,11 @@ class tslib_menu {
                if ($this->mconf['IFSUB']) {
                        $IFSUBinit = 0; // Flag: If $IFSUB is generated
                        foreach ($NOconf as $key => $val) {
-                               if ($this->isItemState('IFSUB',$key)) {
+                               if ($this->isItemState('IFSUB', $key)) {
                                        if (!$IFSUBinit)        {       // if this is the first IFSUB element, we must generate IFSUB.
-                                               $IFSUBconf = $this->tmpl->splitConfArray($this->mconf['IFSUB.'],$splitCount);
+                                               $IFSUBconf = $this->tmpl->splitConfArray($this->mconf['IFSUB.'], $splitCount);
                                                if ($this->mconf['IFSUBRO']) {
-                                                       $IFSUBROconf = $this->tmpl->splitConfArray($this->mconf['IFSUBRO.'],$splitCount);
+                                                       $IFSUBROconf = $this->tmpl->splitConfArray($this->mconf['IFSUBRO.'], $splitCount);
                                                }
                                                $IFSUBinit = 1;
                                        }
@@ -958,12 +958,12 @@ class tslib_menu {
                if ($this->mconf['ACT']) {
                        $ACTinit = 0;   // Flag: If $ACT is generated
                        foreach ($NOconf as $key => $val) {     // Find active
-                               if ($this->isItemState('ACT',$key)) {
+                               if ($this->isItemState('ACT', $key)) {
                                        if (!$ACTinit)  {       // if this is the first 'active', we must generate ACT.
-                                               $ACTconf = $this->tmpl->splitConfArray($this->mconf['ACT.'],$splitCount);
+                                               $ACTconf = $this->tmpl->splitConfArray($this->mconf['ACT.'], $splitCount);
                                                        // Prepare active rollOver settings, overriding normal active settings
                                                if ($this->mconf['ACTRO']) {
-                                                       $ACTROconf = $this->tmpl->splitConfArray($this->mconf['ACTRO.'],$splitCount);
+                                                       $ACTROconf = $this->tmpl->splitConfArray($this->mconf['ACTRO.'], $splitCount);
                                                }
                                                $ACTinit = 1;
                                        }
@@ -979,12 +979,12 @@ class tslib_menu {
                if ($this->mconf['ACTIFSUB']) {
                        $ACTIFSUBinit = 0;      // Flag: If $ACTIFSUB is generated
                        foreach ($NOconf as $key => $val) {     // Find active
-                               if ($this->isItemState('ACTIFSUB',$key)) {
+                               if ($this->isItemState('ACTIFSUB', $key)) {
                                        if (!$ACTIFSUBinit)     {       // if this is the first 'active', we must generate ACTIFSUB.
-                                               $ACTIFSUBconf = $this->tmpl->splitConfArray($this->mconf['ACTIFSUB.'],$splitCount);
+                                               $ACTIFSUBconf = $this->tmpl->splitConfArray($this->mconf['ACTIFSUB.'], $splitCount);
                                                        // Prepare active rollOver settings, overriding normal active settings
                                                if ($this->mconf['ACTIFSUBRO']) {
-                                                       $ACTIFSUBROconf = $this->tmpl->splitConfArray($this->mconf['ACTIFSUBRO.'],$splitCount);
+                                                       $ACTIFSUBROconf = $this->tmpl->splitConfArray($this->mconf['ACTIFSUBRO.'], $splitCount);
                                                }
                                                $ACTIFSUBinit = 1;
                                        }
@@ -1000,11 +1000,11 @@ class tslib_menu {
                if ($this->mconf['CUR']) {
                        $CURinit = 0;   // Flag: If $CUR is generated
                        foreach ($NOconf as $key => $val) {
-                               if ($this->isItemState('CUR',$key)) {
+                               if ($this->isItemState('CUR', $key)) {
                                        if (!$CURinit)  {       // if this is the first 'current', we must generate CUR. Basically this control is just inherited from the other implementations as current would only exist one time and thats it (unless you use special-features of HMENU)
-                                               $CURconf = $this->tmpl->splitConfArray($this->mconf['CUR.'],$splitCount);
+                                               $CURconf = $this->tmpl->splitConfArray($this->mconf['CUR.'], $splitCount);
                                                if ($this->mconf['CURRO']) {
-                                                       $CURROconf = $this->tmpl->splitConfArray($this->mconf['CURRO.'],$splitCount);
+                                                       $CURROconf = $this->tmpl->splitConfArray($this->mconf['CURRO.'], $splitCount);
                                                }
                                                $CURinit = 1;
                                        }
@@ -1020,12 +1020,12 @@ class tslib_menu {
                if ($this->mconf['CURIFSUB']) {
                        $CURIFSUBinit = 0;      // Flag: If $CURIFSUB is generated
                        foreach ($NOconf as $key => $val) {
-                               if ($this->isItemState('CURIFSUB',$key)) {
+                               if ($this->isItemState('CURIFSUB', $key)) {
                                        if (!$CURIFSUBinit)     {       // if this is the first 'current', we must generate CURIFSUB.
-                                               $CURIFSUBconf = $this->tmpl->splitConfArray($this->mconf['CURIFSUB.'],$splitCount);
+                                               $CURIFSUBconf = $this->tmpl->splitConfArray($this->mconf['CURIFSUB.'], $splitCount);
                                                        // Prepare current rollOver settings, overriding normal current settings
                                                if ($this->mconf['CURIFSUBRO']) {
-                                                       $CURIFSUBROconf = $this->tmpl->splitConfArray($this->mconf['CURIFSUBRO.'],$splitCount);
+                                                       $CURIFSUBROconf = $this->tmpl->splitConfArray($this->mconf['CURIFSUBRO.'], $splitCount);
                                                }
                                                $CURIFSUBinit = 1;
                                        }
@@ -1040,12 +1040,12 @@ class tslib_menu {
                if ($this->mconf['USR']) {
                        $USRinit = 0;   // Flag: If $USR is generated
                        foreach ($NOconf as $key => $val) {     // Find active
-                               if ($this->isItemState('USR',$key)) {
+                               if ($this->isItemState('USR', $key)) {
                                        if (!$USRinit)  {       // if this is the first active, we must generate USR.
-                                               $USRconf = $this->tmpl->splitConfArray($this->mconf['USR.'],$splitCount);
+                                               $USRconf = $this->tmpl->splitConfArray($this->mconf['USR.'], $splitCount);
                                                        // Prepare active rollOver settings, overriding normal active settings
                                                if ($this->mconf['USRRO']) {
-                                                       $USRROconf = $this->tmpl->splitConfArray($this->mconf['USRRO.'],$splitCount);
+                                                       $USRROconf = $this->tmpl->splitConfArray($this->mconf['USRRO.'], $splitCount);
                                                }
                                                $USRinit = 1;
                                        }
@@ -1060,9 +1060,9 @@ class tslib_menu {
                if ($this->mconf['SPC']) {
                        $SPCinit = 0;   // Flag: If $SPC is generated
                        foreach ($NOconf as $key => $val) {     // Find spacers
-                               if ($this->isItemState('SPC',$key)) {
+                               if ($this->isItemState('SPC', $key)) {
                                        if (!$SPCinit)  {       // if this is the first spacer, we must generate SPC.
-                                               $SPCconf = $this->tmpl->splitConfArray($this->mconf['SPC.'],$splitCount);
+                                               $SPCconf = $this->tmpl->splitConfArray($this->mconf['SPC.'], $splitCount);
                                                $SPCinit = 1;
                                        }
                                        $NOconf[$key] = $SPCconf[$key];         // Substitute normal with spacer
@@ -1073,12 +1073,12 @@ class tslib_menu {
                if ($this->mconf['USERDEF1']) {
                        $USERDEF1init = 0;      // Flag: If $USERDEF1 is generated
                        foreach ($NOconf as $key => $val) {     // Find active
-                               if ($this->isItemState('USERDEF1',$key)) {
+                               if ($this->isItemState('USERDEF1', $key)) {
                                        if (!$USERDEF1init)     {       // if this is the first active, we must generate USERDEF1.
-                                               $USERDEF1conf = $this->tmpl->splitConfArray($this->mconf['USERDEF1.'],$splitCount);
+                                               $USERDEF1conf = $this->tmpl->splitConfArray($this->mconf['USERDEF1.'], $splitCount);
                                                        // Prepare active rollOver settings, overriding normal active settings
                                                if ($this->mconf['USERDEF1RO']) {
-                                                       $USERDEF1ROconf = $this->tmpl->splitConfArray($this->mconf['USERDEF1RO.'],$splitCount);
+                                                       $USERDEF1ROconf = $this->tmpl->splitConfArray($this->mconf['USERDEF1RO.'], $splitCount);
                                                }
                                                $USERDEF1init = 1;
                                        }
@@ -1093,12 +1093,12 @@ class tslib_menu {
                if ($this->mconf['USERDEF2']) {
                        $USERDEF2init = 0;      // Flag: If $USERDEF2 is generated
                        foreach ($NOconf as $key => $val) {     // Find active
-                               if ($this->isItemState('USERDEF2',$key)) {
+                               if ($this->isItemState('USERDEF2', $key)) {
                                        if (!$USERDEF2init)     {       // if this is the first active, we must generate USERDEF2.
-                                               $USERDEF2conf = $this->tmpl->splitConfArray($this->mconf['USERDEF2.'],$splitCount);
+                                               $USERDEF2conf = $this->tmpl->splitConfArray($this->mconf['USERDEF2.'], $splitCount);
                                                        // Prepare active rollOver settings, overriding normal active settings
                                                if ($this->mconf['USERDEF2RO']) {
-                                                       $USERDEF2ROconf = $this->tmpl->splitConfArray($this->mconf['USERDEF2RO.'],$splitCount);
+                                                       $USERDEF2ROconf = $this->tmpl->splitConfArray($this->mconf['USERDEF2RO.'], $splitCount);
                                                }
                                                $USERDEF2init = 1;
                                        }
@@ -1110,7 +1110,7 @@ class tslib_menu {
                        }
                }
 
-               return array($NOconf,$ROconf);
+               return array($NOconf, $ROconf);
        }
 
        /**
@@ -1123,7 +1123,7 @@ class tslib_menu {
         * @return      array           Returns an array with A-tag attributes as key/value pairs (HREF, TARGET and onClick)
         * @access private
         */
-       function link($key,$altTarget='',$typeOverride='') {
+       function link($key, $altTarget='', $typeOverride='') {
 
                        // Mount points:
                $MP_var = $this->getMPvar($key);
@@ -1152,9 +1152,9 @@ class tslib_menu {
                        // Creating link:
                if ($this->mconf['collapse'] && $this->isActive($this->menuArr[$key]['uid'], $this->getMPvar($key))) {
                        $thePage = $this->sys_page->getPage($this->menuArr[$key]['pid']);
-                       $LD = $this->menuTypoLink($thePage,$mainTarget,'','',$overrideArray, $this->mconf['addParams'].$MP_params.$this->menuArr[$key]['_ADD_GETVARS'], $typeOverride);
+                       $LD = $this->menuTypoLink($thePage, $mainTarget, '', '', $overrideArray, $this->mconf['addParams'].$MP_params.$this->menuArr[$key]['_ADD_GETVARS'], $typeOverride);
                } else {
-                       $LD = $this->menuTypoLink($this->menuArr[$key],$mainTarget,'','',$overrideArray, $this->mconf['addParams'].$MP_params.$this->I['val']['additionalParams'].$this->menuArr[$key]['_ADD_GETVARS'], $typeOverride);
+                       $LD = $this->menuTypoLink($this->menuArr[$key], $mainTarget, '', '', $overrideArray, $this->mconf['addParams'].$MP_params.$this->I['val']['additionalParams'].$this->menuArr[$key]['_ADD_GETVARS'], $typeOverride);
                }
 
                        // Override URL if using "External URL" as doktype with a valid e-mail address:
@@ -1192,7 +1192,7 @@ class tslib_menu {
                }
 
                        // Manipulation in case of access restricted pages:
-               $this->changeLinksForAccessRestrictedPages($LD,$this->menuArr[$key],$mainTarget,$typeOverride);
+               $this->changeLinksForAccessRestrictedPages($LD, $this->menuArr[$key], $mainTarget, $typeOverride);
 
                        // Overriding URL / Target if set to do so:
                if ($this->menuArr[$key]['_OVERRIDE_HREF']) {
@@ -1260,9 +1260,9 @@ class tslib_menu {
                        $thePage = $this->sys_page->getPage($this->mconf['showAccessRestrictedPages']);
 
                        $addParams = $this->mconf['showAccessRestrictedPages.']['addParams'];
-                       $addParams = str_replace('###RETURN_URL###',rawurlencode($LD['totalURL']),$addParams);
-                       $addParams = str_replace('###PAGE_ID###',$page['uid'],$addParams);
-                       $LD = $this->menuTypoLink($thePage,$mainTarget,'','','', $addParams, $typeOverride);
+                       $addParams = str_replace('###RETURN_URL###', rawurlencode($LD['totalURL']), $addParams);
+                       $addParams = str_replace('###PAGE_ID###', $page['uid'], $addParams);
+                       $LD = $this->menuTypoLink($thePage,$mainTarget, '', '', '', $addParams, $typeOverride);
                }
        }
 
@@ -1284,7 +1284,7 @@ class tslib_menu {
 
                        // Make submenu if the page is the next active
                $cls = strtolower($this->conf[($this->menuNumber+1).$objSuffix]);
-               $subLevelClass = ($cls && t3lib_div::inList($this->tmpl->menuclasses,$cls)) ? $cls : '';
+               $subLevelClass = ($cls && t3lib_div::inList($this->tmpl->menuclasses, $cls)) ? $cls : '';
 
                        // stdWrap for expAll
                if (isset($this->mconf['expAll.'])) {
@@ -1336,7 +1336,7 @@ class tslib_menu {
        function isNext($uid, $MPvar='') {
 
                        // Check for always active PIDs:
-               if (count($this->alwaysActivePIDlist) && in_array($uid,$this->alwaysActivePIDlist)) {
+               if (count($this->alwaysActivePIDlist) && in_array($uid, $this->alwaysActivePIDlist)) {
                        return TRUE;
                }
 
@@ -1357,7 +1357,7 @@ class tslib_menu {
        function isActive($uid, $MPvar='') {
 
                        // Check for always active PIDs:
-               if (count($this->alwaysActivePIDlist) && in_array($uid,$this->alwaysActivePIDlist)) {
+               if (count($this->alwaysActivePIDlist) && in_array($uid, $this->alwaysActivePIDlist)) {
                        return TRUE;
                }
 
@@ -1377,7 +1377,7 @@ class tslib_menu {
         */
        function isCurrent($uid, $MPvar='') {
                $testUid = $uid.($MPvar?':'.$MPvar:'');
-               if ($uid && !strcmp(end($this->rL_uidRegister),'ITEM:'.$testUid)) {
+               if ($uid && !strcmp(end($this->rL_uidRegister), 'ITEM:'.$testUid)) {
                        return TRUE;
                }
        }
@@ -1445,10 +1445,10 @@ class tslib_menu {
         * @access private
         * @see procesItemStates()
         */
-       function isItemState($kind,$key) {
+       function isItemState($kind, $key) {
                $natVal=0;
                if ($this->menuArr[$key]['ITEM_STATE']) {               // If any value is set for ITEM_STATE the normal evaluation is discarded
-                       if (!strcmp($this->menuArr[$key]['ITEM_STATE'],$kind))  {$natVal=1;}
+                       if (!strcmp($this->menuArr[$key]['ITEM_STATE'], $kind)) {$natVal=1;}
                } else {
                        switch($kind) {
                                case 'SPC':
@@ -1492,7 +1492,7 @@ class tslib_menu {
                $title = trim(strip_tags($title));
                $titleLen = strlen($title);
                for ($a=0;$a<$titleLen;$a++) {
-                       $key = strtoupper(substr($title,$a,1));
+                       $key = strtoupper(substr($title, $a, 1));
                        if (preg_match('/[A-Z]/', $key) && !isset($GLOBALS['TSFE']->accessKey[$key])) {
                                $GLOBALS['TSFE']->accessKey[$key] = 1;
                                $result['code'] = ' accesskey="'.$key.'"';
@@ -1513,7 +1513,7 @@ class tslib_menu {
         * @return      mixed           The processed $passVar
         * @access private
         */
-       function userProcess($mConfKey,$passVar) {
+       function userProcess($mConfKey, $passVar) {
                if ($this->mconf[$mConfKey]) {
                        $funcConf = $this->mconf[$mConfKey.'.'];
                        $funcConf['parentObj'] = $this;
@@ -1529,7 +1529,7 @@ class tslib_menu {
         * @access private
         */
        function setATagParts() {
-               $this->I['A1'] = '<a '.t3lib_div::implodeAttributes($this->I['linkHREF'],1).' '.$this->I['val']['ATagParams'].$this->I['accessKey']['code'].'>';
+               $this->I['A1'] = '<a '.t3lib_div::implodeAttributes($this->I['linkHREF'], 1).' '.$this->I['val']['ATagParams'].$this->I['accessKey']['code'].'>';
                $this->I['A2'] = '</a>';
        }
 
@@ -1541,8 +1541,8 @@ class tslib_menu {
         * @return      string          Returns the navigation title if it is NOT blank, otherwise the page title.
         * @access private
         */
-       function getPageTitle($title,$nav_title) {
-               return strcmp(trim($nav_title),'') ? $nav_title : $title;
+       function getPageTitle($title, $nav_title) {
+               return strcmp(trim($nav_title), '') ? $nav_title : $title;
        }
 
        /**
@@ -1557,7 +1557,7 @@ class tslib_menu {
                if ($GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids']) {
                        $localMP_array = $this->MP_array;
                        if ($this->menuArr[$key]['_MP_PARAM'])  $localMP_array[] = $this->menuArr[$key]['_MP_PARAM'];   // NOTICE: "_MP_PARAM" is allowed to be a commalist of PID pairs!
-                       $MP_params = count($localMP_array) ? implode(',',$localMP_array) : '';
+                       $MP_params = count($localMP_array) ? implode(',', $localMP_array) : '';
                        return $MP_params;
                }
        }
@@ -1756,17 +1756,17 @@ class tslib_tmenu extends tslib_menu {
                if (is_array($this->result) && count($this->result)) {
                        $this->WMcObj = t3lib_div::makeInstance('tslib_cObj');  // Create new tslib_cObj for our use
                        $this->WMresult = '';
-                       $this->INPfixMD5 = substr(md5(microtime().'tmenu'),0,4);
+                       $this->INPfixMD5 = substr(md5(microtime().'tmenu'), 0, 4);
                        $this->WMmenuItems = count($this->result);
 
-                       $this->WMsubmenuObjSuffixes = $this->tmpl->splitConfArray(array('sOSuffix'=>$this->mconf['submenuObjSuffixes']),$this->WMmenuItems);
+                       $this->WMsubmenuObjSuffixes = $this->tmpl->splitConfArray(array('sOSuffix'=>$this->mconf['submenuObjSuffixes']), $this->WMmenuItems);
 
                        $this->extProc_init();
                        foreach ($this->result as $key => $val) {
                                $GLOBALS['TSFE']->register['count_HMENU_MENUOBJ']++;
                                $GLOBALS['TSFE']->register['count_MENUOBJ']++;
 
-                               $this->WMcObj->start($this->menuArr[$key],'pages');             // Initialize the cObj with the page record of the menu item
+                               $this->WMcObj->start($this->menuArr[$key], 'pages');            // Initialize the cObj with the page record of the menu item
 
                                $this->I = array();
                                $this->I['key'] = $key;
@@ -1774,7 +1774,7 @@ class tslib_tmenu extends tslib_menu {
                                $this->I['val'] = $val;
                                $this->I['title'] = isset($this->I['val']['stdWrap.'])
                                        ? $this->WMcObj->stdWrap($this->getPageTitle($this->menuArr[$key]['title'], $this->menuArr[$key]['nav_title']), $this->I['val']['stdWrap.'])
-                                       : $this->getPageTitle($this->menuArr[$key]['title'],$this->menuArr[$key]['nav_title']);
+                                       : $this->getPageTitle($this->menuArr[$key]['title'], $this->menuArr[$key]['nav_title']);
                                $this->I['uid'] = $this->menuArr[$key]['uid'];
                                $this->I['mount_pid'] = $this->menuArr[$key]['mount_pid'];
                                $this->I['pid'] = $this->menuArr[$key]['pid'];
@@ -1792,7 +1792,7 @@ class tslib_tmenu extends tslib_menu {
                                if(isset($this->I['val']['additionalParams.'])) {
                                        $this->I['val']['additionalParams'] = $this->WMcObj->stdWrap($this->I['val']['additionalParams'], $this->I['val']['additionalParams.']);
                                }
-                               $this->I['linkHREF'] = $this->link($key,$this->I['val']['altTarget'],$this->mconf['forceTypeValue']);
+                               $this->I['linkHREF'] = $this->link($key, $this->I['val']['altTarget'], $this->mconf['forceTypeValue']);
 
                                        // Title attribute of links:
                                $titleAttrValue = isset($this->I['val']['ATagTitle.'])
@@ -1822,9 +1822,9 @@ class tslib_tmenu extends tslib_menu {
                                                // Change background color:
                                        if ($this->I['val']['RO_chBgColor']) {
                                                $this->addJScolorShiftFunction();
-                                               $chBgP = t3lib_div::trimExplode('|',$this->I['val']['RO_chBgColor']);
-                                               $this->I['linkHREF']['onMouseover'].="changeBGcolor('".$chBgP[2].$this->I['uid']."','".$chBgP[0]."');";
-                                               $this->I['linkHREF']['onMouseout'].="changeBGcolor('".$chBgP[2].$this->I['uid']."','".$chBgP[1]."');";
+                                               $chBgP = t3lib_div::trimExplode('|', $this->I['val']['RO_chBgColor']);
+                                               $this->I['linkHREF']['onMouseover'].="changeBGcolor('".$chBgP[2].$this->I['uid']."', '".$chBgP[0]."');";
+                                               $this->I['linkHREF']['onMouseout'].="changeBGcolor('".$chBgP[2].$this->I['uid']."', '".$chBgP[1]."');";
                                        }
 
                                        $this->extProc_RO($key);
@@ -1850,18 +1850,18 @@ class tslib_tmenu extends tslib_menu {
 
                                        // ATagBeforeWrap processing:
                                if ($this->I['val']['ATagBeforeWrap']) {
-                                       $wrapPartsBefore = explode('|',$this->I['val']['linkWrap']);
-                                       $wrapPartsAfter = array('','');
+                                       $wrapPartsBefore = explode('|', $this->I['val']['linkWrap']);
+                                       $wrapPartsAfter = array('', '');
                                } else {
-                                       $wrapPartsBefore = array('','');
-                                       $wrapPartsAfter = explode('|',$this->I['val']['linkWrap']);
+                                       $wrapPartsBefore = array('', '');
+                                       $wrapPartsAfter = explode('|', $this->I['val']['linkWrap']);
                                }
                                if ($this->I['val']['stdWrap2'] || isset($this->I['val']['stdWrap2.'])) {
                                        $stdWrap2 = isset($this->I['val']['stdWrap2.'])
                                                ? $this->WMcObj->stdWrap('|', $this->I['val']['stdWrap2.'])
                                                : '|';
                                        $wrapPartsStdWrap = explode($this->I['val']['stdWrap2'] ? $this->I['val']['stdWrap2'] : '|', $stdWrap2);
-                               } else {$wrapPartsStdWrap = array('','');}
+                               } else {$wrapPartsStdWrap = array('', '');}
 
                                        // Make before, middle and after parts
                                $this->I['parts'] = array();
@@ -1887,20 +1887,20 @@ class tslib_tmenu extends tslib_menu {
 
                                        // Passing I to a user function
                                if ($this->mconf['IProcFunc']) {
-                                       $this->I = $this->userProcess('IProcFunc',$this->I);
+                                       $this->I = $this->userProcess('IProcFunc', $this->I);
                                }
 
                                        // Merge parts + beforeAllWrap
-                               $this->I['theItem']= implode('',$this->I['parts']);
-                               $this->I['theItem']= $this->extProc_beforeAllWrap($this->I['theItem'],$key);
+                               $this->I['theItem']= implode('', $this->I['parts']);
+                               $this->I['theItem']= $this->extProc_beforeAllWrap($this->I['theItem'], $key);
 
                                        // allWrap:
                                $allWrap = isset($this->I['val']['allWrap.'])
                                        ? $this->WMcObj->stdWrap($this->I['val']['allWrap'], $this->I['val']['allWrap.'])
                                        : $this->I['val']['allWrap'];
-                               $this->I['theItem'] = $this->tmpl->wrap($this->I['theItem'],$allWrap);
+                               $this->I['theItem'] = $this->tmpl->wrap($this->I['theItem'], $allWrap);
 
-                               if ($this->I['val']['subst_elementUid'])        $this->I['theItem'] = str_replace('{elementUid}',$this->I['uid'],$this->I['theItem']);
+                               if ($this->I['val']['subst_elementUid'])        $this->I['theItem'] = str_replace('{elementUid}', $this->I['uid'], $this->I['theItem']);
 
                                        // allStdWrap:
                                if (is_array($this->I['val']['allStdWrap.'])) {
@@ -1922,10 +1922,10 @@ class tslib_tmenu extends tslib_menu {
         */
        function getBeforeAfter($pref) {
                $res = '';
-               if ($imgInfo = $this->WMcObj->getImgResource($this->I['val'][$pref.'Img'],$this->I['val'][$pref.'Img.'])) {
+               if ($imgInfo = $this->WMcObj->getImgResource($this->I['val'][$pref.'Img'], $this->I['val'][$pref.'Img.'])) {
                        $imgInfo[3] = t3lib_div::png_to_gif_by_imagemagick($imgInfo[3]);
                        if ($this->I['val']['RO'] && $this->I['val'][$pref.'ROImg'] && !$this->I['spacer']) {
-                               $imgROInfo = $this->WMcObj->getImgResource($this->I['val'][$pref.'ROImg'],$this->I['val'][$pref.'ROImg.']);
+                               $imgROInfo = $this->WMcObj->getImgResource($this->I['val'][$pref.'ROImg'], $this->I['val'][$pref.'ROImg.']);
                                $imgROInfo[3] = t3lib_div::png_to_gif_by_imagemagick($imgROInfo[3]);
                                if ($imgROInfo) {
                                        $theName = $this->imgNamePrefix.$this->I['uid'].$this->I['INPfix'].$pref;
@@ -1942,7 +1942,7 @@ class tslib_tmenu extends tslib_menu {
                                $name .
                                ($this->I['val'][$pref.'ImgTagParams'] ? ' ' . $this->I['val'][$pref.'ImgTagParams'] : '') .
                                tslib_cObj::getBorderAttr(' border="0"');
-                       if (!strstr($res,'alt="')) {
+                       if (!strstr($res, 'alt="')) {
                                $res .= ' alt=""'; // Adding alt attribute if not set.
                        }
                        $res.=' />';
@@ -2031,7 +2031,7 @@ class tslib_tmenu extends tslib_menu {
                $part = isset($this->I['val']['wrapItemAndSub.'])
                        ? $this->WMcObj->stdWrap($this->I['val']['wrapItemAndSub'], $this->I['val']['wrapItemAndSub.'])
                        : $this->I['val']['wrapItemAndSub'];
-               $this->WMresult.= $part ? $this->tmpl->wrap($this->I['theItem'],$part) : $this->I['theItem'];
+               $this->WMresult.= $part ? $this->tmpl->wrap($this->I['theItem'], $part) : $this->I['theItem'];
        }
 
        /**
@@ -2043,7 +2043,7 @@ class tslib_tmenu extends tslib_menu {
         * @access private
         * @see writeMenu(), tslib_tmenu_layers::extProc_beforeAllWrap()
         */
-       function extProc_beforeAllWrap($item,$key) {
+       function extProc_beforeAllWrap($item, $key) {
                return $item;
        }
 
@@ -2059,7 +2059,7 @@ class tslib_tmenu extends tslib_menu {
                if (is_array($this->mconf['stdWrap.'])) {
                        $this->WMresult = $this->WMcObj->stdWrap($this->WMresult, $this->mconf['stdWrap.']);
                }
-               return $this->tmpl->wrap($this->WMresult,$this->mconf['wrap']).$this->WMextraScript;
+               return $this->tmpl->wrap($this->WMresult, $this->mconf['wrap']).$this->WMextraScript;
        }
 }
 
@@ -2111,7 +2111,7 @@ class tslib_gmenu extends tslib_menu {
                        $temp_HMENU_MENUOBJ = $GLOBALS['TSFE']->register['count_HMENU_MENUOBJ'];
                        $temp_MENUOBJ = $GLOBALS['TSFE']->register['count_MENUOBJ'];
                                // Now we generate the giffiles:
-                       $this->makeGifs($NOconf,'NO');
+                       $this->makeGifs($NOconf, 'NO');
                                // store count from NO obj
                        $tempcnt_HMENU_MENUOBJ = $GLOBALS['TSFE']->register['count_HMENU_MENUOBJ'];
                        $tempcnt_MENUOBJ = $GLOBALS['TSFE']->register['count_MENUOBJ'];
@@ -2124,7 +2124,7 @@ class tslib_gmenu extends tslib_menu {
                                        //start recount for rollover with initial values
                                $GLOBALS['TSFE']->register['count_HMENU_MENUOBJ']= $temp_HMENU_MENUOBJ;
                                $GLOBALS['TSFE']->register['count_MENUOBJ']= $temp_MENUOBJ;
-                               $this->makeGifs($ROconf,'RO');
+                               $this->makeGifs($ROconf, 'RO');
                                if ($this->mconf['debugItemConf']) {
                                        echo '<h3>$ROconf:</h3>';
                                        debug($ROconf);
@@ -2160,13 +2160,13 @@ class tslib_gmenu extends tslib_menu {
                        $Hcounter = 0;
                        $Wcounter = 0;
                        $Hobjs = $this->mconf['applyTotalH'];
-                       if ($Hobjs)     {$Hobjs = t3lib_div::intExplode(',',$Hobjs);}
+                       if ($Hobjs)     {$Hobjs = t3lib_div::intExplode(',', $Hobjs);}
                        $Wobjs = $this->mconf['applyTotalW'];
-                       if ($Wobjs)     {$Wobjs = t3lib_div::intExplode(',',$Wobjs);}
+                       if ($Wobjs)     {$Wobjs = t3lib_div::intExplode(',', $Wobjs);}
                        $minDim = $this->mconf['min'];
-                       if ($minDim) {$minDim = tslib_cObj::calcIntExplode(',',$minDim.',');}
+                       if ($minDim) {$minDim = tslib_cObj::calcIntExplode(',', $minDim.',');}
                        $maxDim = $this->mconf['max'];
-                       if ($maxDim) {$maxDim = tslib_cObj::calcIntExplode(',',$maxDim.',');}
+                       if ($maxDim) {$maxDim = tslib_cObj::calcIntExplode(',', $maxDim.',');}
 
                        if ($minDim) {
                                $conf[$items]=$conf[$items-1];
@@ -2176,13 +2176,13 @@ class tslib_gmenu extends tslib_menu {
 
                        // TOTAL width
                        if ($this->mconf['useLargestItemX'] || $this->mconf['useLargestItemY'] || $this->mconf['distributeX'] || $this->mconf['distributeY']) {
-                               $totalWH = $this->findLargestDims($conf,$items,$Hobjs,$Wobjs,$minDim,$maxDim);
+                               $totalWH = $this->findLargestDims($conf, $items, $Hobjs, $Wobjs, $minDim, $maxDim);
                        }
                }
 
                $c=0;
                $maxFlag=0;
-               $distributeAccu=array('H'=>0,'W'=>0);
+               $distributeAccu=array('H'=>0, 'W'=>0);
                foreach ($conf as $key => $val) {
                        $GLOBALS['TSFE']->register['count_HMENU_MENUOBJ']++;
                        $GLOBALS['TSFE']->register['count_MENUOBJ']++;
@@ -2190,7 +2190,7 @@ class tslib_gmenu extends tslib_menu {
                        if ($items==($c+1) && $minDim) {
                                $Lobjs = $this->mconf['removeObjectsOfDummy'];
                                if ($Lobjs) {
-                                       $Lobjs = t3lib_div::intExplode(',',$Lobjs);
+                                       $Lobjs = t3lib_div::intExplode(',', $Lobjs);
                                        foreach ($Lobjs as $remItem) {
                                                unset($val[$remItem]);
                                                unset($val[$remItem.'.']);
@@ -2198,7 +2198,7 @@ class tslib_gmenu extends tslib_menu {
                                }
 
                                $flag =0;
-                               $tempXY = explode(',',$val['XY']);
+                               $tempXY = explode(',', $val['XY']);
                                if ($Wcounter<$minDim[0]) {
                                        $tempXY[0] = $minDim[0] - $Wcounter;
                                        $flag = 1;
@@ -2207,7 +2207,7 @@ class tslib_gmenu extends tslib_menu {
                                        $tempXY[1] = $minDim[1] - $Hcounter;
                                        $flag = 1;
                                }
-                               $val['XY'] = implode(',',$tempXY);
+                               $val['XY'] = implode(',', $tempXY);
                                if (!$flag){break;}
                        }
                        $c++;
@@ -2217,23 +2217,23 @@ class tslib_gmenu extends tslib_menu {
                                        // Pre-working the item
                                $gifCreator = t3lib_div::makeInstance('tslib_gifBuilder');
                                $gifCreator->init();
-                               $gifCreator->start($val,$this->menuArr[$key]);
+                               $gifCreator->start($val, $this->menuArr[$key]);
 
                                        // If useLargestItemH/W is specified
                                if (count($totalWH) && ($this->mconf['useLargestItemX'] || $this->mconf['useLargestItemY'])) {
-                                       $tempXY = explode(',',$gifCreator->setup['XY']);
+                                       $tempXY = explode(',', $gifCreator->setup['XY']);
                                        if ($this->mconf['useLargestItemX'])    {$tempXY[0] = max($totalWH['W']);}
                                        if ($this->mconf['useLargestItemY'])    {$tempXY[1] = max($totalWH['H']);}
                                                // regenerate the new values...
-                                       $val['XY'] = implode(',',$tempXY);
+                                       $val['XY'] = implode(',', $tempXY);
                                        $gifCreator = t3lib_div::makeInstance('tslib_gifBuilder');
                                        $gifCreator->init();
-                                       $gifCreator->start($val,$this->menuArr[$key]);
+                                       $gifCreator->start($val, $this->menuArr[$key]);
                                }
 
                                        // If distributeH/W is specified
                                if (count($totalWH) && ($this->mconf['distributeX'] || $this->mconf['distributeY'])) {
-                                       $tempXY = explode(',',$gifCreator->setup['XY']);
+                                       $tempXY = explode(',', $gifCreator->setup['XY']);
 
                                        if ($this->mconf['distributeX']) {
                                                $diff = $this->mconf['distributeX']-$totalWH['W_total']-$distributeAccu['W'];
@@ -2248,15 +2248,15 @@ class tslib_gmenu extends tslib_menu {
                                                $tempXY[1] = $totalWH['H'][$key]+$compensate;
                                        }
                                                // regenerate the new values...
-                                       $val['XY'] = implode(',',$tempXY);
+                                       $val['XY'] = implode(',', $tempXY);
                                        $gifCreator = t3lib_div::makeInstance('tslib_gifBuilder');
                                        $gifCreator->init();
-                                       $gifCreator->start($val,$this->menuArr[$key]);
+                                       $gifCreator->start($val, $this->menuArr[$key]);
                                }
 
                                        // If max dimensions are specified
                                if ($maxDim) {
-                                       $tempXY = explode(',',$val['XY']);
+                                       $tempXY = explode(',', $val['XY']);
                                        if ($maxDim[0] && $Wcounter + $gifCreator->XY[0] >= $maxDim[0]) {
                                                $tempXY[0] == $maxDim[0] - $Wcounter;
                                                $maxFlag = 1;
@@ -2266,10 +2266,10 @@ class tslib_gmenu extends tslib_menu {
                                                $maxFlag = 1;
                                        }
                                        if ($maxFlag) {
-                                               $val['XY'] = implode(',',$tempXY);
+                                               $val['XY'] = implode(',', $tempXY);
                                                $gifCreator = t3lib_div::makeInstance('tslib_gifBuilder');
                                                $gifCreator->init();
-                                               $gifCreator->start($val,$this->menuArr[$key]);
+                                               $gifCreator->start($val, $this->menuArr[$key]);
                                        }
                                }
 
@@ -2280,8 +2280,8 @@ class tslib_gmenu extends tslib_menu {
                                if ($Hobjs) {
                                        foreach ($Hobjs as $index) {
                                                if ($gifCreator->setup[$index] && $gifCreator->setup[$index.'.']) {
-                                                       $oldOffset = explode(',',$gifCreator->setup[$index.'.']['offset']);
-                                                       $gifCreator->setup[$index.'.']['offset'] = implode(',',$gifCreator->applyOffset($oldOffset,Array(0,-$Hcounter)));
+                                                       $oldOffset = explode(',', $gifCreator->setup[$index.'.']['offset']);
+                                                       $gifCreator->setup[$index.'.']['offset'] = implode(',', $gifCreator->applyOffset($oldOffset, Array(0, -$Hcounter)));
                                                }
                                        }
                                }
@@ -2289,8 +2289,8 @@ class tslib_gmenu extends tslib_menu {
                                if ($Wobjs) {
                                        foreach ($Wobjs as $index) {
                                                if ($gifCreator->setup[$index] && $gifCreator->setup[$index.'.']) {
-                                                       $oldOffset = explode(',',$gifCreator->setup[$index.'.']['offset']);
-                                                       $gifCreator->setup[$index.'.']['offset'] = implode(',',$gifCreator->applyOffset($oldOffset,Array(-$Wcounter,0)));
+                                                       $oldOffset = explode(',', $gifCreator->setup[$index.'.']['offset']);
+                                                       $gifCreator->setup[$index.'.']['offset'] = implode(',', $gifCreator->applyOffset($oldOffset, Array(-$Wcounter, 0)));
                                                }
                                        }
                                }
@@ -2300,8 +2300,8 @@ class tslib_gmenu extends tslib_menu {
                        $gifFileName='';
                        if ($conf[$key]['altImgResource'] || is_array($conf[$key]['altImgResource.'])) {
                                if (!is_object($cObj)) {$cObj=t3lib_div::makeInstance('tslib_cObj');}
-                               $cObj->start($this->menuArr[$key],'pages');
-                               $altImgInfo = $cObj->getImgResource($conf[$key]['altImgResource'],$conf[$key]['altImgResource.']);
+                               $cObj->start($this->menuArr[$key], 'pages');
+                               $altImgInfo = $cObj->getImgResource($conf[$key]['altImgResource'], $conf[$key]['altImgResource.']);
                                $gifFileName=$altImgInfo[3];
                        }
 
@@ -2352,7 +2352,7 @@ class tslib_gmenu extends tslib_menu {
         * @access private
         * @see makeGifs()
         */
-       function findLargestDims($conf,$items,$Hobjs,$Wobjs,$minDim,$maxDim) {
+       function findLargestDims($conf, $items, $Hobjs, $Wobjs, $minDim, $maxDim) {
                $totalWH = array(
                        'W' => array(),
                        'H' => array(),
@@ -2369,7 +2369,7 @@ class tslib_gmenu extends tslib_menu {
                        if ($items==($c+1) && $minDim) {
                                $Lobjs = $this->mconf['removeObjectsOfDummy'];
                                if ($Lobjs) {
-                                       $Lobjs = t3lib_div::intExplode(',',$Lobjs);
+                                       $Lobjs = t3lib_div::intExplode(',', $Lobjs);
                                        foreach ($Lobjs as $remItem) {
                                                unset($val[$remItem]);
                                                unset($val[$remItem.'.']);
@@ -2377,7 +2377,7 @@ class tslib_gmenu extends tslib_menu {
                                }
 
                                $flag =0;
-                               $tempXY = explode(',',$val['XY']);
+                               $tempXY = explode(',', $val['XY']);
                                if ($Wcounter < $minDim[0]) {
                                        $tempXY[0] = $minDim[0] - $Wcounter;
                                        $flag = 1;
@@ -2386,16 +2386,16 @@ class tslib_gmenu extends tslib_menu {
                                        $tempXY[1] = $minDim[1] - $Hcounter;
                                        $flag = 1;
                                }
-                               $val['XY'] = implode(',',$tempXY);
+                               $val['XY'] = implode(',', $tempXY);
                                if (!$flag){break;}
                        }
                        $c++;
 
                        $gifCreator = t3lib_div::makeInstance('tslib_gifBuilder');
                        $gifCreator->init();
-                       $gifCreator->start($val,$this->menuArr[$key]);
+                       $gifCreator->start($val, $this->menuArr[$key]);
                        if ($maxDim) {
-                               $tempXY = explode(',',$val['XY']);
+                               $tempXY = explode(',', $val['XY']);
                                if ($maxDim[0] && $Wcounter + $gifCreator->XY[0] >= $maxDim[0]) {
                                        $tempXY[0] == $maxDim[0] - $Wcounter;
                                        $maxFlag = 1;
@@ -2405,10 +2405,10 @@ class tslib_gmenu extends tslib_menu {
                                        $maxFlag = 1;
                                }
                                if ($maxFlag) {
-                                       $val['XY'] = implode(',',$tempXY);
+                                       $val['XY'] = implode(',', $tempXY);
                                        $gifCreator = t3lib_div::makeInstance('tslib_gifBuilder');
                                        $gifCreator->init();
-                                       $gifCreator->start($val,$this->menuArr[$key]);
+                                       $gifCreator->start($val, $this->menuArr[$key]);
                                }
                        }
                        // SAME CODE AS makeGifs()! END
@@ -2437,21 +2437,21 @@ class tslib_gmenu extends tslib_menu {
                if (is_array($this->menuArr) && is_array($this->result) && count($this->result) && is_array($this->result['NO'])) {
                        $this->WMcObj = t3lib_div::makeInstance('tslib_cObj');  // Create new tslib_cObj for our use
                        $this->WMresult = '';
-                       $this->INPfixMD5 = substr(md5(microtime().$this->GMENU_fixKey),0,4);
+                       $this->INPfixMD5 = substr(md5(microtime().$this->GMENU_fixKey), 0, 4);
                        $this->WMmenuItems = count($this->result['NO']);
 
-                       $this->WMsubmenuObjSuffixes = $this->tmpl->splitConfArray(array('sOSuffix'=>$this->mconf['submenuObjSuffixes']),$this->WMmenuItems);
+                       $this->WMsubmenuObjSuffixes = $this->tmpl->splitConfArray(array('sOSuffix'=>$this->mconf['submenuObjSuffixes']), $this->WMmenuItems);
 
                        $this->extProc_init();
                        for ($key=0;$key<$this->WMmenuItems;$key++) {
                                if ($this->result['NO'][$key]['output_file']) {
-                                       $this->WMcObj->start($this->menuArr[$key],'pages');             // Initialize the cObj with the page record of the menu item
+                                       $this->WMcObj->start($this->menuArr[$key], 'pages');            // Initialize the cObj with the page record of the menu item
 
                                        $this->I = array();
                                        $this->I['key'] = $key;
                                        $this->I['INPfix']= ($this->imgNameNotRandom ? '' : '_'.$this->INPfixMD5).'_'.$key;
                                        $this->I['val'] = $this->result['NO'][$key];
-                                       $this->I['title'] = $this->getPageTitle($this->menuArr[$key]['title'],$this->menuArr[$key]['nav_title']);
+                                       $this->I['title'] = $this->getPageTitle($this->menuArr[$key]['title'], $this->menuArr[$key]['nav_title']);
                                        $this->I['uid'] = $this->menuArr[$key]['uid'];
                                        $this->I['mount_pid'] = $this->menuArr[$key]['mount_pid'];
                                        $this->I['pid'] = $this->menuArr[$key]['pid'];
@@ -2472,7 +2472,7 @@ class tslib_gmenu extends tslib_menu {
                                        if (isset($this->I['val']['additionalParams.'])) {
                                                $this->I['val']['additionalParams'] = $this->WMcObj->stdWrap($this->I['val']['additionalParams'], $this->I['val']['additionalParams.']);
                                        }
-                                       $this->I['linkHREF'] = $this->link($key,$this->I['val']['altTarget'],$this->mconf['forceTypeValue']);
+                                       $this->I['linkHREF'] = $this->link($key, $this->I['val']['altTarget'], $this->mconf['forceTypeValue']);
 
                                                // Title attribute of links:
                                        $titleAttrValue = isset($this->I['val']['ATagTitle.'])
@@ -2518,24 +2518,24 @@ class tslib_gmenu extends tslib_menu {
 
                                                // Passing I to a user function
                                        if ($this->mconf['IProcFunc']) {
-                                               $this->I = $this->userProcess('IProcFunc',$this->I);
+                                               $this->I = $this->userProcess('IProcFunc', $this->I);
                                        }
 
                                                // Putting the item together.
                                                // Merge parts + beforeAllWrap
-                                       $this->I['theItem']= implode('',$this->I['parts']);
-                                       $this->I['theItem']= $this->extProc_beforeAllWrap($this->I['theItem'],$key);
+                                       $this->I['theItem']= implode('', $this->I['parts']);
+                                       $this->I['theItem']= $this->extProc_beforeAllWrap($this->I['theItem'], $key);
 
                                                // wrap:
-                                       $this->I['theItem']= $this->tmpl->wrap($this->I['theItem'],$this->I['val']['wrap']);
+                                       $this->I['theItem']= $this->tmpl->wrap($this->I['theItem'], $this->I['val']['wrap']);
 
                                                // allWrap:
                                        $allWrap = isset($this->I['val']['allWrap.'])
                                                ? $this->WMcObj->stdWrap($this->I['val']['allWrap'], $this->I['val']['allWrap.'])
                                                : $this->I['val']['allWrap'];
-                                       $this->I['theItem'] = $this->tmpl->wrap($this->I['theItem'],$allWrap);
+                                       $this->I['theItem'] = $this->tmpl->wrap($this->I['theItem'], $allWrap);
 
-                                       if ($this->I['val']['subst_elementUid'])        $this->I['theItem'] = str_replace('{elementUid}',$this->I['uid'],$this->I['theItem']);
+                                       if ($this->I['val']['subst_elementUid'])        $this->I['theItem'] = str_replace('{elementUid}', $this->I['uid'], $this->I['theItem']);
 
                                                // allStdWrap:
                                        if (is_array($this->I['val']['allStdWrap.'])) {
@@ -2602,7 +2602,7 @@ class tslib_gmenu extends tslib_menu {
                $part = isset($this->I['val']['wrapItemAndSub.'])
                        ? $this->WMcObj->stdWrap($this->I['val']['wrapItemAndSub'], $this->I['val']['wrapItemAndSub.'])
                        : $this->I['val']['wrapItemAndSub'];
-               $this->WMresult.= $part ? $this->tmpl->wrap($this->I['theItem'],$part) : $this->I['theItem'];
+               $this->WMresult.= $part ? $this->tmpl->wrap($this->I['theItem'], $part) : $this->I['theItem'];
        }
 
 
@@ -2615,7 +2615,7 @@ class tslib_gmenu extends tslib_menu {
         * @access private
         * @see writeMenu(), tslib_gmenu_layers::extProc_beforeAllWrap()
         */
-       function extProc_beforeAllWrap($item,$key) {
+       function extProc_beforeAllWrap($item, $key) {
                return $item;
        }
 
@@ -2631,7 +2631,7 @@ class tslib_gmenu extends tslib_menu {
                if (is_array($this->mconf['stdWrap.'])) {
                        $this->WMresult = $this->WMcObj->stdWrap($this->WMresult, $this->mconf['stdWrap.']);
                }
-               return $this->tmpl->wrap($this->WMresult,$this->mconf['wrap']).$this->WMextraScript;
+               return $this->tmpl->wrap($this->WMresult, $this->mconf['wrap']).$this->WMextraScript;
        }
 }
 
@@ -2736,7 +2736,7 @@ class tslib_imgmenu extends tslib_menu {
                                                                        unset($theValArr['text.']);     // if this is not done it seems that imageMaps will be rendered wrong!!
                                                                                // check links
 
-                                                                       $LD = $this->menuTypoLink($this->menuArr[$key],$this->mconf['target'],'','',array(),'',$this->mconf['forceTypeValue']);
+                                                                       $LD = $this->menuTypoLink($this->menuArr[$key], $this->mconf['target'], '', '', array(), '', $this->mconf['forceTypeValue']);
 
                                                                                // If access restricted pages should be shown in menus, change the link of such pages to link to a redirection page:
                                                                        $this->changeLinksForAccessRestrictedPages($LD, $this->menuArr[$key], $this->mconf['target'], $this->mconf['forceTypeValue']);
@@ -2756,7 +2756,7 @@ class tslib_imgmenu extends tslib_menu {
                                                                        }
                                                                        if (is_array($theValArr['imgMap.']['altText.'])) {
                                                                                $cObj =t3lib_div::makeInstance('tslib_cObj');
-                                                                               $cObj->start($cObjData,'pages');
+                                                                               $cObj->start($cObjData, 'pages');
                                                                                if(isset($theValArr['imgMap.']['altText.'])) {
                                                                                        $theValArr['imgMap.']['altText'] = $cObj->stdWrap($theValArr['imgMap.']['altText'], $theValArr['imgMap.']['altText.']);
                                                                                }
@@ -2764,7 +2764,7 @@ class tslib_imgmenu extends tslib_menu {
                                                                }
                                                                        if (is_array($theValArr['imgMap.']['titleText.'])) {
                                                                                $cObj =t3lib_div::makeInstance('tslib_cObj');
-                                                                               $cObj->start($cObjData,'pages');
+                                                                               $cObj->start($cObjData, 'pages');
                                                                                if(isset($theValArr['imgMap.']['titleText.'])) {
                                                                                        $theValArr['imgMap.']['titleText'] = $cObj->stdWrap($theValArr['imgMap.']['titleText'], $theValArr['imgMap.']['titleText.']);
                                                                                }
@@ -2799,7 +2799,7 @@ class tslib_imgmenu extends tslib_menu {
                                                                $setObjFlag=1;
                                                                if ($theValArr['if.']) {
                                                                        $cObj =t3lib_div::makeInstance('tslib_cObj');
-                                                                       $cObj->start($cObjData,'pages');
+                                                                       $cObj->start($cObjData, 'pages');
                                                                        if (!$cObj->checkIf($theValArr['if.'])) {
                                                                                $setObjFlag=0;
                                                                        }
@@ -2815,26 +2815,26 @@ class tslib_imgmenu extends tslib_menu {
                                        }
                                }
 
-                               $gifCreator->start($conf,$GLOBALS['TSFE']->page);
+                               $gifCreator->start($conf, $GLOBALS['TSFE']->page);
                                        // calculations
 
-                               $sum=Array(0,0,0,0);
+                               $sum=Array(0, 0, 0, 0);
                                foreach ($waArr as $key => $val) {
                                        if (($dConf[$key] = $itemsConf[$key]['distrib'])) {
                                                $textBB = $gifCreator->objBB[$val['textNum']];
-                                               $dConf[$key] = str_replace('textX',$textBB[0],$dConf[$key]);
-                                               $dConf[$key] = str_replace('textY',$textBB[1],$dConf[$key]);
-                                               $dConf[$key] = t3lib_div::intExplode(',',$gifCreator->calcOffset($dConf[$key]));
+                                               $dConf[$key] = str_replace('textX', $textBB[0], $dConf[$key]);
+                                               $dConf[$key] = str_replace('textY', $textBB[1], $dConf[$key]);
+                                               $dConf[$key] = t3lib_div::intExplode(',', $gifCreator->calcOffset($dConf[$key]));
                                        }
                                }
-                               $workArea = t3lib_div::intExplode(',',$gifCreator->calcOffset($this->mconf['dWorkArea']));
+                               $workArea = t3lib_div::intExplode(',', $gifCreator->calcOffset($this->mconf['dWorkArea']));
                                foreach ($waArr as $key => $val) {
                                        $index = $val['free'];
                                        $gifCreator->setup[$index] = 'WORKAREA';
                                        $workArea[2] = $dConf[$key][2] ? $dConf[$key][2] : $dConf[$key][0];
                                        $workArea[3] = $dConf[$key][3] ? $dConf[$key][3] : $dConf[$key][1];
 
-                                       $gifCreator->setup[$index.'.']['set'] = implode(',',$workArea);
+                                       $gifCreator->setup[$index.'.']['set'] = implode(',', $workArea);
                                        $workArea[0]+=$dConf[$key][0];
                                        $workArea[1]+=$dConf[$key][1];
                                }
@@ -2883,12 +2883,12 @@ class tslib_imgmenu extends tslib_menu {
                        $res = &$this->result;
                        $menuName = 'menu_'.t3lib_div::shortMD5($res['imgMap']);        // shortMD5 260900
                        $result = '<img src="'.$GLOBALS['TSFE']->absRefPrefix.$res['output_file'].'" width="'.$res['output_w'].'" height="'.$res['output_h'].'" usemap="#'.$menuName.'" border="0" '.$this->mconf['params'];
-                       if (!strstr($result,'alt="'))   $result.=' alt="Menu Image Map"';       // Adding alt attribute if not set.
+                       if (!strstr($result, 'alt="'))  $result.=' alt="Menu Image Map"';       // Adding alt attribute if not set.
                        $result.= ' /><map name="'.$menuName.'" id="'.$menuName.'">'.$res['imgMap'].'</map>';
 
                        $GLOBALS['TSFE']->imagesOnPage[]=$res['output_file'];
 
-                       return $this->tmpl->wrap($result,$this->mconf['wrap']);
+                       return $this->tmpl->wrap($result, $this->mconf['wrap']);
                }
        }
 }
@@ -2938,18 +2938,18 @@ class tslib_jsmenu extends tslib_menu {
        function writeMenu() {
                if ($this->id) {
                                // Making levels:
-                       $levels = t3lib_utility_Math::forceIntegerInRange($this->mconf['levels'],1,5);
+                       $levels = t3lib_utility_Math::forceIntegerInRange($this->mconf['levels'], 1, 5);
                        $this->levels = $levels;
                        $uniqueParam = t3lib_div::shortMD5(microtime(), 5);
                        $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.= $this->generate_level($levels,1,$this->id,$this->menuArr,$this->MP_array).LF;
+                       $JScode.= $this->generate_level($levels, 1, $this->id, $this->menuArr, $this->MP_array).LF;
 
                        $GLOBALS['TSFE']->additionalHeaderData['JSMenuCode']='<script type="text/javascript" src="'.$GLOBALS['TSFE']->absRefPrefix.'t3lib/jsfunc.menu.js"></script>';
                        $GLOBALS['TSFE']->JSCode.=$JScode;
@@ -2975,13 +2975,13 @@ class tslib_jsmenu extends tslib_menu {
                                        $formCode.='</option>';
                                }
                                $formCode.= '</select>';
-                               $allFormCode.=$this->tmpl->wrap($formCode,$levelConf['wrap']);
+                               $allFormCode.=$this->tmpl->wrap($formCode, $levelConf['wrap']);
                        }
-                       $formCode = $this->tmpl->wrap($allFormCode,$this->mconf['wrap']);
+                       $formCode = $this->tmpl->wrap($allFormCode, $this->mconf['wrap']);
 
                        $formCode= '<form action="" method="post" style="margin: 0 0 0 0;" name="'.$this->JSMenuName.'Form">'.$formCode.'</form>';
                        $formCode.='<script type="text/javascript"> /*<![CDATA[*/ '.$this->JSMenuName.'.writeOut(1,'.$this->JSMenuName.'.openID,1); /*]]>*/ </script>';
-                       return $this->tmpl->wrap($formCode,$this->mconf['wrapAfterTags']);
+                       return $this->tmpl->wrap($formCode, $this->mconf['wrapAfterTags']);
                }
        }
 
@@ -2997,7 +2997,7 @@ class tslib_jsmenu extends tslib_menu {
         * @return      string          JavaScript code lines.
         * @access private
         */
-       function generate_level($levels,$count,$pid,$menuItemArray='',$MP_array=array()) {
+       function generate_level($levels, $count, $pid, $menuItemArray='', $MP_array=array()) {
                $levelConf = $this->mconf[$count.'.'];
 
                        // Translate PID to a mount page, if any:
@@ -3031,9 +3031,9 @@ class tslib_jsmenu extends tslib_menu {
                        $MP_var = implode(',', $MP_array_sub);
                        $MP_params = ($MP_var ? '&MP='.rawurlencode($MP_var) : '');
 
-                       $spacer = (t3lib_div::inList($this->spacerIDList,$data['doktype'])?1:0);                // if item is a spacer, $spacer is set
+                       $spacer = (t3lib_div::inList($this->spacerIDList, $data['doktype'])?1:0);               // if item is a spacer, $spacer is set
                        if ($this->mconf['SPC'] || !$spacer)    {       // If the spacer-function is not enabled, spacers will not enter the $menuArr
-                               if (!t3lib_div::inList($this->doktypeExcludeList,$data['doktype']) && (!$data['nav_hide'] || $this->conf['includeNotInMenu']) && !t3lib_div::inArray($banUidArray,$uid))        {               // Page may not be 'not_in_menu' or 'Backend User Section' + not in banned uid's
+                               if (!t3lib_div::inList($this->doktypeExcludeList,$data['doktype']) && (!$data['nav_hide'] || $this->conf['includeNotInMenu']) && !t3lib_div::inArray($banUidArray, $uid))       {               // Page may not be 'not_in_menu' or 'Backend User Section' + not in banned uid's
                                        if ($count<$levels) {
                                                $addLines = $this->generate_level($levels, $count+1, $data['uid'], '', $MP_array_sub);
                                        } else {
@@ -3043,7 +3043,7 @@ class tslib_jsmenu extends tslib_menu {
                                        $url='';
                                        $target='';
                                        if ((!$addLines && !$levelConf['noLink']) || $levelConf['alwaysLink']) {
-                                               $LD = $this->menuTypoLink($data,$this->mconf['target'],'','',array(),$MP_params,$this->mconf['forceTypeValue']);
+                                               $LD = $this->menuTypoLink($data, $this->mconf['target'], '', '', array(), $MP_params, $this->mconf['forceTypeValue']);
 
                                                        // If access restricted pages should be shown in menus, change the link of such pages to link to a redirection page:
                                                $this->changeLinksForAccessRestrictedPages($LD, $data, $this->mconf['target'], $this->mconf['forceTypeValue']);
index 255a665..7b7aa80 100644 (file)
@@ -79,10 +79,10 @@ class TSpagegen {
                        unset($temp_copy_TSFE);
                }
                if ($GLOBALS['TSFE']->config['config']['MP_defaults']) {
-                       $temp_parts = t3lib_div::trimExplode('|',$GLOBALS['TSFE']->config['config']['MP_defaults'],1);
+                       $temp_parts = t3lib_div::trimExplode('|', $GLOBALS['TSFE']->config['config']['MP_defaults'], 1);
                        foreach ($temp_parts as $temp_p) {
-                               list($temp_idP,$temp_MPp) = explode(':',$temp_p,2);
-                               $temp_ids=t3lib_div::intExplode(',',$temp_idP);
+                               list($temp_idP, $temp_MPp) = explode(':', $temp_p, 2);
+                               $temp_ids=t3lib_div::intExplode(',', $temp_idP);
                                foreach ($temp_ids as $temp_id) {
                                        $GLOBALS['TSFE']->MP_defaults[$temp_id]=$temp_MPp;
                                }
@@ -106,13 +106,13 @@ class TSpagegen {
                if ($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses'] === 'ascii') {
                        $GLOBALS['TSFE']->spamProtectEmailAddresses = 'ascii';
                } else {
-                       $GLOBALS['TSFE']->spamProtectEmailAddresses = t3lib_utility_Math::forceIntegerInRange($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses'],-10,10,0);
+                       $GLOBALS['TSFE']->spamProtectEmailAddresses = t3lib_utility_Math::forceIntegerInRange($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses'], -10, 10, 0);
                }
 
                $GLOBALS['TSFE']->absRefPrefix = ($GLOBALS['TSFE']->config['config']['absRefPrefix'] ? trim($GLOBALS['TSFE']->config['config']['absRefPrefix']) : '');
 
                if ($GLOBALS['TSFE']->type && $GLOBALS['TSFE']->config['config']['frameReloadIfNotInFrameset']) {
-                       $tdlLD = $GLOBALS['TSFE']->tmpl->linkData($GLOBALS['TSFE']->page,'_top',$GLOBALS['TSFE']->no_cache,'');
+                       $tdlLD = $GLOBALS['TSFE']->tmpl->linkData($GLOBALS['TSFE']->page, '_top', $GLOBALS['TSFE']->no_cache, '');
                        $GLOBALS['TSFE']->JSCode = 'if(!parent.'.trim($GLOBALS['TSFE']->sPre).' && !parent.view_frame) top.location.href="'.$GLOBALS['TSFE']->baseUrlWrap($tdlLD['totalURL']).'"';
                }
                $GLOBALS['TSFE']->compensateFieldWidth = ''.$GLOBALS['TSFE']->config['config']['compensateFieldWidth'];
@@ -135,7 +135,7 @@ class TSpagegen {
                                                $GLOBALS['TSFE']->sWordRegEx.= $space.quotemeta($val).$space.'|';
                                }
                        }
-                       $GLOBALS['TSFE']->sWordRegEx = preg_replace('/\|$/','',$GLOBALS['TSFE']->sWordRegEx);
+                       $GLOBALS['TSFE']->sWordRegEx = preg_replace('/\|$/', '', $GLOBALS['TSFE']->sWordRegEx);
                }
 
                        // linkVars
@@ -236,7 +236,7 @@ class TSpagegen {
 
                foreach ($GLOBALS['TSFE']->JSeventFuncCalls as $event => $handlers) {
                        if (count($handlers)) {
-                               $functions[] = '        function T3_'.$event.'Wrapper(e)        {       '.implode('   ',$handlers).'    }';
+                               $functions[] = '        function T3_'.$event.'Wrapper(e)        {       '.implode('   ', $handlers).'   }';
                                $setEvents[] = '        document.'.$event.'=T3_'.$event.'Wrapper;';
                                if ($event == 'onload') {
                                        $setBody[]='onload="T3_onloadWrapper();"';      // dubiuos double setting breaks on some browser - do we need it?
@@ -1117,7 +1117,7 @@ class TSpagegen {
         * @param       string          The string to find in $haystack
         * @return      boolean         Returns TRUE if $needle matches or is found in $haystack
         */
-       public static function isAllowedLinkVarValue($haystack,$needle) {
+       public static function isAllowedLinkVarValue($haystack, $needle) {
                $OK = FALSE;
 
                if ($needle=='int' || $needle=='integer')       {       // Integer
@@ -1132,23 +1132,23 @@ class TSpagegen {
                                $OK = TRUE;
                        }
 
-               } elseif (strstr($needle,'-'))  {       // Range
+               } elseif (strstr($needle, '-')) {       // Range
 
                        if (t3lib_utility_Math::canBeInterpretedAsInteger($haystack)) {
-                               $range = explode('-',$needle);
+                               $range = explode('-', $needle);
                                if ($range[0] <= $haystack && $range[1] >= $haystack) {
                                        $OK = TRUE;
                                }
                        }
 
-               } elseif (strstr($needle,'|'))  {       // List
+               } elseif (strstr($needle, '|')) {       // List
 
-                       $haystack = str_replace(' ','',$haystack);      // Trim the input
+                       $haystack = str_replace(' ', '', $haystack);    // Trim the input
                        if (strstr('|'.$needle.'|', '|'.$haystack.'|')) {
                                $OK = TRUE;
                        }
 
-               } elseif (!strcmp($needle,$haystack))   {       // String comparison
+               } elseif (!strcmp($needle, $haystack))  {       // String comparison
                        $OK = TRUE;
                }
 
index f0cda80..f6c6361 100644 (file)
@@ -168,7 +168,7 @@ class tslib_pibase {
         */
        function pi_setPiVarDefaults() {
                if (is_array($this->conf['_DEFAULT_PI_VARS.'])) {
-                       $this->piVars = t3lib_div::array_merge_recursive_overrule($this->conf['_DEFAULT_PI_VARS.'],is_array($this->piVars)?$this->piVars:array());
+                       $this->piVars = t3lib_div::array_merge_recursive_overrule($this->conf['_DEFAULT_PI_VARS.'], is_array($this->piVars)?$this->piVars:array());
                }
        }
 
@@ -203,8 +203,8 @@ class tslib_pibase {
         * @return      string          The resulting URL
         * @see pi_linkToPage()
         */
-       function pi_getPageLink($id,$target='',$urlParameters=array()) {
-               return $this->cObj->getTypoLink_URL($id,$urlParameters,$target);
+       function pi_getPageLink($id, $target='', $urlParameters=array()) {
+               return $this->cObj->getTypoLink_URL($id, $urlParameters, $target);
        }
 
        /**
@@ -219,8 +219,8 @@ class tslib_pibase {
         * @return      string          The input string wrapped in <a> tags with the URL and target set.
         * @see pi_getPageLink(), tslib_cObj::getTypoLink()
         */
-       function pi_linkToPage($str,$id,$target='',$urlParameters=array()) {
-               return $this->cObj->getTypoLink($str,$id,$urlParameters,$target);
+       function pi_linkToPage($str, $id, $target='', $urlParameters=array()) {
+               return $this->cObj->getTypoLink($str, $id, $urlParameters, $target);
        }
 
        /**
@@ -234,7 +234,7 @@ class tslib_pibase {
         * @return      string          The input string wrapped in <a> tags
         * @see pi_linkTP_keepPIvars(), tslib_cObj::typoLink()
         */
-       function pi_linkTP($str,$urlParameters=array(),$cache=0,$altPageId=0) {
+       function pi_linkTP($str, $urlParameters=array(), $cache=0, $altPageId=0) {
                $conf=array();
                $conf['useCacheHash'] = $this->pi_USER_INT_obj ? 0 : $cache;
                $conf['no_cache'] = $this->pi_USER_INT_obj ? 0 : !$cache;
@@ -257,16 +257,16 @@ class tslib_pibase {
         * @return      string          The input string wrapped in <a> tags
         * @see pi_linkTP()
         */
-       function pi_linkTP_keepPIvars($str,$overrulePIvars=array(),$cache=0,$clearAnyway=0,$altPageId=0) {
+       function pi_linkTP_keepPIvars($str, $overrulePIvars=array(), $cache=0, $clearAnyway=0, $altPageId=0) {
                if (is_array($this->piVars) && is_array($overrulePIvars) && !$clearAnyway) {
                        $piVars = $this->piVars;
                        unset($piVars['DATA']);
-                       $overrulePIvars = t3lib_div::array_merge_recursive_overrule($piVars,$overrulePIvars);
+                       $overrulePIvars = t3lib_div::array_merge_recursive_overrule($piVars, $overrulePIvars);
                        if ($this->pi_autoCacheEn) {
                                $cache = $this->pi_autoCache($overrulePIvars);
                        }
                }
-               $res = $this->pi_linkTP($str,Array($this->prefixId=>$overrulePIvars),$cache,$altPageId);
+               $res = $this->pi_linkTP($str, Array($this->prefixId=>$overrulePIvars), $cache, $altPageId);
                return $res;
        }
 
@@ -281,8 +281,8 @@ class tslib_pibase {
         * @return      string          The URL ($this->cObj->lastTypoLinkUrl)
         * @see pi_linkTP_keepPIvars()
         */
-       function pi_linkTP_keepPIvars_url($overrulePIvars=array(),$cache=0,$clearAnyway=0,$altPageId=0) {
-               $this->pi_linkTP_keepPIvars('|',$overrulePIvars,$cache,$clearAnyway,$altPageId);
+       function pi_linkTP_keepPIvars_url($overrulePIvars=array(), $cache=0, $clearAnyway=0, $altPageId=0) {
+               $this->pi_linkTP_keepPIvars('|', $overrulePIvars, $cache, $clearAnyway, $altPageId);
                return $this->cObj->lastTypoLinkUrl;
        }
 
@@ -299,16 +299,16 @@ class tslib_pibase {
         * @return      string          The input string wrapped in <a> tags
         * @see pi_linkTP(), pi_linkTP_keepPIvars()
         */
-       function pi_list_linkSingle($str,$uid,$cache=FALSE,$mergeArr=array(),$urlOnly=FALSE,$altPageId=0) {
+       function pi_list_linkSingle($str, $uid, $cache=FALSE, $mergeArr=array(), $urlOnly=FALSE, $altPageId=0) {
                if ($this->prefixId) {
                        if ($cache) {
                                $overrulePIvars=$uid?array('showUid'=>$uid):Array();
-                               $overrulePIvars=array_merge($overrulePIvars,(array)$mergeArr);
-                               $str = $this->pi_linkTP($str,Array($this->prefixId=>$overrulePIvars),$cache,$altPageId);
+                               $overrulePIvars=array_merge($overrulePIvars, (array)$mergeArr);
+                               $str = $this->pi_linkTP($str, Array($this->prefixId=>$overrulePIvars), $cache, $altPageId);
                        } else {
                                $overrulePIvars=array('showUid'=>$uid?$uid:'');
-                               $overrulePIvars=array_merge($overrulePIvars,(array)$mergeArr);
-                               $str = $this->pi_linkTP_keepPIvars($str,$overrulePIvars,$cache,0,$altPageId);
+                               $overrulePIvars=array_merge($overrulePIvars, (array)$mergeArr);
+                               $str = $this->pi_linkTP_keepPIvars($str, $overrulePIvars, $cache, 0, $altPageId);
                        }
 
                                // If urlOnly flag, return only URL as it has recently be generated.
@@ -327,8 +327,8 @@ class tslib_pibase {
         * @param       string          Window parameters, see the default list for inspiration
         * @return      string          The processed input string, modified IF a <a> tag was found
         */
-       function pi_openAtagHrefInJSwindow($str,$winName='',$winParams='width=670,height=500,status=0,menubar=0,scrollbars=1,resizable=1') {
-               if (preg_match('/(.*)(<a[^>]*>)(.*)/i',$str,$match)) {
+       function pi_openAtagHrefInJSwindow($str, $winName='', $winParams='width=670,height=500,status=0,menubar=0,scrollbars=1,resizable=1') {
+               if (preg_match('/(.*)(<a[^>]*>)(.*)/i', $str, $match)) {
                        $aTagContent = t3lib_div::get_tag_attributes($match[2]);
                        $match[2]='<a href="#" onclick="'.
                                htmlspecialchars('vHWin=window.open(\''.$GLOBALS['TSFE']->baseUrlWrap($aTagContent['href']).'\',\''.($winName?$winName:md5($aTagContent['href'])).'\',\''.$winParams.'\');vHWin.focus();return false;').
@@ -397,9 +397,9 @@ class tslib_pibase {
                        // Initializing variables:
                $pointer = intval($this->piVars[$pointerName]);
                $count = intval($this->internal['res_count']);
-               $results_at_a_time = t3lib_utility_Math::forceIntegerInRange($this->internal['results_at_a_time'],1,1000);
+               $results_at_a_time = t3lib_utility_Math::forceIntegerInRange($this->internal['results_at_a_time'], 1, 1000);
                $totalPages = ceil($count/$results_at_a_time);
-               $maxPages = t3lib_utility_Math::forceIntegerInRange($this->internal['maxPages'],1,100);
+               $maxPages = t3lib_utility_Math::forceIntegerInRange($this->internal['maxPages'], 1, 100);
                $pi_isOnlyFields = $this->pi_isOnlyFields($this->pi_isOnlyFields);
 
                if (!$forceOutput && $count <= $results_at_a_time) {
@@ -423,7 +423,7 @@ class tslib_pibase {
                                $pagefloat = ceil(($maxPages - 1)/2);
                        } else {
                                // pagefloat set as integer. 0 = left, value >= $this->internal['maxPages'] = right
-                               $pagefloat = t3lib_utility_Math::forceIntegerInRange($this->internal['pagefloat'],-1,$maxPages-1);
+                               $pagefloat = t3lib_utility_Math::forceIntegerInRange($this->internal['pagefloat'], -1, $maxPages-1);
                        }
                } else {
                        $pagefloat = -1; // pagefloat disabled
@@ -444,64 +444,64 @@ class tslib_pibase {
                </div>';
 
                        // now overwrite all entries in $wrapper which are also in $wrapArr
-               $wrapper = array_merge($wrapper,$wrapArr);
+               $wrapper = array_merge($wrapper, $wrapArr);
 
                if ($showResultCount != 2) { //show pagebrowser
                        if ($pagefloat > -1) {
-                               $lastPage = min($totalPages,max($pointer+1 + $pagefloat,$maxPages));
-                               $firstPage = max(0,$lastPage-$maxPages);
+                               $lastPage = min($totalPages, max($pointer+1 + $pagefloat, $maxPages));
+                               $firstPage = max(0, $lastPage-$maxPages);
                        } else {
                                $firstPage = 0;
-                               $lastPage = t3lib_utility_Math::forceIntegerInRange($totalPages,1,$maxPages);
+                               $lastPage = t3lib_utility_Math::forceIntegerInRange($totalPages, 1, $maxPages);
                        }
                        $links=array();
 
                                // Make browse-table/links:
                        if ($showFirstLast) { // Link to first page
                                if ($pointer>0) {
-                                       $links[]=$this->cObj->wrap($this->pi_linkTP_keepPIvars($this->pi_getLL('pi_list_browseresults_first','<< First',$hscText),array($pointerName => NULL),$pi_isOnlyFields),$wrapper['inactiveLinkWrap']);
+                                       $links[]=$this->cObj->wrap($this->pi_linkTP_keepPIvars($this->pi_getLL('pi_list_browseresults_first', '<< First', $hscText), array($pointerName => NULL), $pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
                                } else {
-                                       $links[]=$this->cObj->wrap($this->pi_getLL('pi_list_browseresults_first','<< First',$hscText),$wrapper['disabledLinkWrap']);
+                                       $links[]=$this->cObj->wrap($this->pi_getLL('pi_list_browseresults_first', '<< First', $hscText), $wrapper['disabledLinkWrap']);
                                }
                        }
                        if ($alwaysPrev>=0)     { // Link to previous page
                                if ($pointer>0) {
-                                       $links[]=$this->cObj->wrap($this->pi_linkTP_keepPIvars($this->pi_getLL('pi_list_browseresults_prev','< Previous',$hscText),array($pointerName => ($pointer-1?$pointer-1:'')),$pi_isOnlyFields),$wrapper['inactiveLinkWrap']);
+                                       $links[]=$this->cObj->wrap($this->pi_linkTP_keepPIvars($this->pi_getLL('pi_list_browseresults_prev', '< Previous', $hscText), array($pointerName => ($pointer-1?$pointer-1:'')), $pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
                                } elseif ($alwaysPrev) {
-                                       $links[]=$this->cObj->wrap($this->pi_getLL('pi_list_browseresults_prev','< Previous',$hscText),$wrapper['disabledLinkWrap']);
+                                       $links[]=$this->cObj->wrap($this->pi_getLL('pi_list_browseresults_prev', '< Previous', $hscText), $wrapper['disabledLinkWrap']);
                                }
                        }
                        for($a=$firstPage;$a<$lastPage;$a++)    { // Links to pages
                                if ($this->internal['showRange']) {
-                                       $pageText = (($a*$results_at_a_time)+1).'-'.min($count,(($a+1)*$results_at_a_time));
+                                       $pageText = (($a*$results_at_a_time)+1).'-'.min($count, (($a+1)*$results_at_a_time));
                                } else {
-                                       $pageText = trim($this->pi_getLL('pi_list_browseresults_page','Page',$hscText).' '.($a+1));
+                                       $pageText = trim($this->pi_getLL('pi_list_browseresults_page', 'Page', $hscText).' '.($a+1));
                                }
                                if ($pointer == $a) { // current page
                                        if ($this->internal['dontLinkActivePage']) {
-                                               $links[] = $this->cObj->wrap($pageText,$wrapper['activeLinkWrap']);
+                                               $links[] = $this->cObj->wrap($pageText, $wrapper['activeLinkWrap']);
                                        } else {
-                                               $links[] = $this->cObj->wrap($this->pi_linkTP_keepPIvars($pageText,array($pointerName  => ($a?$a:'')),$pi_isOnlyFields),$wrapper['activeLinkWrap']);
+                                               $links[] = $this->cObj->wrap($this->pi_linkTP_keepPIvars($pageText, array($pointerName  => ($a?$a:'')), $pi_isOnlyFields), $wrapper['activeLinkWrap']);
                                        }
                                } else {
-                                       $links[] = $this->cObj->wrap($this->pi_linkTP_keepPIvars($pageText,array($pointerName => ($a?$a:'')),$pi_isOnlyFields),$wrapper['inactiveLinkWrap']);
+                                       $links[] = $this->cObj->wrap($this->pi_linkTP_keepPIvars($pageText, array($pointerName => ($a?$a:'')), $pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
                                }
                        }
                        if ($pointer<$totalPages-1 || $showFirstLast) {
                                if ($pointer>=$totalPages-1) { // Link to next page
-                                       $links[]=$this->cObj->wrap($this->pi_getLL('pi_list_browseresults_next','Next >',$hscText),$wrapper['disabledLinkWrap']);
+                                       $links[]=$this->cObj->wrap($this->pi_getLL('pi_list_browseresults_next', 'Next >', $hscText), $wrapper['disabledLinkWrap']);
                                } else {
-                                       $links[]=$this->cObj->wrap($this->pi_linkTP_keepPIvars($this->pi_getLL('pi_list_browseresults_next','Next >',$hscText),array($pointerName => $pointer+1),$pi_isOnlyFields),$wrapper['inactiveLinkWrap']);
+                                       $links[]=$this->cObj->wrap($this->pi_linkTP_keepPIvars($this->pi_getLL('pi_list_browseresults_next', 'Next >', $hscText), array($pointerName => $pointer+1), $pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
                                }
                        }
                        if ($showFirstLast) { // Link to last page
                                if ($pointer<$totalPages-1) {
-                                       $links[]=$this->cObj->wrap($this->pi_linkTP_keepPIvars($this->pi_getLL('pi_list_browseresults_last','Last >>',$hscText),array($pointerName => $totalPages-1),$pi_isOnlyFields),$wrapper['inactiveLinkWrap']);
+                                       $links[]=$this->cObj->wrap($this->pi_linkTP_keepPIvars($this->pi_getLL('pi_list_browseresults_last', 'Last >>', $hscText), array($pointerName => $totalPages-1), $pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
                                } else {
-                                       $links[]=$this->cObj->wrap($this->pi_getLL('pi_list_browseresults_last','Last >>',$hscText),$wrapper['disabledLinkWrap']);
+                                       $links[]=$this->cObj->wrap($this->pi_getLL('pi_list_browseresults_last', 'Last >>', $hscText), $wrapper['disabledLinkWrap']);
                                }
                        }
-                       $theLinks = $this->cObj->wrap(implode(LF,$links),$wrapper['browseLinksWrap']);
+                       $theLinks = $this->cObj->wrap(implode(LF, $links), $wrapper['browseLinksWrap']);
                } else {
                        $theLinks = '';
                }
@@ -514,28 +514,28 @@ class tslib_pibase {
                                // this will render the resultcount in a more flexible way using markers (new in TYPO3 3.8.0).
                                // the formatting string is expected to hold template markers (see function header). Example: 'Displaying results ###FROM### to ###TO### out of ###OUT_OF###'
 
-                               $markerArray['###FROM###'] = $this->cObj->wrap($this->internal['res_count'] > 0 ? $pR1 : 0,$wrapper['showResultsNumbersWrap']);
-                               $markerArray['###TO###'] = $this->cObj->wrap(min($this->internal['res_count'],$pR2),$wrapper['showResultsNumbersWrap']);
-                               $markerArray['###OUT_OF###'] = $this->cObj->wrap($this->internal['res_count'],$wrapper['showResultsNumbersWrap']);
-                               $markerArray['###FROM_TO###'] = $this->cObj->wrap(($this->internal['res_count'] > 0 ? $pR1 : 0).' '.$this->pi_getLL('pi_list_browseresults_to','to').' '.min($this->internal['res_count'],$pR2),$wrapper['showResultsNumbersWrap']);
-                               $markerArray['###CURRENT_PAGE###'] = $this->cObj->wrap($pointer+1,$wrapper['showResultsNumbersWrap']);
-                               $markerArray['###TOTAL_PAGES###'] = $this->cObj->wrap($totalPages,$wrapper['showResultsNumbersWrap']);
+                               $markerArray['###FROM###'] = $this->cObj->wrap($this->internal['res_count'] > 0 ? $pR1 : 0, $wrapper['showResultsNumbersWrap']);
+                               $markerArray['###TO###'] = $this->cObj->wrap(min($this->internal['res_count'], $pR2), $wrapper['showResultsNumbersWrap']);
+                               $markerArray['###OUT_OF###'] = $this->cObj->wrap($this->internal['res_count'], $wrapper['showResultsNumbersWrap']);
+                               $markerArray['###FROM_TO###'] = $this->cObj->wrap(($this->internal['res_count'] > 0 ? $pR1 : 0).' '.$this->pi_getLL('pi_list_browseresults_to', 'to').' '.min($this->internal['res_count'], $pR2), $wrapper['showResultsNumbersWrap']);
+                               $markerArray['###CURRENT_PAGE###'] = $this->cObj->wrap($pointer+1, $wrapper['showResultsNumbersWrap']);
+                               $markerArray['###TOTAL_PAGES###'] = $this->cObj->wrap($totalPages, $wrapper['showResultsNumbersWrap']);
                                // substitute markers
-                               $resultCountMsg = $this->cObj->substituteMarkerArray($this->pi_getLL('pi_list_browseresults_displays','Displaying results ###FROM### to ###TO### out of ###OUT_OF###'),$markerArray);
+                               $resultCountMsg = $this->cObj->substituteMarkerArray($this->pi_getLL('pi_list_browseresults_displays', 'Displaying results ###FROM### to ###TO### out of ###OUT_OF###'), $markerArray);
                        } else {
                                // render the resultcount in the "traditional" way using sprintf
                                $resultCountMsg = sprintf(
-                                       str_replace('###SPAN_BEGIN###','<span'.$this->pi_classParam('browsebox-strong').'>',$this->pi_getLL('pi_list_browseresults_displays','Displaying results ###SPAN_BEGIN###%s to %s</span> out of ###SPAN_BEGIN###%s</span>')),
+                                       str_replace('###SPAN_BEGIN###','<span'.$this->pi_classParam('browsebox-strong').'>', $this->pi_getLL('pi_list_browseresults_displays', 'Displaying results ###SPAN_BEGIN###%s to %s</span> out of ###SPAN_BEGIN###%s</span>')),
                                        $count > 0 ? $pR1 : 0,
-                                       min($count,$pR2),
+                                       min($count, $pR2),
                                        $count);
                        }
-                       $resultCountMsg = $this->cObj->wrap($resultCountMsg,$wrapper['showResultsWrap']);
+                       $resultCountMsg = $this->cObj->wrap($resultCountMsg, $wrapper['showResultsWrap']);
                } else {
                        $resultCountMsg = '';
                }
 
-               $sTables = $this->cObj->wrap($resultCountMsg.$theLinks,$wrapper['browseBoxWrap']);
+               $sTables = $this->cObj->wrap($resultCountMsg.$theLinks, $wrapper['browseBoxWrap']);
 
                return $sTables;
        }
@@ -559,7 +559,7 @@ class tslib_pibase {
                        <'.trim('table '.$tableParams).'>
                                <tr>
                                        <td><input type="text" name="'.$this->prefixId.'[sword]" value="'.htmlspecialchars($this->piVars['sword']).'"'.$this->pi_classParam('searchbox-sword').' /></td>
-                                       <td><input type="submit" value="'.$this->pi_getLL('pi_list_searchBox_search','Search',TRUE).'"'.$this->pi_classParam('searchbox-button').' />'.
+                                       <td><input type="submit" value="'.$this->pi_getLL('pi_list_searchBox_search', 'Search',TRUE).'"'.$this->pi_classParam('searchbox-button').' />'.
                                                '<input type="hidden" name="no_cache" value="1" />'.
                                                '<input type="hidden" name="'.$this->prefixId.'[pointer]" value="" />'.
                                                '</td>
@@ -578,12 +578,12 @@ class tslib_pibase {
         * @param       string          Attributes for the table tag which is wrapped around the table cells containing the menu
         * @return      string          Output HTML, wrapped in <div>-tags with a class attribute
         */
-       function pi_list_modeSelector($items=array(),$tableParams='') {
+       function pi_list_modeSelector($items=array(), $tableParams='') {
                $cells=array();
                foreach ($items as $k => $v) {
                        $cells[]='
                                        <td'.($this->piVars['mode']==$k?$this->pi_classParam('modeSelector-SCell'):'').'><p>'.
-                               $this->pi_linkTP_keepPIvars(htmlspecialchars($v),array('mode'=>$k),$this->pi_isOnlyFields($this->pi_isOnlyFields)).
+                               $this->pi_linkTP_keepPIvars(htmlspecialchars($v), array('mode'=>$k), $this->pi_isOnlyFields($this->pi_isOnlyFields)).
                                '</p></td>';
                }
 
@@ -595,7 +595,7 @@ class tslib_pibase {
                <div'.$this->pi_classParam('modeSelector').'>
                        <'.trim('table '.$tableParams).'>
                                <tr>
-                                       '.implode('',$cells).'
+                                       '.implode('', $cells).'
                                </tr>
                        </table>
                </div>';
@@ -615,7 +615,7 @@ class tslib_pibase {
         * @return      string          Output HTML, wrapped in <div>-tags with a class attribute
         * @see pi_list_row(), pi_list_header()
         */
-       function pi_list_makelist($res,$tableParams='') {
+       function pi_list_makelist($res, $tableParams='') {
                        // Make list table header:
                $tRows=array();
                $this->internal['currentRow']='';
@@ -635,7 +635,7 @@ class tslib_pibase {
                -->
                <div'.$this->pi_classParam('listrow').'>
                        <'.trim('table '.$tableParams).'>
-                               '.implode('',$tRows).'
+                               '.implode('', $tRows).'
                        </table>
                </div>';
 
@@ -694,7 +694,7 @@ class tslib_pibase {
         * @return      string          The combined class name (with the correct prefix)
         */
        function pi_getClassName($class) {
-               return str_replace('_','-',$this->prefixId).($this->prefixId?'-':'').$class;
+               return str_replace('_', '-', $this->prefixId).($this->prefixId?'-':'').$class;
        }
 
        /**
@@ -708,10 +708,10 @@ class tslib_pibase {
         */
        function pi_classParam($class, $addClasses='') {
                $output = '';
-               foreach (t3lib_div::trimExplode(',',$class) as $v) {
+               foreach (t3lib_div::trimExplode(',', $class) as $v) {
                        $output.= ' '.$this->pi_getClassName($v);
                }
-               foreach (t3lib_div::trimExplode(',',$addClasses) as $v) {
+               foreach (t3lib_div::trimExplode(',', $addClasses) as $v) {
                        $output.= ' '.$v;
                }
                return ' class="'.trim($output).'"';
@@ -725,7 +725,7 @@ class tslib_pibase {
         * @return      string          HTML content wrapped, ready to return to the parent object.
         */
        function pi_wrapInBaseClass($str) {
-               $content = '<div class="'.str_replace('_','-',$this->prefixId).'">
+               $content = '<div class="'.str_replace('_', '-', $this->prefixId).'">
                '.$str.'
        </div>
        ';
@@ -780,7 +780,7 @@ class tslib_pibase {
         * @return      string          Returns FALSE/blank if no BE User login and of course if the panel is not shown for other reasons. Otherwise the HTML for the panel (a table).
         * @see tslib_cObj::EDITPANEL()
         */
-       function pi_getEditPanel($row='',$tablename='',$label='',$conf=Array()) {
+       function pi_getEditPanel($row='', $tablename='', $label='', $conf=Array()) {
                $panel='';
                if (!$row || !$tablename) {
                        $row = $this->internal['currentRow'];
@@ -791,15 +791,15 @@ class tslib_pibase {
                                // Create local cObj if not set:
                        if (!is_object($this->pi_EPtemp_cObj)) {
                                $this->pi_EPtemp_cObj = t3lib_div::makeInstance('tslib_cObj');
-                               $this->pi_EPtemp_cObj->setParent($this->cObj->data,$this->cObj->currentRecord);
+                               $this->pi_EPtemp_cObj->setParent($this->cObj->data, $this->cObj->currentRecord);
                        }
 
                                // Initialize the cObj object with current row
-                       $this->pi_EPtemp_cObj->start($row,$tablename);
+                       $this->pi_EPtemp_cObj->start($row, $tablename);
 
                                // Setting TypoScript values in the $conf array. See documentation in TSref for the EDITPANEL cObject.
                        $conf['allow'] = 'edit,new,delete,move,hide';
-                       $panel = $this->pi_EPtemp_cObj->cObjGetSingle('EDITPANEL',$conf,'editpanel');
+                       $panel = $this->pi_EPtemp_cObj->cObjGetSingle('EDITPANEL', $conf, 'editpanel');
                }
 
                if ($panel) {
@@ -832,7 +832,7 @@ class tslib_pibase {
                                'beforeLastTag'=>1,
                                'iconTitle' => $title
                        ),$oConf);
-                       $content=$this->cObj->editIcons($content,$tablename.':'.$fields,$conf,$tablename.':'.$row['uid'],$row,'&viewUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')));
+                       $content=$this->cObj->editIcons($content, $tablename.':'.$fields, $conf, $tablename.':'.$row['uid'], $row, '&viewUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')));
                }
                return $content;
        }
@@ -927,7 +927,7 @@ class tslib_pibase {
                                // Read the strings in the required charset (since TYPO3 4.2)
                        $this->LOCAL_LANG = t3lib_div::readLLfile($basePath,$this->LLkey, $GLOBALS['TSFE']->renderCharset);
                        if ($this->altLLkey) {
-                               $this->LOCAL_LANG = t3lib_div::readLLfile($basePath,$this->altLLkey);
+                               $this->LOCAL_LANG = t3lib_div::readLLfile($basePath, $this->altLLkey);
                        }
 
                                // Overlaying labels from TypoScript (including fictitious language keys for non-system languages!):
@@ -935,7 +935,7 @@ class tslib_pibase {
                        if (is_array($confLL)) {
                                foreach ($confLL as $languageKey => $languageArray) {
                                                // Don't process label if the langue is not loaded
-                                       $languageKey = substr($languageKey,0,-1);
+                                       $languageKey = substr($languageKey, 0, -1);
                                        if (is_array($languageArray) && is_array($this->LOCAL_LANG[$languageKey])) {
                                                        // Remove the dot after the language key
                                                foreach ($languageArray as $labelKey => $labelValue) {
@@ -1003,7 +1003,7 @@ class tslib_pibase {
                        if (is_array($mm_cat)) {
                                $query = 'FROM ' . $table . ',' . $mm_cat['table'] . ',' . $mm_cat['mmtable'] . LF .
                                                ' WHERE ' . $table . '.uid=' . $mm_cat['mmtable'] . '.uid_local AND ' . $mm_cat['table'] . '.uid=' . $mm_cat['mmtable'] . '.uid_foreign ' . LF .
-                                               (strcmp($mm_cat['catUidList'],'') ? ' AND ' . $mm_cat['table'] . '.uid IN (' . $mm_cat['catUidList'] . ')' : '') . LF .
+                                               (strcmp($mm_cat['catUidList'], '') ? ' AND ' . $mm_cat['table'] . '.uid IN (' . $mm_cat['catUidList'] . ')' : '') . LF .
                                                ' AND ' . $table . '.pid IN (' . $pidList . ')' . LF .
                                                $this->cObj->enableFields($table) . LF; // This adds WHERE-clauses that ensures deleted, hidden, starttime/endtime/access records are NOT selected, if they should not! Almost ALWAYS add this to your queries!
                        } else {
@@ -1072,8 +1072,8 @@ class tslib_pibase {
         * @param       boolean         If $checkPage is set, it's required that the page on which the record resides is accessible
         * @return      array           If record is found, an array. Otherwise FALSE.
         */
-       function pi_getRecord($table,$uid,$checkPage=0) {
-               return $GLOBALS['TSFE']->sys_page->checkRecord($table,$uid,$checkPage);
+       function pi_getRecord($table, $uid, $checkPage=0) {
+               return $GLOBALS['TSFE']->sys_page->checkRecord($table, $uid, $checkPage);
        }
 
        /**
@@ -1113,13 +1113,13 @@ class tslib_pibase {
         * @param       string          List of fields where each element will be prepended with the table name given.
         * @return      string          List of fields processed.
         */
-       function pi_prependFieldsWithTable($table,$fieldList) {
-               $list=t3lib_div::trimExplode(',',$fieldList,1);
+       function pi_prependFieldsWithTable($table, $fieldList) {
+               $list=t3lib_div::trimExplode(',', $fieldList, 1);
                $return=array();
                foreach ($list as $listItem) {
                        $return[]=$table.'.'.$listItem;
                }
-               return implode(',',$return);
+               return implode(',', $return);
        }
 
        /**
@@ -1133,7 +1133,7 @@ class tslib_pibase {
         * @param       string          Optional LIMIT value ([begin,]max), if none, supply blank string.
         * @return      array           The array with the category records in.
         */
-       function pi_getCategoryTableContents($table,$pid,$whereClause='',$groupBy='',$orderBy='',$limit='') {
+       function pi_getCategoryTableContents($table, $pid, $whereClause='', $groupBy='', $orderBy='', $limit='') {
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                                        '*',
                                        $table,
@@ -1177,10 +1177,10 @@ class tslib_pibase {
         * @param       integer         Limit for the values.
         * @return      boolean         Returns TRUE (1) if conditions are met.
         */
-       function pi_isOnlyFields($fList,$lowerThan=-1) {
+       function pi_isOnlyFields($fList, $lowerThan=-1) {
                $lowerThan = $lowerThan==-1 ? $this->pi_lowerThan : $lowerThan;
 
-               $fList = t3lib_div::trimExplode(',',$fList,1);
+               $fList = t3lib_div::trimExplode(',', $fList, 1);
                $tempPiVars = $this->piVars;
                foreach ($fList as $k) {
                        if (!t3lib_utility_Math::canBeInterpretedAsInteger($tempPiVars[$k]) || $tempPiVars[$k]<$lowerThan)              unset($tempPiVars[$k]);
@@ -1200,7 +1200,7 @@ class tslib_pibase {
        function pi_autoCache($inArray) {
                if (is_array($inArray)) {
                        foreach ($inArray as $fN => $fV) {
-                               if (!strcmp($inArray[$fN],'')) {
+                               if (!strcmp($inArray[$fN], '')) {
                                        unset($inArray[$fN]);
                                } elseif (is_array($this->pi_autoCacheFields[$fN])) {
                                        if (is_array($this->pi_autoCacheFields[$fN]['range'])
@@ -1209,7 +1209,7 @@ class tslib_pibase {
                                                                unset($inArray[$fN]);
                                        }
                                        if (is_array($this->pi_autoCacheFields[$fN]['list'])
-                                                       && in_array($inArray[$fN],$this->pi_autoCacheFields[$fN]['list'])) {
+                                                       && in_array($inArray[$fN], $this->pi_autoCacheFields[$fN]['list'])) {
                                                                unset($inArray[$fN]);
                                        }
                                }
@@ -1267,10 +1267,10 @@ class tslib_pibase {
         * @param       string          Value pointer, eg. "vDEF"
         * @return      string          The content.
         */
-       function pi_getFFvalue($T3FlexForm_array,$fieldName,$sheet='sDEF',$lang='lDEF',$value='vDEF') {
+       function pi_getFFvalue($T3FlexForm_array, $fieldName, $sheet='sDEF', $lang='lDEF', $value='vDEF') {
                $sheetArray = is_array($T3FlexForm_array) ? $T3FlexForm_array['data'][$sheet][$lang] : '';
                if (is_array($sheetArray)) {
-                       return $this->pi_getFFvalueFromSheetArray($sheetArray,explode('/',$fieldName),$value);
+                       return $this->pi_getFFvalueFromSheetArray($sheetArray, explode('/', $fieldName), $value);
                }
        }
 
@@ -1284,7 +1284,7 @@ class tslib_pibase {
         * @access private
         * @see pi_getFFvalue()
         */
-       function pi_getFFvalueFromSheetArray($sheetArray,$fieldNameArr,$value) {
+       function pi_getFFvalueFromSheetArray($sheetArray, $fieldNameArr, $value) {
 
                $tempArr=$sheetArray;
                foreach($fieldNameArr as $k => $v) {
index 5964e51..1053a2d 100644 (file)
@@ -100,14 +100,14 @@ class tslib_search {
         * @param       string          $allowedCols: is the list of columns, that MAY be searched. All allowed cols are set as result-fields. All requested cols MUST be in the allowed-fields list.
         * @return      void
         */
-       function register_tables_and_columns($requestedCols,$allowedCols) {
+       function register_tables_and_columns($requestedCols, $allowedCols) {
                $rCols=$this->explodeCols($requestedCols);
                $aCols=$this->explodeCols($allowedCols);
 
                foreach ($rCols as $k => $v) {
                        $rCols[$k]=trim($v);
                        if (in_array($rCols[$k], $aCols)) {
-                               $parts = explode('.',$rCols[$k]);
+                               $parts = explode('.', $rCols[$k]);
                                $this->tables[$parts[0]]['searchfields'][] = $parts[1];
                        }
                }
@@ -117,8 +117,8 @@ class tslib_search {
 
                foreach ($aCols as $k => $v) {
                        $aCols[$k]=trim($v);
-                       $parts = explode('.',$aCols[$k]);
-                       $this->tables[$parts[0]]['resultfields'][] = $parts[1].' AS '.str_replace('.','_',$aCols[$k]);
+                       $parts = explode('.', $aCols[$k]);
+                       $this->tables[$parts[0]]['resultfields'][] = $parts[1].' AS '.str_replace('.', '_', $aCols[$k]);
                        $this->tables[$parts[0]]['fkey']='pid';
                }
 
@@ -142,13 +142,13 @@ class tslib_search {
         * @see register_tables_and_columns()
         */
        function explodeCols($in) {
-               $theArray = explode(':',$in);
+               $theArray = explode(':', $in);
                $out = Array();
                foreach ($theArray as $val) {
                        $val=trim($val);
-                       $parts = explode('.',$val);
+                       $parts = explode('.', $val);
                        if ($parts[0] && $parts[1]) {
-                               $subparts = explode('-',$parts[1]);
+                               $subparts = explode('-', $parts[1]);
                                foreach ($subparts as $piece) {
                                        $piece=trim($piece);
                                        if ($piece)             $out[]=$parts[0].'.'.$piece;
@@ -204,23 +204,23 @@ class tslib_search {
 
                        // As long as $sword is TRUE (that means $sword MUST be reduced little by little until its empty inside the loop!)
                while ($sword) {
-                       if (preg_match('/^"/',$sword))  {               // There was a double-quote and we will then look for the ending quote.
-                               $sword = preg_replace('/^"/','',$sword);                // Removes first double-quote
-                               preg_match('/^[^"]*/',$sword,$reg);  // Removes everything till next double-quote
+                       if (preg_match('/^"/', $sword)) {               // There was a double-quote and we will then look for the ending quote.
+                               $sword = preg_replace('/^"/', '', $sword);              // Removes first double-quote
+                               preg_match('/^[^"]*/', $sword, $reg);  // Removes everything till next double-quote
                                $value[] = $reg[0];  // reg[0] is the value, should not be trimmed
                                $sword = preg_replace('/^' . preg_quote($reg[0], '/') . '/', '', $sword);
-                               $sword = trim(preg_replace('/^"/','',$sword));          // Removes last double-quote
-                       } elseif (preg_match('/^'.$specs.'/',$sword,$reg)) {
+                               $sword = trim(preg_replace('/^"/', '', $sword));                // Removes last double-quote
+                       } elseif (preg_match('/^'.$specs.'/', $sword, $reg)) {
                                $value[] = $reg[0];
-                               $sword = trim(preg_replace('/^'.$specs.'/','',$sword));         // Removes = sign
-                       } elseif (preg_match('/[\+\-]/',$sword)) {      // Check if $sword contains + or -
+                               $sword = trim(preg_replace('/^'.$specs.'/', '', $sword));               // Removes = sign
+                       } elseif (preg_match('/[\+\-]/', $sword)) {     // Check if $sword contains + or -
                                        // + and - shall only be interpreted as $specchars when there's whitespace before it
                                        // otherwise it's included in the searchword (e.g. "know-how")
-                               $a_sword = explode(' ',$sword); // explode $sword to single words
+                               $a_sword = explode(' ', $sword);        // explode $sword to single words
                                $word = array_shift($a_sword);  // get first word
                                $word = rtrim($word, $delchars);                // Delete $delchars at end of string
                                $value[] = $word;       // add searchword to values
-                               $sword = implode(' ',$a_sword); // re-build $sword
+                               $sword = implode(' ', $a_sword);        // re-build $sword
                        } else {
                                        // There are no double-quotes around the value. Looking for next (space) or special char.
                                preg_match('/^[^ ' . preg_quote($specchars, '/') . ']*/', $sword, $reg);
@@ -278,8 +278,8 @@ class tslib_search {
                                                }
                                        }
                                }
-                               $this->queryParts['SELECT'] = implode(',',$fieldArray);
-                               $this->queryParts['FROM'] = implode(',',$tableArray);
+                               $this->queryParts['SELECT'] = implode(',', $fieldArray);
+                               $this->queryParts['FROM'] = implode(',', $tableArray);
 
                                        // Set join WHERE parts:
                                $whereArray = array();
@@ -293,7 +293,7 @@ class tslib_search {
                                        }
                                }
                                if (count($primKeys)) {
-                                       $whereArray[] = '('.implode(' OR ',$primKeys).')';
+                                       $whereArray[] = '('.implode(' OR ', $primKeys).')';
                                }
 
                                        // Additional where clause:
@@ -309,7 +309,7 @@ class tslib_search {
                                $whereArray[] = '('.$query_part.')';
 
                                        // Implode where clauses:
-                               $this->queryParts['WHERE'] = implode(' AND ',$whereArray);
+                               $this->queryParts['WHERE'] = implode(' AND ', $whereArray);
 
                                        // Group by settings:
                                if ($this->group_by) {
@@ -353,13 +353,13 @@ class tslib_search {
 
                                if (count($sub_query_part)) {
                                        $main_query_part[] = $this->sword_array[$key]['oper'];
-                                       $main_query_part[] = '('.implode(' OR ',$sub_query_part).')';
+                                       $main_query_part[] = '('.implode(' OR ', $sub_query_part).')';
                                }
                        }
 
                        if (count($main_query_part)) {
                                unset($main_query_part[0]);     // Remove first part anyways.
-                               return implode(' ',$main_query_part);
+                               return implode(' ', $main_query_part);
                        }
                }
        }
index 24e02a9..ab5ff41 100644 (file)
@@ -171,7 +171,7 @@ class tslib_content_Content extends tslib_content_Abstract {
                }
 
                $wrap = isset($conf['wrap.'])
-                       ? $this->cObj->stdWrap($conf['wrap'],$conf['wrap.'])
+                       ? $this->cObj->stdWrap($conf['wrap'], $conf['wrap.'])
                        : $conf['wrap'];
                if ($wrap) {
                        $theValue = $this->cObj->wrap($theValue, $wrap);
index 9f50b6d..8ad5ff4 100644 (file)
@@ -45,14 +45,14 @@ class tslib_content_ContentTable extends tslib_content_Abstract {
                $controlTable = t3lib_div::makeInstance('tslib_controlTable');
 
                $tableParams = isset($conf['tableParams.'])
-                       ? $this->cObj->stdWrap($conf['tableParams'],$conf['tableParams.'])
+                       ? $this->cObj->stdWrap($conf['tableParams'], $conf['tableParams.'])
                        : $conf['tableParams'];
                if ($tableParams) {
                        $controlTable->tableParams = $tableParams;
                }
                        // loads the pagecontent
                $conf['cWidth'] = isset($conf['cWidth.'])
-                       ? $this->cObj->stdWrap($conf['cWidth'],$conf['cWidth.'])
+                       ? $this->cObj->stdWrap($conf['cWidth'], $conf['cWidth.'])
                        : $conf['cWidth'];
                $controlTable->contentW = $conf['cWidth'];
 
@@ -60,7 +60,7 @@ class tslib_content_ContentTable extends tslib_content_Abstract {
                if (is_array($conf['c.'])) {
                        $controlTable->content = $this->cObj->cObjGet($conf['c.'], 'c.');
                        $contentTDParams = isset($conf['c.']['TDParams.'])
-                               ? $this->cObj->stdWrap($conf['c.']['TDParams'],$conf['c.']['TDParams.'])
+                               ? $this->cObj->stdWrap($conf['c.']['TDParams'], $conf['c.']['TDParams.'])
                                : $conf['c.']['TDParams'];
                        $controlTable->contentTDparams = isset($contentTDParams)
                                ? $contentTDParams
@@ -69,7 +69,7 @@ class tslib_content_ContentTable extends tslib_content_Abstract {
                if (is_array($conf['lm.'])) {
                        $controlTable->lm = $this->cObj->cObjGet($conf['lm.'], 'lm.');
                        $lmTDParams = isset($conf['lm.']['TDParams.'])
-                               ? $this->cObj->stdWrap($conf['lm.']['TDParams'],$conf['lm.']['TDParams.'])
+                               ? $this->cObj->stdWrap($conf['lm.']['TDParams'], $conf['lm.']['TDParams.'])
                                : $conf['lm.']['TDParams'];
                        $controlTable->lmTDparams = isset($lmTDParams)
                                ? $lmTDParams
@@ -78,7 +78,7 @@ class tslib_content_ContentTable extends tslib_content_Abstract {
                if (is_array($conf['tm.'])) {
                        $controlTable->tm = $this->cObj->cObjGet($conf['tm.'], 'tm.');
                        $tmTDParams = isset($conf['tm.']['TDParams.'])
-                               ? $this->cObj->stdWrap($conf['tm.']['TDParams'],$conf['tm.']['TDParams.'])
+                               ? $this->cObj->stdWrap($conf['tm.']['TDParams'], $conf['tm.']['TDParams.'])
                                : $conf['tm.']['TDParams'];
                        $controlTable->tmTDparams = isset($tmTDParams)
                                ? $tmTDParams
@@ -87,7 +87,7 @@ class tslib_content_ContentTable extends tslib_content_Abstract {
                if (is_array($conf['rm.'])) {
                        $controlTable->rm = $this->cObj->cObjGet($conf['rm.'], 'rm.');
                        $rmTDParams = isset($conf['rm.']['TDParams.'])
-                               ? $this->cObj->stdWrap($conf['rm.']['TDParams'],$conf['rm.']['TDParams.'])
+                               ? $this->cObj->stdWrap($conf['rm.']['TDParams'], $conf['rm.']['TDParams.'])
                                : $conf['rm.']['TDParams'];
                        $controlTable->rmTDparams = isset($rmTDParams)
                                ? $rmTDParams
@@ -96,7 +96,7 @@ class tslib_content_ContentTable extends tslib_content_Abstract {
                if (is_array($conf['bm.'])) {
                        $controlTable->bm = $this->cObj->cObjGet($conf['bm.'], 'bm.');
                        $bmTDParams = isset($conf['bm.']['TDParams.'])
-                               ? $this->cObj->stdWrap($conf['bm.']['TDParams'],$conf['bm.']['TDParams.'])
+                               ? $this->cObj->stdWrap($conf['bm.']['TDParams'], $conf['bm.']['TDParams.'])
                                : $conf['bm.']['TDParams'];
                        $controlTable->bmTDparams = isset($bmTDParams)
                                ? $bmTDParams
@@ -104,11 +104,11 @@ class tslib_content_ContentTable extends tslib_content_Abstract {
                }
 
                $conf['offset'] = isset($conf['offset.'])
-                               ? $this->cObj->stdWrap($conf['offset'],$conf['offset.'])
+                               ? $this->cObj->stdWrap($conf['offset'], $conf['offset.'])
                                : $conf['offset'];
 
                $conf['cMargins'] = isset($conf['cMargins.'])
-                               ? $this->cObj->stdWrap($conf['cMargins'],$conf['cMargins.'])
+                               ? $this->cObj->stdWrap($conf['cMargins'], $conf['cMargins.'])
                                : $conf['cMargins'];
 
                $theValue = $controlTable->start($conf['offset'], $conf['cMargins']);
index 0093965..c7a287f 100644 (file)
@@ -256,7 +256,7 @@ class tslib_content_FlowPlayer extends tslib_content_Abstract {
                        ? $this->cObj->stdWrap($conf['flashVersion'], $conf['flashVersion.'])
                        :  $conf['flashVersion'];
                if (!$flashVersion) {
-                       $flashVersion = array(9,115);
+                       $flashVersion = array(9, 115);
                }
 
                $flashConfiguration = array(
index fc17535..871e155 100644 (file)
@@ -80,7 +80,7 @@ class tslib_content_Form extends tslib_content_Abstract {
                                                        : $singleKeyArray['label'];
                                                list ($temp[0]) = explode('|', $label);
                                                $type = isset($singleKeyArray['type.'])
-                                                       ? $this->cObj->stdWrap($singleKeyArray['type'],$singleKeyArray['type.'])
+                                                       ? $this->cObj->stdWrap($singleKeyArray['type'], $singleKeyArray['type.'])
                                                        : $singleKeyArray['type'];
                                                list ($temp[1]) = explode('|', $type);
                                                $required = isset($singleKeyArray['required.'])
index 96a1b95..20c60d2 100644 (file)
@@ -40,7 +40,7 @@
 // ******************
 // Constants defined
 // ******************
-define('TYPO3_MODE','FE');
+define('TYPO3_MODE', 'FE');
 
 // *********************
 // Prevent any output until AJAX/compression is initialized to stop
@@ -143,7 +143,7 @@ if ($TYPO3_CONF_VARS['FE']['compressionLevel'] && extension_loaded('zlib')) {
 // *********
 // FE_USER
 // *********
-$TT->push('Front End user initialized','');
+$TT->push('Front End user initialized', '');
        /* @var $TSFE tslib_fe */
        $TSFE->initFEuser();
 $TT->pull();
@@ -160,7 +160,7 @@ $BE_USER = $TSFE->initializeBackendUser();
 // Process the ID, type and other parameters
 // After this point we have an array, $page in TSFE, which is the page-record of the current page, $id
 // *****************************************
-$TT->push('Process ID','');
+$TT->push('Process ID', '');
                // Initialize admin panel since simulation settings are required here:
        if ($TSFE->isBackendUserLoggedIn()) {
                $BE_USER->initializeAdminPanel();
@@ -210,7 +210,7 @@ $TSFE->getCompressedTCarray();
 // ********************************
 // Starts the template
 // *******************************
-$TT->push('Start Template','');
+$TT->push('Start Template', '');
        $TSFE->initTemplate();
 $TT->pull();
 
@@ -218,7 +218,7 @@ $TT->pull();
 // ********************************
 // Get from cache
 // *******************************
-$TT->push('Get Page from cache','');
+$TT->push('Get Page from cache', '');
        $TSFE->getFromCache();
 $TT->pull();
 
@@ -238,7 +238,7 @@ $TSFE->convPOSTCharset();
 // *******************************************
 // Setting language and locale
 // *******************************************
-$TT->push('Setting language and locale','');
+$TT->push('Setting language and locale', '');
        $TSFE->settingLanguage();
        $TSFE->settingLocale();
 $TT->pull();
@@ -273,7 +273,7 @@ $TSFE->checkPageForShortcutRedirect();
 // *******************************
 $TSFE->setUrlIdToken();
 
-$TT->push('Page generation','');
+$TT->push('Page generation', '');
        if ($TSFE->isGeneratePage()) {
                $TSFE->generatePage_preProcessing();
                $temp_theScript=$TSFE->generatePage_whichScript();
@@ -294,7 +294,7 @@ $TT->pull();
 // $TSFE->config['INTincScript']
 // *******************************
 if ($TSFE->isINTincScript())           {
-       $TT->push('Non-cached objects','');
+       $TT->push('Non-cached objects', '');
                $TSFE->INTincScript();
        $TT->pull();
 }
@@ -304,7 +304,7 @@ if ($TSFE->isINTincScript())                {
 // ***************
 $sendTSFEContent = FALSE;
 if ($TSFE->isOutputting()) {
-       $TT->push('Print Content','');
+       $TT->push('Print Content', '');
        $TSFE->processOutput();
        $sendTSFEContent = TRUE;
        $TT->pull();
@@ -377,7 +377,7 @@ if ($sendTSFEContent) {
 // *************
 // Debugging Output
 // *************
-if(isset($error) && is_object($error) && @is_callable(array($error,'debugOutput'))) {
+if(isset($error) && is_object($error) && @is_callable(array($error, 'debugOutput'))) {
        $error->debugOutput();
 }
 if (TYPO3_DLOG) {
index 7bed71a..b3e38fe 100755 (executable)
@@ -61,7 +61,7 @@
  * @param      array           TypoScript properties passed on to this function.
  * @return     string          The input string reversed. If the TypoScript property "uppercase" was set it will also be in uppercase.
  */
-function user_reverseString($content,$conf) {
+function user_reverseString($content, $conf) {
        $content = strrev($content);
        if ($conf['uppercase']) {
                $content=strtoupper($content);
@@ -86,7 +86,7 @@ function user_reverseString($content,$conf) {
  * @param      array           TypoScript configuration
  * @return     string          HTML output, showing the current server time.
  */
-function user_printTime($content,$conf) {
+function user_printTime($content, $conf) {
        return '<font color="red">Dynamic time: '.date('H:i:s').'</font><br />';
 }
 
@@ -107,13 +107,13 @@ class user_various        {
         * @return      string          The input string reversed. If the TypoScript property "uppercase" was set it will also be in uppercase. May also be linked.
         * @see user_reverseString()
         */
-       function reverseString($content,$conf) {
+       function reverseString($content, $conf) {
                $content = strrev($content);
                if ($conf['uppercase']) {
-                       $content=$this->cObj->caseshift($content,'upper');
+                       $content=$this->cObj->caseshift($content, 'upper');
                }
                if ($conf['typolink']) {
-                       $content=$this->cObj->getTypoLink($content,$conf['typolink']);
+                       $content=$this->cObj->getTypoLink($content, $conf['typolink']);
                }
                return $content;
        }
@@ -136,7 +136,7 @@ class user_various  {
         * @param       array           TypoScript configuration
         * @return      string          HTML output, showing content elements (in reverse order if configured.)
         */
-       function listContentRecordsOnPage($content,$conf) {
+       function listContentRecordsOnPage($content, $conf) {
                $query = $GLOBALS['TYPO3_DB']->SELECTquery(
                                                'header',
                                                'tt_content',
@@ -161,7 +161,7 @@ class user_various  {
                while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                        $output[]=$row['header'];
                }
-               return implode($output,'<br />');
+               return implode($output, '<br />');
        }
 }
 
index 3a36b7b..4bbc888 100755 (executable)
  * @param      array           TypoScript configuration for the function. Notice that the property "parentObj" is a reference to the parent (calling) object (the tslib_Xmenu class instantiated)
  * @return     array           The modified $menuArr array
  */
-function user_itemArrayProcFuncTest($menuArr,$conf) {
+function user_itemArrayProcFuncTest($menuArr, $conf) {
        if ($conf['demoItemStates'])    {               // Used in the example of item states
                $c=0;
-               $teststates=explode(',','NO,ACT,IFSUB,CUR,USR,SPC,USERDEF1,USERDEF2');
+               $teststates=explode(',', 'NO,ACT,IFSUB,CUR,USR,SPC,USERDEF1,USERDEF2');
                foreach ($menuArr as $k => $v) {
                        $menuArr[$k]['ITEM_STATE']=$teststates[$c];
                        $menuArr[$k]['title'].= ($teststates[$c] ? ' ['.$teststates[$c].']' : '');
@@ -99,7 +99,7 @@ function user_itemArrayProcFuncTest($menuArr,$conf) {
  * @return     array           The processed $I array returned (and stored in $this->I of the parent object again)
  * @see tslib_menu::userProcess(), tslib_tmenu::writeMenu(), tslib_gmenu::writeMenu()
  */
-function user_IProcFuncTest($I,$conf) {
+function user_IProcFuncTest($I, $conf) {
        $itemRow = $conf['parentObj']->menuArr[$I['key']];
 
                // Setting the document status content to the value of the page title on mouse over
index bc73b0e..f474335 100755 (executable)
@@ -48,7 +48,7 @@
  * @return     array           The processed $I array returned (and stored in $this->I of the parent object again)
  * @see tslib_menu::userProcess(), tslib_tmenu::writeMenu(), tslib_gmenu::writeMenu()
  */
-function user_keepRolloverAtOnClick($I,$conf) {
+function user_keepRolloverAtOnClick($I, $conf) {
        $itemRow = $conf['parentObj']->menuArr[$I['key']];
 
                // Setting the document status content to the value of the page title on mouse over
index 0dd798d..3e71e83 100755 (executable)
@@ -60,6 +60,6 @@ $flags[] = ($GLOBALS['TSFE']->sys_language_uid==1?$pointer:'').'<a href="'.htmls
 $flags[] = ($GLOBALS['TSFE']->sys_language_uid==2?$pointer:'').'<a href="'.htmlspecialchars('index.php?id='.$GLOBALS['TSFE']->id.'&L=2').'" target="_top"><img src="typo3/sysext/cms/tslib/media/uploads/flag_de'.($langArr[2]?'':'_d').'.gif" width="21" height="13" hspace="5" border="0" alt="" /></a>';
 
 // Make the little menu. Notice, the menu does ONLY transfer the page-id and the "L" variable (which is also SPECIFIC for this website because "L" has been used in the extension template used to control the language setup)
-$content = '<table border="0" cellpadding="0" cellspacing="0"><tr><td><img src="clear.gif" width="30" height="1" alt="" /></td><td>'.implode('',$flags).'</td></tr></table>';
+$content = '<table border="0" cellpadding="0" cellspacing="0"><tr><td><img src="clear.gif" width="30" height="1" alt="" /></td><td>'.implode('', $flags).'</td></tr></table>';
 
 ?>
\ No newline at end of file
index 6440cb2..0574cc8 100755 (executable)
@@ -66,7 +66,7 @@
  * @return     string          Return the new <a> tag
  * @see tslib_cObj::typoLink()
  */
-function user_typoLinkPopUp($content,$conf) {
+function user_typoLinkPopUp($content, $conf) {
        $aOnClick = 'openPic(\''.$GLOBALS['TSFE']->baseUrlWrap($content['url']).'\',\'popupwin\',\'width=400,height=500,status=0,menubar=0\'); return false;';
        $TAG =  '<a href="#" onclick="'.htmlspecialchars($aOnClick).'"'.$content['aTagParams'].'>';
        return $TAG;
index fb3d74c..56a44e9 100755 (executable)
@@ -82,8 +82,8 @@ class tslib_gmenu_foldout extends tslib_gmenu {
                $this->WMimagesFlag=0;
                $this->WMimageHTML ='';
                if (($this->mconf['arrowNO'] || $this->mconf['arrowNO.']) && ($this->mconf['arrowACT'] || $this->mconf['arrowACT.'])) {
-                       $this->WMarrowNO = $GLOBALS['TSFE']->cObj->getImgResource($this->mconf['arrowNO'],$this->mconf['arrowNO.']);
-                       $this->WMarrowACT = $GLOBALS['TSFE']->cObj->getImgResource($this->mconf['arrowACT'],$this->mconf['arrowACT.']);
+                       $this->WMarrowNO = $GLOBALS['TSFE']->cObj->getImgResource($this->mconf['arrowNO'], $this->mconf['arrowNO.']);
+                       $this->WMarrowACT = $GLOBALS['TSFE']->cObj->getImgResource($this->mconf['arrowACT'], $this->mconf['arrowACT.']);
                        if (is_array($this->WMarrowACT) && is_array($this->WMarrowNO)) {
                                $this->WMimagesFlag=1;
                        }
@@ -142,15 +142,15 @@ class tslib_gmenu_foldout extends tslib_gmenu {
         */
        function extProc_finish() {
                $bHeight = t3lib_utility_Math::forceIntegerInRange(($this->mconf['bottomHeight']?$this->mconf['bottomHeight']:100), 0, 3000);
-               $bottomContent = $this->mconf['bottomContent'] ? $GLOBALS['TSFE']->cObj->cObjGetSingle($this->mconf['bottomContent'],$this->mconf['bottomContent.'], '/GMENU_FOLDOUT/.bottomContent') : '';
+               $bottomContent = $this->mconf['bottomContent'] ? $GLOBALS['TSFE']->cObj->cObjGetSingle($this->mconf['bottomContent'], $this->mconf['bottomContent.'], '/GMENU_FOLDOUT/.bottomContent') : '';
                $adjustTopHeights = intval($this->mconf['adjustItemsH']);
                $adjustSubHeights = intval($this->mconf['adjustSubItemsH']);
                $mWidth = t3lib_utility_Math::forceIntegerInRange(($this->mconf['menuWidth']?$this->mconf['menuWidth']:170), 0, 3000);
                $mHeight = t3lib_utility_Math::forceIntegerInRange(($this->mconf['menuHeight']?$this->mconf['menuHeight']:400), 0, 3000);
                $insertmColor= $this->mconf['menuBackColor'] ? 'BACKGROUND-COLOR: '.$this->mconf['menuBackColor'].'; layer-background-color: '.$this->mconf['menuBackColor'] : '';
                $insertBottomColor= $this->mconf['bottomBackColor'] ? 'BACKGROUND-COLOR: '.$this->mconf['bottomBackColor'].'; layer-background-color: '.$this->mconf['bottomBackColor'] : '';
-               $menuOffset = t3lib_div::intExplode(',',$this->mconf['menuOffset'].',');
-               $subOffset = t3lib_div::intExplode(',',$this->mconf['subMenuOffset'].',');
+               $menuOffset = t3lib_div::intExplode(',', $this->mconf['menuOffset'].',');
+               $subOffset = t3lib_div::intExplode(',', $this->mconf['subMenuOffset'].',');
 
 
                $GLOBALS['TSFE']->additionalHeaderData['gmenu_layer_shared']='<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath('cms').'tslib/media/scripts/jsfunc.layermenu.js"></script>';
@@ -178,7 +178,7 @@ class tslib_gmenu_foldout extends tslib_gmenu {
 <!--
 GFV_foldNumber='.$this->WMmenuItems.';          //How many toplinks do you have?
 GFV_foldTimer='.t3lib_utility_Math::forceIntegerInRange(($this->mconf['foldTimer']?$this->mconf['foldTimer']:40), 1, 3000).';          //The timeout in the animation, these are milliseconds.
-GFV_foldSpeed='.t3lib_utility_Math::forceIntegerInRange($this->mconf['foldSpeed'],1,100).';           //How many steps in an animation?
+GFV_foldSpeed='.t3lib_utility_Math::forceIntegerInRange($this->mconf['foldSpeed'], 1, 100).';           //How many steps in an animation?
 GFV_stayFolded='.($this->mconf['stayFolded'] ? 'true' : 'false').';      //Stay open when you click a new toplink?
 GFV_foldImg='.$this->WMimagesFlag.';             //Do you want images (if not set to 0 and remove the images from the body)?
 GFV_currentFold=null;
@@ -211,7 +211,7 @@ GFV_exImg.src="'.$GLOBALS['TSFE']->absRefPrefix.$this->WMarrowACT[3].'";   //...
 
                $GLOBALS['TSFE']->divSection.= '
 <div id="divCont"><!-- These are the contents of the foldoutmenu. -->
-               '.$this->tmpl->wrap($this->WMresult,$this->mconf['wrap']).'
+               '.$this->tmpl->wrap($this->WMresult, $this->mconf['wrap']).'
 <div class="bottomLayer" id="divTop'.($this->WMmenuItems+1).'">
        <div class="clSub" id="divSub'.($this->WMmenuItems+1).'"><!-- This is a cover layer, it should always be the last one, and does NOT count in your number of toplinks! --><!-- So if this one is divTop7, the GFV_foldNumber variable should be set to 6 --><!-- This layer covers up the last sub, so if the last sub gets too big, increase this layers size in the stylesheet. --><!-- There are tables with width="100%" around the toplinks, to force NS4 to use the real width specified for the toplinks in the stylesheet. -->
        </div>'.$this->tmpl->wrap($bottomContent, $this->WMtableWrap).'
index e8cf4fc..803852c 100644 (file)
@@ -101,7 +101,7 @@ class tslib_gmenu_layers extends tslib_gmenu {
 
                        // Save:
                $this->WMonlyOnLoad = ($this->mconf['displayActiveOnLoad'] && !$this->mconf['displayActiveOnLoad.']['onlyOnLoad']);
-               $this->WMbordersWithin = t3lib_div::intExplode(',',$this->mconf['bordersWithin'].',0,0,0,0,0');
+               $this->WMbordersWithin = t3lib_div::intExplode(',', $this->mconf['bordersWithin'].',0,0,0,0,0');
        }
 
        /**
@@ -129,14 +129,14 @@ class tslib_gmenu_layers extends tslib_gmenu {
        function extProc_beforeLinking($key) {
                if ($this->I['uid']) {
 
-                       array_push($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'],$this->WMid);
+                       array_push($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'], $this->WMid);
                        $this->WMtheSubMenu = $this->subMenu($this->I['uid'], $this->WMsubmenuObjSuffixes[$key]['sOSuffix']);
                        array_pop($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId']);
                        $this->WMisSub = trim($this->WMtheSubMenu) ? 1 : 0;
 
                        if ($this->mconf['lockPosition_addSelf'])               {
-                               $this->WMy+=(strcmp($this->mconf['setFixedHeight'],'')?$this->mconf['setFixedHeight']:$this->I['val']['output_h'])+intval($this->mconf['lockPosition_adjust']);
-                               $this->WMx+=(strcmp($this->mconf['setFixedWidth'],'')?$this->mconf['setFixedWidth']:$this->I['val']['output_w'])+intval($this->mconf['lockPosition_adjust']);
+                               $this->WMy+=(strcmp($this->mconf['setFixedHeight'], '')?$this->mconf['setFixedHeight']:$this->I['val']['output_h'])+intval($this->mconf['lockPosition_adjust']);
+                               $this->WMx+=(strcmp($this->mconf['setFixedWidth'], '')?$this->mconf['setFixedWidth']:$this->I['val']['output_w'])+intval($this->mconf['lockPosition_adjust']);
                        }
 
                        if ($this->isActive($this->I['uid'], $this->getMPvar($key)) && $this->mconf['displayActiveOnLoad'])     {       // orig: && $this->WMisSub, changed 210901
@@ -159,7 +159,7 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                                if ($this->mconf['ieSelectFix']) $this->I['linkHREF']['onMouseover']=$this->I['linkHREF']['onMouseover'].'GL_iframer(\''.$this->WMid.'\',\'Menu'.$this->WMid.$key.'\',true);';
                                        // Added 120802; This means that everytime leaving a menuitem the layer should be shut down (and if the layer is hit in the meantime it is not though).
                                        // This should happen only for items that are auto-hidden when not over and possibly only when a hide-timer is set. Problem is if the hide-timer is not set and we leave the main element, then the layer will be hidden unless we reach the layer before the timeout will happen and the menu hidden.
-                               if (t3lib_utility_Math::forceIntegerInRange($this->mconf['hideMenuWhenNotOver'],0,600) && $this->mconf['hideMenuTimer']) {
+                               if (t3lib_utility_Math::forceIntegerInRange($this->mconf['hideMenuWhenNotOver'], 0, 600) && $this->mconf['hideMenuTimer']) {
                                        $event.='GL_resetAll("'.$this->WMid.'");';
                                }
                                $this->I['linkHREF']['onMouseout'].=$event;
@@ -201,8 +201,8 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                        }
 
                        if (!$this->mconf['lockPosition_addSelf'])              {
-                               $this->WMy+=(strcmp($this->mconf['setFixedHeight'],'')?$this->mconf['setFixedHeight']:$this->I['val']['output_h'])+intval($this->mconf['lockPosition_adjust']);
-                               $this->WMx+=(strcmp($this->mconf['setFixedWidth'],'')?$this->mconf['setFixedWidth']:$this->I['val']['output_w'])+intval($this->mconf['lockPosition_adjust']);
+                               $this->WMy+=(strcmp($this->mconf['setFixedHeight'], '')?$this->mconf['setFixedHeight']:$this->I['val']['output_h'])+intval($this->mconf['lockPosition_adjust']);
+                               $this->WMx+=(strcmp($this->mconf['setFixedWidth'], '')?$this->mconf['setFixedWidth']:$this->I['val']['output_w'])+intval($this->mconf['lockPosition_adjust']);
                        }
                }
                $this->WMresult.=$this->I['theItem'];
@@ -215,7 +215,7 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
         * @param       integer         Pointer to $this->menuArr[$key] where the current menu element record is found
         * @return      string          The modified version of $item, going back into $this->I['theItem']
         */
-       function extProc_beforeAllWrap($item,$key) {
+       function extProc_beforeAllWrap($item, $key) {
                if ($this->mconf['relativeToTriggerItem']) {
                        $item = '<div id="anchorID'.t3lib_div::shortmd5($this->I['uid'].'-'.$this->WMid).'" style="position:absolute;visibility:hidden;"></div><div id="itemID'.t3lib_div::shortmd5($this->I['uid'].'-'.$this->WMid).'" style="width:100%; height:100%;">'.$item.'</div>';
                }
@@ -229,7 +229,7 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
         * @return      boolean         TRUE if $in is different from ''  OR if intval()!=0
         */
        function isSetIntval($in) {
-               return $this->mconf['blankStrEqFalse'] ? strcmp($in,'') : intval($in);
+               return $this->mconf['blankStrEqFalse'] ? strcmp($in, '') : intval($in);
        }
 
        /**
@@ -274,7 +274,7 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                        $DoTop[]='GLV_menuOn["'.$this->WMid.'"].top =  ('.$relCode['Y'].intval($this->mconf['topOffset']).$dirU.')+"px";';
                } else {
                                // X position (y is fixed)
-                       if (!strcmp($this->mconf['lockPosition'],'x')) {
+                       if (!strcmp($this->mconf['lockPosition'], 'x')) {
                                $DoTop[]='GLV_menuOn["'.$this->WMid.'"].left = ('.$relCode['X'].'GLV_menuXY["'.$this->WMid.'"][id][0]-('.intval($this->mconf['xPosOffset']).')'.$dirL.')+"px";';
                                if ($this->isSetIntval($this->mconf['topOffset'])) {
                                        $DoTop[]='GLV_menuOn["'.$this->WMid.'"].top = ('.$relCode['Y'].intval($this->mconf['topOffset']).$dirU.')+"px";';
@@ -286,7 +286,7 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                                }
                        }
                                // Y position   (x is fixed)
-                       if (!strcmp($this->mconf['lockPosition'],'y')) {
+                       if (!strcmp($this->mconf['lockPosition'], 'y')) {
                                $DoTop[]='GLV_menuOn["'.$this->WMid.'"].top = ('.$relCode['Y'].'GLV_menuXY["'.$this->WMid.'"][id][1]-('.intval($this->mconf['yPosOffset']).')'.$dirU.')+"px";';
                                if ($this->isSetIntval($this->mconf['leftOffset'])) {
                                        $DoTop[]='GLV_menuOn["'.$this->WMid.'"].left = ('.$relCode['X'].intval($this->mconf['leftOffset']).$dirL.')+"px";';
@@ -300,12 +300,12 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                }
 
                        // BordersWithIn:
-               $DoTop[]=$this->extCalcBorderWithin('left',$this->WMbordersWithin[0]);
-               $DoTop[]=$this->extCalcBorderWithin('top',$this->WMbordersWithin[1]);
-               $DoTop[]=$this->extCalcBorderWithin('right',$this->WMbordersWithin[2]);
-               $DoTop[]=$this->extCalcBorderWithin('bottom',$this->WMbordersWithin[3]);
-               $DoTop[]=$this->extCalcBorderWithin('left',$this->WMbordersWithin[4]);
-               $DoTop[]=$this->extCalcBorderWithin('top',$this->WMbordersWithin[5]);
+               $DoTop[]=$this->extCalcBorderWithin('left', $this->WMbordersWithin[0]);
+               $DoTop[]=$this->extCalcBorderWithin('top', $this->WMbordersWithin[1]);
+               $DoTop[]=$this->extCalcBorderWithin('right', $this->WMbordersWithin[2]);
+               $DoTop[]=$this->extCalcBorderWithin('bottom', $this->WMbordersWithin[3]);
+               $DoTop[]=$this->extCalcBorderWithin('left', $this->WMbordersWithin[4]);
+               $DoTop[]=$this->extCalcBorderWithin('top', $this->WMbordersWithin[5]);
 
 
                if ($this->mconf['freezeMouseover'] && !$this->mconf['freezeMouseover.']['alwaysKeep']) {
@@ -330,7 +330,7 @@ if (!GLV_doReset["'.$mIdStr.'"] && GLV_currentLayer["'.$mIdStr.'"]!=null)   resetS
        GL_iframer(\''.$this->WMid.'\',\'\',false);';
                        $this->divLayers['iframe'] = '<iframe id="Iframe'.$this->WMid.'" scrolling="no" frameborder="0" style="position:absolute; top:0px; left:0px; background-color:transparent; layer-background-color:transparent; display:none;"></iframe>';
                }
-               $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid']=array_merge($this->WMtempStore,$GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid']);
+               $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid']=array_merge($this->WMtempStore, $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid']);
                $GLOBALS['TSFE']->additionalHeaderData['gmenu_layer_shared']='<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath('cms').'tslib/media/scripts/jsfunc.layermenu.js"></script>';
                $GLOBALS['TSFE']->JSCode.= '
 
@@ -352,7 +352,7 @@ GLV_date = new Date();
 GLV_timeout["'.$this->WMid.'"] = GLV_date.getTime();
 GLV_timeoutRef["'.$this->WMid.'"] = '.t3lib_utility_Math::forceIntegerInRange($this->mconf['hideMenuTimer'],0,20000).';
 GLV_menuXY["'.$this->WMid.'"] = new Array();
-'.implode(LF,$this->WMxyArray).'
+'.implode(LF, $this->WMxyArray).'
 '.$this->WMrestoreVars;
 
                if ($this->mconf['freezeMouseover']) {
@@ -361,14 +361,14 @@ GLV_menuXY["'.$this->WMid.'"] = new Array();
 function GL'.$this->WMid.'_over(mitm_id) {
        GL'.$this->WMid.'_out("");      // removes any old roll over state of an item. Needed for alwaysKeep and Opera browsers.
        switch(mitm_id) {
-'.implode(LF,$this->VMmouseoverActions).'
+'.implode(LF, $this->VMmouseoverActions).'
        }
        GLV_currentROitem["'.$this->WMid.'"]=mitm_id;
 }
 function GL'.$this->WMid.'_out(mitm_id) {
        if (!mitm_id)   mitm_id=GLV_currentROitem["'.$this->WMid.'"];
        switch(mitm_id) {
-'.implode(LF,$this->VMmouseoutActions).'
+'.implode(LF, $this->VMmouseoutActions).'
        }
 }
 ';
@@ -376,7 +376,7 @@ function GL'.$this->WMid.'_out(mitm_id) {
                $GLOBALS["TSFE"]->JSCode.= '
 function GL'.$this->WMid.'_getMouse(e) {
        if (GLV_menuOn["'.$this->WMid.'"]!=null && !GLV_dontFollowMouse["'.$this->WMid.'"]){
-'.implode(LF,$GLV_menuOn).'
+'.implode(LF, $GLV_menuOn).'
        }
        GL_mouseMoveEvaluate("'.$this->WMid.'");
 }
@@ -384,7 +384,7 @@ function GL'.$this->WMid.'_hideCode() {
 '.$this->WMhideCode.'
 }
 function GL'.$this->WMid.'_doTop(WMid,id) {
-'.trim(implode(LF,$DoTop)).'
+'.trim(implode(LF, $DoTop)).'
 }
 function GL'.$this->WMid.'_restoreMenu() {
 '.$this->WMrestoreScript.'
@@ -407,7 +407,7 @@ GLV_timeout_count++;
                $GLOBALS['TSFE']->JSeventFuncCalls['onmousemove'][$this->WMid]= 'try{GL'.$this->WMid.'_getMouse(e);}catch(ex){};';
                $GLOBALS['TSFE']->JSeventFuncCalls['onmouseup'][$this->WMid]= 'GL_mouseUp(\''.$this->WMid.'\',e);';
 
-               $GLOBALS['TSFE']->divSection.=implode($this->divLayers,LF).LF;
+               $GLOBALS['TSFE']->divSection.=implode($this->divLayers, LF).LF;
 
                return parent::extProc_finish();
        }
@@ -420,7 +420,7 @@ GLV_timeout_count++;
         * @return      string          JavaScript string for correction of the layer position (if $integer is TRUE)
         * @see extProc_finish(), extProc_init()
         */
-       function extCalcBorderWithin($kind,$integer) {
+       function extCalcBorderWithin($kind, $integer) {
                if ($integer) {
                        switch($kind) {
                                case 'right':
index 8c4441b..3accefe 100755 (executable)
@@ -12,7 +12,7 @@ if (!is_object($TSFE)) die ('Error: No parent object present.');
  * @param      array           TypoScript configuration passed
  * @return     string          Current time wrapped in <font> tags with red color
  */
-function user_printTimeExt($content,$conf) {
+function user_printTimeExt($content, $conf) {
        return '<font color="red">Dynamic time: '.date('H:i:s').'</font><br />';
 }
 
@@ -51,7 +51,7 @@ Good luck....
 
 
 BTW: The time:
-<?php if ($CONF['showTime'])   {echo user_printTimeExt('','');} ?>
+<?php if ($CONF['showTime'])   {echo user_printTimeExt('', '');} ?>
 <br />
 <br />
 
index e7e85ee..95b9eda 100644 (file)
@@ -101,7 +101,7 @@ class tslib_tmenu_layers extends tslib_tmenu {
 
                        // Save:
                $this->WMonlyOnLoad = ($this->mconf['displayActiveOnLoad'] && !$this->mconf['displayActiveOnLoad.']['onlyOnLoad']);
-               $this->WMbordersWithin = t3lib_div::intExplode(',',$this->mconf['bordersWithin'].',0,0,0,0,0');
+               $this->WMbordersWithin = t3lib_div::intExplode(',', $this->mconf['bordersWithin'].',0,0,0,0,0');
        }
 
        /**
@@ -129,14 +129,14 @@ class tslib_tmenu_layers extends tslib_tmenu {
        function extProc_beforeLinking($key) {
                if ($this->I['uid']) {
 
-                       array_push($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'],$this->WMid);
+                       array_push($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'], $this->WMid);
                        $this->WMtheSubMenu = $this->subMenu($this->I['uid'], $this->WMsubmenuObjSuffixes[$key]['sOSuffix']);
                        array_pop($GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId']);
                        $this->WMisSub = trim($this->WMtheSubMenu) ? 1 : 0;
 
                        if ($this->mconf['lockPosition_addSelf'])               {
-                               $this->WMy+=(strcmp($this->mconf['setFixedHeight'],'')?$this->mconf['setFixedHeight']:$this->I['val']['output_h'])+intval($this->mconf['lockPosition_adjust']);
-                               $this->WMx+=(strcmp($this->mconf['setFixedWidth'],'')?$this->mconf['setFixedWidth']:$this->I['val']['output_w'])+intval($this->mconf['lockPosition_adjust']);
+                               $this->WMy+=(strcmp($this->mconf['setFixedHeight'], '')?$this->mconf['setFixedHeight']:$this->I['val']['output_h'])+intval($this->mconf['lockPosition_adjust']);
+                               $this->WMx+=(strcmp($this->mconf['setFixedWidth'], '')?$this->mconf['setFixedWidth']:$this->I['val']['output_w'])+intval($this->mconf['lockPosition_adjust']);
                        }
 
                        if ($this->isActive($this->I['uid'], $this->getMPvar($key)) && $this->mconf['displayActiveOnLoad'])     {       // orig: && $this->WMisSub, changed 210901
@@ -159,7 +159,7 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                                if ($this->mconf['ieSelectFix']) $this->I['linkHREF']['onMouseover']=$this->I['linkHREF']['onMouseover'].'GL_iframer(\''.$this->WMid.'\',\'Menu'.$this->WMid.$key.'\',true);';
                                        // Added 120802; This means that everytime leaving a menuitem the layer should be shut down (and if the layer is hit in the meantime it is not though).
                                        // This should happen only for items that are auto-hidden when not over and possibly only when a hide-timer is set. Problem is if the hide-timer is not set and we leave the main element, then the layer will be hidden unless we reach the layer before the timeout will happen and the menu hidden.
-                               if (t3lib_utility_Math::forceIntegerInRange($this->mconf['hideMenuWhenNotOver'],0,600) && $this->mconf['hideMenuTimer']) {
+                               if (t3lib_utility_Math::forceIntegerInRange($this->mconf['hideMenuWhenNotOver'], 0, 600) && $this->mconf['hideMenuTimer']) {
                                        $event.='GL_resetAll("'.$this->WMid.'");';
                                }
                                $this->I['linkHREF']['onMouseout'].=$event;
@@ -201,8 +201,8 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                        }
 
                        if (!$this->mconf['lockPosition_addSelf'])              {
-                               $this->WMy+=(strcmp($this->mconf['setFixedHeight'],'')?$this->mconf['setFixedHeight']:$this->I['val']['output_h'])+intval($this->mconf['lockPosition_adjust']);
-                               $this->WMx+=(strcmp($this->mconf['setFixedWidth'],'')?$this->mconf['setFixedWidth']:$this->I['val']['output_w'])+intval($this->mconf['lockPosition_adjust']);
+                               $this->WMy+=(strcmp($this->mconf['setFixedHeight'], '')?$this->mconf['setFixedHeight']:$this->I['val']['output_h'])+intval($this->mconf['lockPosition_adjust']);
+                               $this->WMx+=(strcmp($this->mconf['setFixedWidth'], '')?$this->mconf['setFixedWidth']:$this->I['val']['output_w'])+intval($this->mconf['lockPosition_adjust']);
                        }
                }
                $this->WMresult.=$this->I['theItem'];
@@ -215,7 +215,7 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
         * @param       integer         Pointer to $this->menuArr[$key] where the current menu element record is found
         * @return      string          The modified version of $item, going back into $this->I['theItem']
         */
-       function extProc_beforeAllWrap($item,$key) {
+       function extProc_beforeAllWrap($item, $key) {
                if ($this->mconf['relativeToTriggerItem']) {
                        $item = '<div id="anchorID'.t3lib_div::shortmd5($this->I['uid'].'-'.$this->WMid).'" style="position:absolute;visibility:hidden;"></div><div id="itemID'.t3lib_div::shortmd5($this->I['uid'].'-'.$this->WMid).'" style="width:100%; height:100%;">'.$item.'</div>';
                }
@@ -229,7 +229,7 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
         * @return      boolean         TRUE if $in is different from ''  OR if intval()!=0
         */
        function isSetIntval($in) {
-               return $this->mconf['blankStrEqFalse'] ? strcmp($in,'') : intval($in);
+               return $this->mconf['blankStrEqFalse'] ? strcmp($in, '') : intval($in);
        }
 
        /**
@@ -274,7 +274,7 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                        $DoTop[]='GLV_menuOn["'.$this->WMid.'"].top =  ('.$relCode['Y'].intval($this->mconf['topOffset']).$dirU.')+"px";';
                } else {
                                // X position (y is fixed)
-                       if (!strcmp($this->mconf['lockPosition'],'x')) {
+                       if (!strcmp($this->mconf['lockPosition'], 'x')) {
                                $DoTop[]='GLV_menuOn["'.$this->WMid.'"].left = ('.$relCode['X'].'GLV_menuXY["'.$this->WMid.'"][id][0]-('.intval($this->mconf['xPosOffset']).')'.$dirL.')+"px";';
                                if ($this->isSetIntval($this->mconf['topOffset'])) {
                                        $DoTop[]='GLV_menuOn["'.$this->WMid.'"].top = ('.$relCode['Y'].intval($this->mconf['topOffset']).$dirU.')+"px";';
@@ -286,7 +286,7 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                                }
                        }
                                // Y position   (x is fixed)
-                       if (!strcmp($this->mconf['lockPosition'],'y')) {
+                       if (!strcmp($this->mconf['lockPosition'], 'y')) {
                                $DoTop[]='GLV_menuOn["'.$this->WMid.'"].top = ('.$relCode['Y'].'GLV_menuXY["'.$this->WMid.'"][id][1]-('.intval($this->mconf['yPosOffset']).')'.$dirU.')+"px";';
                                if ($this->isSetIntval($this->mconf['leftOffset'])) {
                                        $DoTop[]='GLV_menuOn["'.$this->WMid.'"].left = ('.$relCode['X'].intval($this->mconf['leftOffset']).$dirL.')+"px";';
@@ -300,12 +300,12 @@ GLV_restoreMenu["'.$this->WMid.'"] = "'.$this->WMactiveKey.'";
                }
 
                        // BordersWithIn:
-               $DoTop[]=$this->extCalcBorderWithin('left',$this->WMbordersWithin[0]);
-               $DoTop[]=$this->extCalcBorderWithin('top',$this->WMbordersWithin[1]);
-               $DoTop[]=$this->extCalcBorderWithin('right',$this->WMbordersWithin[2]);
-               $DoTop[]=$this->extCalcBorderWithin('bottom',$this->WMbordersWithin[3]);
-               $DoTop[]=$this->extCalcBorderWithin('left',$this->WMbordersWithin[4]);
-               $DoTop[]=$this->extCalcBorderWithin('top',$this->WMbordersWithin[5]);
+               $DoTop[]=$this->extCalcBorderWithin('left', $this->WMbordersWithin[0]);
+               $DoTop[]=$this->extCalcBorderWithin('top', $this->WMbordersWithin[1]);
+               $DoTop[]=$this->extCalcBorderWithin('right', $this->WMbordersWithin[2]);
+               $DoTop[]=$this->extCalcBorderWithin('bottom', $this->WMbordersWithin[3]);
+               $DoTop[]=$this->extCalcBorderWithin('left', $this->WMbordersWithin[4]);
+               $DoTop[]=$this->extCalcBorderWithin('top', $this->WMbordersWithin[5]);
 
 
                if ($this->mconf['freezeMouseover'] && !$this->mconf['freezeMouseover.']['alwaysKeep']) {
@@ -330,7 +330,7 @@ if (!GLV_doReset["'.$mIdStr.'"] && GLV_currentLayer["'.$mIdStr.'"]!=null)   resetS
        GL_iframer(\''.$this->WMid.'\',\'\',false);';
                        $this->divLayers['iframe'] = '<iframe id="Iframe'.$this->WMid.'" scrolling="no" frameborder="0" style="position:absolute; top:0px; left:0px; background-color:transparent; layer-background-color:transparent; display:none;"></iframe>';
                }
-               $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid']=array_merge($this->WMtempStore,$GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid']);
+               $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid']=array_merge($this->WMtempStore, $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid']);
                $GLOBALS['TSFE']->additionalHeaderData['gmenu_layer_shared']='<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath('cms').'tslib/media/scripts/jsfunc.layermenu.js"></script>';
                $GLOBALS['TSFE']->JSCode.= '
 
@@ -339,7 +339,7 @@ GLV_curLayerHeight["'.$this->WMid.'"]=0;
 GLV_curLayerX["'.$this->WMid.'"]=0;
 GLV_curLayerY["'.$this->WMid.'"]=0;
 GLV_menuOn["'.$this->WMid.'"] = null;
-GLV_gap["'.$this->WMid.'"]='.t3lib_utility_Math::forceIntegerInRange($this->mconf['hideMenuWhenNotOver'],0,600).';
+GLV_gap["'.$this->WMid.'"]='.t3lib_utility_Math::forceIntegerInRange($this->mconf['hideMenuWhenNotOver'], 0, 600).';
 GLV_currentLayer["'.$this->WMid.'"] = null;
 GLV_currentROitem["'.$this->WMid.'"] = null;
 GLV_hasBeenOver["'.$this->WMid.'"]=0;
@@ -350,9 +350,9 @@ GLV_dontHideOnMouseUp["'.$this->WMid.'"] = '.($this->mconf['dontHideOnMouseUp']?
 GLV_dontFollowMouse["'.$this->WMid.'"] = '.($this->mconf['dontFollowMouse']?1:0).';
 GLV_date = new Date();
 GLV_timeout["'.$this->WMid.'"] = GLV_date.getTime();
-GLV_timeoutRef["'.$this->WMid.'"] = '.t3lib_utility_Math::forceIntegerInRange($this->mconf['hideMenuTimer'],0,20000).';
+GLV_timeoutRef["'.$this->WMid.'"] = '.t3lib_utility_Math::forceIntegerInRange($this->mconf['hideMenuTimer'], 0, 20000).';
 GLV_menuXY["'.$this->WMid.'"] = new Array();
-'.implode(LF,$this->WMxyArray).'
+'.implode(LF, $this->WMxyArray).'
 '.$this->WMrestoreVars;
 
                if ($this->mconf['freezeMouseover']) {
@@ -361,14 +361,14 @@ GLV_menuXY["'.$this->WMid.'"] = new Array();
 function GL'.$this->WMid.'_over(mitm_id) {
        GL'.$this->WMid.'_out("");      // removes any old roll over state of an item. Needed for alwaysKeep and Opera browsers.
        switch(mitm_id) {
-'.implode(LF,$this->VMmouseoverActions).'
+'.implode(LF, $this->VMmouseoverActions).'
        }
        GLV_currentROitem["'.$this->WMid.'"]=mitm_id;
 }
 function GL'.$this->WMid.'_out(mitm_id) {
        if (!mitm_id)   mitm_id=GLV_currentROitem["'.$this->WMid.'"];
        switch(mitm_id) {
-'.implode(LF,$this->VMmouseoutActions).'
+'.implode(LF, $this->VMmouseoutActions).'
        }
 }
 ';
@@ -376,7 +376,7 @@ function GL'.$this->WMid.'_out(mitm_id) {
                $GLOBALS["TSFE"]->JSCode.= '
 function GL'.$this->WMid.'_getMouse(e) {
        if (GLV_menuOn["'.$this->WMid.'"]!=null && !GLV_dontFollowMouse["'.$this->WMid.'"]){
-'.implode(LF,$GLV_menuOn).'
+'.implode(LF, $GLV_menuOn).'
        }
        GL_mouseMoveEvaluate("'.$this->WMid.'");
 }
@@ -384,7 +384,7 @@ function GL'.$this->WMid.'_hideCode() {
 '.$this->WMhideCode.'
 }
 function GL'.$this->WMid.'_doTop(WMid,id) {
-'.trim(implode(LF,$DoTop)).'
+'.trim(implode(LF, $DoTop)).'
 }
 function GL'.$this->WMid.'_restoreMenu() {
 '.$this->WMrestoreScript.'
@@ -407,7 +407,7 @@ GLV_timeout_count++;
                $GLOBALS['TSFE']->JSeventFuncCalls['onmousemove'][$this->WMid]= 'try{GL'.$this->WMid.'_getMouse(e);}catch(ex){};';
                $GLOBALS['TSFE']->JSeventFuncCalls['onmouseup'][$this->WMid]= 'GL_mouseUp(\''.$this->WMid.'\',e);';
 
-               $GLOBALS['TSFE']->divSection.=implode($this->divLayers,LF).LF;
+               $GLOBALS['TSFE']->divSection.=implode($this->divLayers, LF).LF;
 
                return parent::extProc_finish();
        }
@@ -420,7 +420,7 @@ GLV_timeout_count++;
         * @return      string          JavaScript string for correction of the layer position (if $integer is TRUE)
         * @see extProc_finish(), extProc_init()
         */
-       function extCalcBorderWithin($kind,$integer) {
+       function extCalcBorderWithin($kind, $integer) {
                if ($integer) {
                        switch($kind) {
                                case 'right':
index afaf345..a210706 100644 (file)
@@ -131,7 +131,7 @@ class SC_tslib_showpic {
                $img->mayScaleUp = 0;
                $img->init();
                if ($this->sample)      {$img->scalecmd = '-sample';}
-               if ($this->alternativeTempPath && t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['FE']['allowedTempPaths'],$this->alternativeTempPath)) {
+               if ($this->alternativeTempPath && t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['FE']['allowedTempPaths'], $this->alternativeTempPath)) {
                        $img->tempPath = $this->alternativeTempPath;
                }
 
@@ -144,12 +144,12 @@ class SC_tslib_showpic {
                        $max = '';
                }
 
-               $this->height = t3lib_utility_Math::forceIntegerInRange($this->height,0);
-               $this->width = t3lib_utility_Math::forceIntegerInRange($this->width,0);
+               $this->height = t3lib_utility_Math::forceIntegerInRange($this->height, 0);
+               $this->width = t3lib_utility_Math::forceIntegerInRange($this->width, 0);
                if ($this->frame) {
                        $this->frame = intval($this->frame);
                }
-               $imgInfo = $img->imageMagickConvert($this->file,'web',$this->width.$max,$this->height,$img->IMparams($this->effects),$this->frame,'');
+               $imgInfo = $img->imageMagickConvert($this->file, 'web', $this->width.$max, $this->height, $img->IMparams($this->effects), $this->frame, '');
 
                        // Create HTML output:
                $this->content='';
@@ -164,7 +164,7 @@ class SC_tslib_showpic {
                '.($this->bodyTag ? $this->bodyTag : '<body>');
 
                if (is_array($imgInfo)) {
-                       $wrapParts = explode('|',$this->wrap);
+                       $wrapParts = explode('|', $this->wrap);
                        $this->content.=trim($wrapParts[0]).$img->imgTag($imgInfo).trim($wrapParts[1]);
                }
                $this->content.='
index 9b98112..6f3fbb1 100644 (file)
@@ -97,9 +97,9 @@ class tx_cms_webinfo_page extends t3lib_extobjbase {
                        // PAGES:
                $this->pObj->MOD_SETTINGS['pages_levels']=$this->pObj->MOD_SETTINGS['depth'];           // ONLY for the sake of dblist module which uses this value.
 
-               $h_func = t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[depth]',$this->pObj->MOD_SETTINGS['depth'],$this->pObj->MOD_MENU['depth'],'index.php');
+               $h_func = t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
                if ($this->pObj->MOD_SETTINGS['function']=='tx_cms_webinfo_hits') {
-                       $h_func.= t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[stat_type]',$this->pObj->MOD_SETTINGS['stat_type'],$this->pObj->MOD_MENU['stat_type'],'index.php');
+                       $h_func.= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[stat_type]', $this->pObj->MOD_SETTINGS['stat_type'], $this->pObj->MOD_MENU['stat_type'], 'index.php');
 
                        if ($this->pObj->MOD_SETTINGS['stat_type']==1)  $dblist->stat_select_field='rl0';
                        if ($this->pObj->MOD_SETTINGS['stat_type']==2)  $dblist->stat_select_field='rl1';
@@ -108,12 +108,12 @@ class tx_cms_webinfo_page extends t3lib_extobjbase {
                        for ($a=0;$a<30;$a++) {
                                $dblist->stat_codes[]='HITS_days:'.(-$a);
                        }
-                       $timespan_b = mktime (0,0,0);
-                       $timespan_e = mktime (0,0,0)-(30-1)*3600*24+1;
-                       $header='<br />'.sprintf($LANG->getLL('stat_period'),t3lib_BEfunc::date($timespan_b),t3lib_BEfunc::date($timespan_e)).'<br />';
+                       $timespan_b = mktime (0, 0, 0);
+                       $timespan_e = mktime (0, 0, 0)-(30-1)*3600*24+1;
+                       $header='<br />'.sprintf($LANG->getLL('stat_period'), t3lib_BEfunc::date($timespan_b), t3lib_BEfunc::date($timespan_e)).'<br />';
 
                                //
-                       $dblist->start($this->pObj->id,'pages',0);
+                       $dblist->start($this->pObj->id, 'pages', 0);
                        $dblist->pages_noEditColumns=1;
                        $dblist->generateList();
 
@@ -128,8 +128,8 @@ class tx_cms_webinfo_page extends t3lib_extobjbase {
                                1
                        );
                } else {
-                       $h_func.= t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[pages]',$this->pObj->MOD_SETTINGS['pages'],$this->pObj->MOD_MENU['pages'],'index.php');
-                       $dblist->start($this->pObj->id,'pages',0);
+                       $h_func.= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[pages]', $this->pObj->MOD_SETTINGS['pages'], $this->pObj->MOD_MENU['pages'], 'index.php');
+                       $dblist->start($this->pObj->id, 'pages', 0);
                        $dblist->generateList();
 
                                // CSH
@@ -144,7 +144,7 @@ class tx_cms_webinfo_page extends t3lib_extobjbase {
 
                                // SYS_NOTES:
                        if (t3lib_extMgm::isLoaded('sys_note')) {
-                               $dblist->start($this->pObj->id,'sys_note',0);
+                               $dblist->start($this->pObj->id, 'sys_note', 0);
                                $dblist->generateList();
                                if ($dblist->HTMLcode) {
                                        $theOutput.=$this->pObj->doc->spacer(10);
@@ -159,7 +159,7 @@ class tx_cms_webinfo_page extends t3lib_extobjbase {
                                // PAGE INFORMATION
                        if ($this->pObj->pageinfo['uid']) {
                                $theOutput.=$this->pObj->doc->spacer(10);
-                               $theOutput.=$this->pObj->doc->section($LANG->getLL('pageInformation'),$dblist->getPageInfoBox($this->pObj->pageinfo,$this->pObj->CALC_PERMS&2),0,1);
+                               $theOutput.=$this->pObj->doc->section($LANG->getLL('pageInformation'), $dblist->getPageInfoBox($this->pObj->pageinfo, $this->pObj->CALC_PERMS&2), 0, 1);
                        }
                }
 
index a90934f..f604134 100644 (file)
@@ -80,8 +80,8 @@ class tx_cms_webinfo_lang extends t3lib_extobjbase {
 
                if ($this->pObj->id) {
                                // Depth selector:
-                       $h_func = t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[depth]',$this->pObj->MOD_SETTINGS['depth'],$this->pObj->MOD_MENU['depth'],'index.php');
-                       $h_func.= t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[lang]',$this->pObj->MOD_SETTINGS['lang'],$this->pObj->MOD_MENU['lang'],'index.php');
+                       $h_func = t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
+                       $h_func.= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[lang]', $this->pObj->MOD_SETTINGS['lang'], $this->pObj->MOD_MENU['lang'], 'index.php');
                        $theOutput.= $h_func;
 
                                // Add CSH:
@@ -141,14 +141,14 @@ class tx_cms_webinfo_lang extends t3lib_extobjbase {
                                // Page icons / titles etc.
                        $tCells[] = '<td'.($data['row']['_CSSCLASS'] ? ' class="'.$data['row']['_CSSCLASS'].'"' : '').'>'.
                                                        $data['HTML'].
-                                                       htmlspecialchars(t3lib_div::fixed_lgd_cs($data['row']['title'],$titleLen)).
-                                                       (strcmp($data['row']['nav_title'],'') ? ' [Nav: <em>'.htmlspecialchars(t3lib_div::fixed_lgd_cs($data['row']['nav_title'],$titleLen)).'</em>]' : '').
+                                                       htmlspecialchars(t3lib_div::fixed_lgd_cs($data['row']['title'], $titleLen)).
+                                                       (strcmp($data['row']['nav_title'], '') ? ' [Nav: <em>'.htmlspecialchars(t3lib_div::fixed_lgd_cs($data['row']['nav_title'], $titleLen)).'</em>]' : '').
                                                        '</td>';
 
                                // DEFAULT language:
                                // "View page" link is created:
                        $viewPageLink= '<a href="#" onclick="'.
-                                       htmlspecialchars(t3lib_BEfunc::viewOnClick($data['row']['uid'],$GLOBALS['BACK_PATH'],'','','','&L=###LANG_UID###')).'" title="' . $LANG->getLL('lang_renderl10n_viewPage', TRUE) . '">' .
+                                       htmlspecialchars(t3lib_BEfunc::viewOnClick($data['row']['uid'], $GLOBALS['BACK_PATH'], '', '', '', '&L=###LANG_UID###')).'" title="' . $LANG->getLL('lang_renderl10n_viewPage', TRUE) . '">' .
                                                t3lib_iconWorks::getSpriteIcon('actions-document-view') .
                                        '</a>';
                        $status = $data['row']['l18n_cfg']&1 ? 'c-blocked' : 'c-ok';
@@ -157,21 +157,21 @@ class tx_cms_webinfo_lang extends t3lib_extobjbase {
                        $info = '';
                        $editUid = $data['row']['uid'];
                        $params = '&edit[pages]['.$editUid.']=edit';
-                       $info.= '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$GLOBALS['BACK_PATH'])).'" title="' . $LANG->getLL('lang_renderl10n_editDefaultLanguagePage', TRUE) . '">'.
+                       $info.= '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'])).'" title="' . $LANG->getLL('lang_renderl10n_editDefaultLanguagePage', TRUE) . '">'.
                                                t3lib_iconWorks::getSpriteIcon('actions-document-open') .
                                        '</a>';
                        $info.= '<a href="#" onclick="'.htmlspecialchars('top.loadEditId('.intval($data['row']['uid']).',"&SET[language]=0"); return false;').'" title="' . $LANG->getLL('lang_renderl10n_editPage', TRUE) . '">' .