[BUGFIX] Reduce spacing CGL violations in /typo3/
authorRoland Waldner <most.wanted@gmx.at>
Sat, 19 May 2012 20:57:26 +0000 (22:57 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 19 May 2012 21:21:29 +0000 (23:21 +0200)
There were a lot spacing CGL violations in /typo3/.
These will be reduced by this commit.

As there are really a lot of violations this fixes
these, which are NOT in /typo3/sysext/.

Change-Id: I71184548d54880905407ab6a80ac3feeee1123ee
Resolves: #37308
Releases: 6.0
Reviewed-on: http://review.typo3.org/11309
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
40 files changed:
typo3/alt_db_navframe.php
typo3/alt_doc.php
typo3/alt_doc_nodoc.php
typo3/alt_file_navframe.php
typo3/alt_shortcut.php
typo3/backend.php
typo3/browse_links.php
typo3/browser.php
typo3/class.browse_links.php
typo3/class.db_list.inc
typo3/class.db_list_extra.inc
typo3/class.file_list.inc
typo3/class.show_rechis.inc
typo3/class.webpagetree.php
typo3/classes/class.modulemenu.php
typo3/classes/class.shortcutmenu.php
typo3/classes/class.typo3logo.php
typo3/contrib/flowplayer/src/actionscript/org/flowplayer/view/ClipResizer.as
typo3/db_new.php
typo3/file_edit.php
typo3/file_newfolder.php
typo3/index.php
typo3/js/backend.js
typo3/js/clickmenu.js
typo3/jsfunc.tbe_editor.js
typo3/move_el.php
typo3/show_item.php
typo3/show_rechis.php
typo3/tab.js
typo3/tce_db.php
typo3/template.php
typo3/view_help.php
typo3/wizard_add.php
typo3/wizard_colorpicker.php
typo3/wizard_edit.php
typo3/wizard_forms.php
typo3/wizard_list.php
typo3/wizard_rte.php
typo3/wizard_table.php
typo3/wizard_tsconfig.php

index b55cf63..7725d43 100644 (file)
@@ -187,7 +187,7 @@ class SC_alt_db_navframe {
 
 
                        // Outputting Temporary DB mount notice:
-               if ($this->active_tempMountPoint)       {
+               if ($this->active_tempMountPoint) {
                        $flashText = '
                                <a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('setTempDBmount' => 0))) . '">' .
                                $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_core.xml:labels.temporaryDBmount', 1) .
@@ -329,7 +329,7 @@ class SC_alt_db_navframe {
        function initializeTemporaryDBmount(){
 
                        // Set/Cancel Temporary DB Mount:
-               if (strlen($this->setTempDBmount))      {
+               if (strlen($this->setTempDBmount)) {
                        $set = t3lib_utility_Math::forceIntegerInRange($this->setTempDBmount,0);
                        if ($set > 0 && $GLOBALS['BE_USER']->isInWebMount($set)){
                                        // Setting...:
@@ -361,7 +361,7 @@ class SC_alt_db_navframe {
         * @param       integer         The page id to set as DB mount
         * @return      void
         */
-       function settingTemporaryMountPoint($pageId)    {
+       function settingTemporaryMountPoint($pageId) {
                $GLOBALS['BE_USER']->setAndSaveSessionData('pageTree_temporaryMountPoint',intval($pageId));
        }
 
index 22ab2ca..e24fdd2 100644 (file)
@@ -140,7 +140,7 @@ class SC_alt_doc {
         * @return      void
         */
        function preInit() {
-               if (t3lib_div::_GP('justLocalized'))    {
+               if (t3lib_div::_GP('justLocalized')) {
                        $this->localizationRedirect(t3lib_div::_GP('justLocalized'));
                }
 
@@ -158,7 +158,7 @@ class SC_alt_doc {
 
 
                        // Setting override values as default if defVals does not exist.
-               if (!is_array($this->defVals) && is_array($this->overrideVals)) {
+               if (!is_array($this->defVals) && is_array($this->overrideVals)) {
                        $this->defVals = $this->overrideVals;
                }
 
@@ -185,7 +185,7 @@ class SC_alt_doc {
                $this->docHandler = $this->docDat[0];
 
                        // If a request for closing the document has been sent, act accordingly:
-               if ($this->closeDoc>0)  {
+               if ($this->closeDoc>0) {
                        $this->closeDocument($this->closeDoc);
                }
 
@@ -228,17 +228,17 @@ class SC_alt_doc {
                $tce = t3lib_div::makeInstance('t3lib_TCEmain');
                $tce->stripslashes_values=0;
 
-               if (isset($_POST['_translation_savedok_x']))    {
+               if (isset($_POST['_translation_savedok_x'])) {
                        $tce->updateModeL10NdiffData = 'FORCE_FFUPD';
                }
-               if (isset($_POST['_translation_savedokclear_x']))       {
+               if (isset($_POST['_translation_savedokclear_x'])) {
                        $tce->updateModeL10NdiffData = 'FORCE_FFUPD';
                        $tce->updateModeL10NdiffDataClear = TRUE;
                }
 
                        // Setting default values specific for the user:
                $TCAdefaultOverride = $GLOBALS['BE_USER']->getTSConfigProp('TCAdefaults');
-               if (is_array($TCAdefaultOverride))      {
+               if (is_array($TCAdefaultOverride)) {
                        $tce->setDefaultsFromUserTS($TCAdefaultOverride);
                }
 
@@ -251,7 +251,7 @@ class SC_alt_doc {
 
                        // Loading TCEmain with data:
                $tce->start($this->data,$this->cmd);
-               if (is_array($this->mirror))    {
+               if (is_array($this->mirror)) {
                        $tce->setMirror($this->mirror);
                }
 
@@ -275,7 +275,7 @@ class SC_alt_doc {
                        $tce->process_cmdmap();
 
                                // If there was saved any new items, load them:
-                       if (count($tce->substNEWwithIDs_table)) {
+                       if (count($tce->substNEWwithIDs_table)) {
                                        // save the expanded/collapsed states for new inline records, if any
                                t3lib_TCEforms_inline::updateInlineView($this->uc, $tce);
 
@@ -289,14 +289,14 @@ class SC_alt_doc {
                                                                // check if the $editId isn't a child record of an IRRE action
                                                        if (!(is_array($tce->newRelatedIDs[$tableName]) && in_array($editId, $tce->newRelatedIDs[$tableName]))) {
                                                                        // translate new id to the workspace version:
-                                                               if ($versionRec = t3lib_BEfunc::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, $tableName, $editId,'uid')) {
+                                                               if ($versionRec = t3lib_BEfunc::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, $tableName, $editId,'uid')) {
                                                                        $editId = $versionRec['uid'];
                                                                }
                                                                $newEditConf[$tableName][$editId] = 'edit';
                                                        }
 
                                                                // Traverse all new records and forge the content of ->editconf so we can continue to EDIT these records!
-                                                       if ($tableName=='pages' && $this->retUrl!='dummy.php' && $this->returnNewPageId)        {
+                                                       if ($tableName=='pages' && $this->retUrl!='dummy.php' && $this->returnNewPageId) {
                                                                $this->retUrl.='&id='.$tce->substNEWwithIDs[$key];
                                                        }
                                                }
@@ -321,12 +321,12 @@ class SC_alt_doc {
                        }
 
                                // See if any records was auto-created as new versions?
-                       if (count($tce->autoVersionIdMap))      {
+                       if (count($tce->autoVersionIdMap)) {
                                $this->fixWSversioningInEditConf($tce->autoVersionIdMap);
                        }
 
                                // If a document is saved and a new one is created right after.
-                       if (isset($_POST['_savedoknew_x']) && is_array($this->editconf))        {
+                       if (isset($_POST['_savedoknew_x']) && is_array($this->editconf)) {
 
                                        // Finding the current table:
                                reset($this->editconf);
@@ -339,7 +339,7 @@ class SC_alt_doc {
 
                                        // Setting a blank editconf array for a new record:
                                $this->editconf=array();
-                               if ($this->getNewIconMode($nTable)=='top')      {
+                               if ($this->getNewIconMode($nTable)=='top') {
                                        $this->editconf[$nTable][$nRec['pid']]='new';
                                } else {
                                        $this->editconf[$nTable][-$nRec['uid']]='new';
@@ -408,7 +408,7 @@ class SC_alt_doc {
                $this->doc->getPageRenderer()->loadPrototype();
                $this->doc->JScode = $this->doc->wrapScriptTags('
                        function jumpToUrl(URL,formEl)  {       //
-                               if (!TBE_EDITOR.isFormChanged())        {
+                               if (!TBE_EDITOR.isFormChanged()) {
                                        window.location.href = URL;
                                } else if (formEl && formEl.type=="checkbox") {
                                        formEl.checked = formEl.checked ? 0 : 1;
@@ -430,7 +430,7 @@ class SC_alt_doc {
                                var backPath= bP ? bP : "";
                                var thePreviewWindow="";
                                thePreviewWindow = window.open(backPath+"show_item.php?table="+encodeURIComponent(table)+"&uid="+encodeURIComponent(uid),"ShowItem"+TS.uniqueID,"height=300,width=410,status=0,menubar=0,resizable=0,location=0,directories=0,scrollbars=1,toolbar=0");
-                               if (thePreviewWindow && thePreviewWindow.focus) {
+                               if (thePreviewWindow && thePreviewWindow.focus) {
                                        thePreviewWindow.focus();
                                }
                        }
@@ -464,7 +464,7 @@ class SC_alt_doc {
        function main() {
 
                        // Begin edit:
-               if (is_array($this->editconf))  {
+               if (is_array($this->editconf)) {
 
                                // Initialize TCEforms (rendering the forms)
                        $this->tceforms = t3lib_div::makeInstance('t3lib_TCEforms');
@@ -484,7 +484,7 @@ class SC_alt_doc {
                                // Setting external variables:
                        $this->tceforms->edit_showFieldHelp = $GLOBALS['BE_USER']->uc['edit_showFieldHelp'];
 
-                       if ($this->editRegularContentFromId)    {
+                       if ($this->editRegularContentFromId) {
                                $this->editRegularContentFromId();
                        }
 
@@ -492,7 +492,7 @@ class SC_alt_doc {
                                // Creating the editing form, wrap it with buttons, document selector etc.
                        $editForm = $this->makeEditForm();
 
-                       if ($editForm)  {
+                       if ($editForm) {
                                $this->firstEl = reset($this->elementsData);
 
                                        // Checking if the currently open document is stored in the list of "open documents" - if not, then add it:
@@ -589,14 +589,14 @@ class SC_alt_doc {
                        if (is_array($conf) && $GLOBALS['TCA'][$table] && $GLOBALS['BE_USER']->check('tables_modify',$table)) {
 
                                        // Traverse the keys/comments of each table (keys can be a commalist of uids)
-                               foreach($conf as $cKey => $cmd) {
-                                       if ($cmd=='edit' || $cmd=='new')        {
+                               foreach($conf as $cKey => $cmd) {
+                                       if ($cmd=='edit' || $cmd=='new') {
 
                                                        // Get the ids:
                                                $ids = t3lib_div::trimExplode(',',$cKey,1);
 
                                                        // Traverse the ids:
-                                               foreach($ids as $theUid)        {
+                                               foreach($ids as $theUid) {
 
                                                                // Checking if the user has permissions? (Only working as a precaution, because the final permission check is always down in TCE. But it's good to notify the user on beforehand...)
                                                                // First, resetting flags.
@@ -606,7 +606,7 @@ class SC_alt_doc {
                                                        $this->viewId = 0;
 
                                                                // If the command is to create a NEW record...:
-                                                       if ($cmd=='new')        {
+                                                       if ($cmd=='new') {
                                                                if (intval($theUid))    {               // NOTICE: the id values in this case points to the page uid onto which the record should be create OR (if the id is negativ) to a record from the same table AFTER which to create the record.
 
                                                                                // Find parent page on which the new record reside
@@ -618,7 +618,7 @@ class SC_alt_doc {
                                                                        }
 
                                                                                // Now, calculate whether the user has access to creating new records on this position:
-                                                                       if (is_array($calcPRec))        {
+                                                                       if (is_array($calcPRec)) {
                                                                                        // Permissions for the parent page
                                                                                $CALC_PERMS = $GLOBALS['BE_USER']->calcPerms($calcPRec);
                                                                                if ($table=='pages')    {       // If pages:
@@ -635,7 +635,7 @@ class SC_alt_doc {
                                                        } else {        // Edit:
                                                                $calcPRec = t3lib_BEfunc::getRecord($table,$theUid);
                                                                t3lib_BEfunc::fixVersioningPid($table,$calcPRec);
-                                                               if (is_array($calcPRec))        {
+                                                               if (is_array($calcPRec)) {
                                                                        if ($table=='pages')    {       // If pages:
                                                                                $CALC_PERMS = $GLOBALS['BE_USER']->calcPerms($calcPRec);
                                                                                $hasAccess = $CALC_PERMS&2 ? 1 : 0;
@@ -655,15 +655,15 @@ class SC_alt_doc {
                                                                        }
 
                                                                                // Check internals regarding access:
-                                                                       if ($hasAccess) {
+                                                                       if ($hasAccess) {
                                                                                $hasAccess = $GLOBALS['BE_USER']->recordEditAccessInternals($table, $calcPRec);
                                                                                $deniedAccessReason = $GLOBALS['BE_USER']->errorMsg;
                                                                        }
                                                                } else $hasAccess = 0;
                                                        }
 
-                                                       if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck']))       {
-                                                               foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck'] as $_funcRef)       {
+                                                       if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck'])) {
+                                                               foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck'] as $_funcRef) {
                                                                        $_params = array(
                                                                                'table'         =>      $table,
                                                                                'uid'           =>      $theUid,
@@ -676,7 +676,7 @@ class SC_alt_doc {
 
                                                        // AT THIS POINT we have checked the access status of the editing/creation of records and we can now proceed with creating the form elements:
 
-                                                       if ($hasAccess) {
+                                                       if ($hasAccess) {
                                                                $prevPageID = is_object($trData)?$trData->prevPageID:'';
                                                                $trData = t3lib_div::makeInstance('t3lib_transferData');
                                                                $trData->addRawData = TRUE;
@@ -687,7 +687,7 @@ class SC_alt_doc {
                                                                $trData->fetchRecord($table,$theUid,$cmd=='new'?'new':'');      // 'new'
                                                                $rec = reset($trData->regTableItems_data);
                                                                $rec['uid'] = $cmd=='new' ? uniqid('NEW') : $theUid;
-                                                               if ($cmd=='new')        {
+                                                               if ($cmd=='new') {
                                                                        $rec['pid'] = $theUid=='prev'?$thePrevUid:$theUid;
                                                                }
                                                                $this->elementsData[]=array(
@@ -699,18 +699,18 @@ class SC_alt_doc {
                                                                );
 
                                                                        // Now, render the form:
-                                                               if (is_array($rec))     {
+                                                               if (is_array($rec)) {
 
                                                                                // Setting visual path / title of form:
                                                                        $this->generalPathOfForm = $this->tceforms->getRecordPath($table,$rec);
-                                                                       if (!$this->storeTitle) {
+                                                                       if (!$this->storeTitle) {
                                                                                $this->storeTitle = $this->recTitle ? htmlspecialchars($this->recTitle) : t3lib_BEfunc::getRecordTitle($table,$rec,TRUE);
                                                                        }
 
                                                                                // Setting variables in TCEforms object:
                                                                        $this->tceforms->hiddenFieldList = '';
                                                                        $this->tceforms->globalShowHelp = $this->disHelp ? 0 : 1;
-                                                                       if (is_array($this->overrideVals[$table]))      {
+                                                                       if (is_array($this->overrideVals[$table])) {
                                                                                $this->tceforms->hiddenFieldListArr = array_keys($this->overrideVals[$table]);
                                                                        }
 
@@ -719,7 +719,7 @@ class SC_alt_doc {
 
                                                                                // Create form for the record (either specific list of fields or the whole record):
                                                                        $panel = '';
-                                                                       if ($this->columnsOnly) {
+                                                                       if ($this->columnsOnly) {
                                                                                if(is_array($this->columnsOnly)){
                                                                                        $panel.= $this->tceforms->getListedFields($table,$rec,$this->columnsOnly[$table]);
                                                                                } else {
@@ -731,7 +731,7 @@ class SC_alt_doc {
                                                                        $panel = $this->tceforms->wrapTotal($panel,$rec,$table);
 
                                                                                // Setting the pid value for new records:
-                                                                       if ($cmd=='new')        {
+                                                                       if ($cmd=='new') {
                                                                                $panel.= '<input type="hidden" name="data['.$table.']['.$rec['uid'].'][pid]" value="'.$rec['pid'].'" />';
                                                                                $this->newC++;
                                                                        }
@@ -808,7 +808,7 @@ class SC_alt_doc {
                        $buttons['save_close'] = t3lib_iconWorks::getSpriteIcon('actions-document-save-close', array('html'=>'<input type="image" class="c-inputButton" name="_saveandclosedok" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc', 1) . '" />'));
 
                                // FINISH TRANSLATION / SAVE / CLOSE
-                       if ($GLOBALS['TYPO3_CONF_VARS']['BE']['explicitConfirmationOfTranslation'])     {
+                       if ($GLOBALS['TYPO3_CONF_VARS']['BE']['explicitConfirmationOfTranslation']) {
                                $buttons['translation_save'] = '<input type="image" class="c-inputButton" name="_translation_savedok" src="' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/translationsavedok.gif', '', 1) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.translationSaveDoc', 1) . '" />';
                                $buttons['translation_saveclear'] = '<input type="image" class="c-inputButton" name="_translation_savedokclear" src="' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/translationsavedok_clear.gif', '', 1) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.translationSaveDocClear', 1) . '" />';
                        }
@@ -821,8 +821,8 @@ class SC_alt_doc {
 
 
                        // DELETE + UNDO buttons:
-               if (!$this->errorC && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly'] && count($this->elementsData)==1)   {
-                       if ($this->firstEl['cmd']!='new' && t3lib_utility_Math::canBeInterpretedAsInteger($this->firstEl['uid']))       {
+               if (!$this->errorC && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly'] && count($this->elementsData)==1) {
+                       if ($this->firstEl['cmd']!='new' && t3lib_utility_Math::canBeInterpretedAsInteger($this->firstEl['uid'])) {
 
                                        // Delete:
                                if ($this->firstEl['deleteAccess'] && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly'] && !$this->getNewIconMode($this->firstEl['table'],'disableDelete')) {
@@ -834,14 +834,14 @@ class SC_alt_doc {
 
                                        // Undo:
                                $undoRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tstamp', 'sys_history', 'tablename='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->firstEl['table'], 'sys_history').' AND recuid='.intval($this->firstEl['uid']), '', 'tstamp DESC', '1');
-                               if ($undoButtonR = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($undoRes))     {
+                               if ($undoButtonR = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($undoRes)) {
                                        $aOnClick = 'window.location.href=\'show_rechis.php?element='.rawurlencode($this->firstEl['table'].':'.$this->firstEl['uid']).'&revert=ALL_FIELDS&sumUp=-1&returnUrl='.rawurlencode($this->R_URI).'\'; return false;';
                                        $buttons['undo'] = '<a href="#" onclick="'.htmlspecialchars($aOnClick).'"'.
                                                ' title="' . htmlspecialchars(sprintf($GLOBALS['LANG']->getLL('undoLastChange'), t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp'], $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))) . '">' .
                                                        t3lib_iconWorks::getSpriteIcon('actions-edit-undo') .
                                                '</a>';
                                }
-                               if ($this->getNewIconMode($this->firstEl['table'],'showHistory'))       {
+                               if ($this->getNewIconMode($this->firstEl['table'],'showHistory')) {
                                        $aOnClick = 'window.location.href=\'show_rechis.php?element='.rawurlencode($this->firstEl['table'].':'.$this->firstEl['uid']).'&returnUrl='.rawurlencode($this->R_URI).'\'; return false;';
                                        $buttons['history'] = '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
                                                        t3lib_iconWorks::getSpriteIcon('actions-document-history-open') .
@@ -849,7 +849,7 @@ class SC_alt_doc {
                                }
 
                                        // If only SOME fields are shown in the form, this will link the user to the FULL form:
-                               if ($this->columnsOnly) {
+                               if ($this->columnsOnly) {
                                        $buttons['columns_only'] = '<a href="'.htmlspecialchars($this->R_URI.'&columnsOnly=').'" title="' . $GLOBALS['LANG']->getLL('editWholeRecord', TRUE) . '">' .
                                                        t3lib_iconWorks::getSpriteIcon('actions-document-open') .
                                                '</a>';
@@ -901,7 +901,7 @@ class SC_alt_doc {
         * @param       string          HTML form.
         * @return      string          Composite HTML
         */
-       function compileForm($editForm) {
+       function compileForm($editForm) {
                $formContent = '
                        <!-- EDITING FORM -->
                        '.$editForm.'
@@ -909,7 +909,7 @@ class SC_alt_doc {
                        <input type="hidden" name="returnUrl" value="'.htmlspecialchars($this->retUrl).'" />
                        <input type="hidden" name="viewUrl" value="'.htmlspecialchars($this->viewUrl).'" />';
 
-               if ($this->returnNewPageId)     {
+               if ($this->returnNewPageId) {
                        $formContent .= '<input type="hidden" name="returnNewPageId" value="1" />';
                }
                $formContent .= '<input type="hidden" name="popViewId" value="'.htmlspecialchars($this->viewId).'" />';
@@ -987,7 +987,7 @@ class SC_alt_doc {
         * @return      void
         */
        function tceformMessages() {
-               if (count($this->tceforms->commentMessages))    {
+               if (count($this->tceforms->commentMessages)) {
                        $tceformMessages = '
                                <!-- TCEFORM messages
                                '.htmlspecialchars(implode(LF,$this->tceforms->commentMessages)).'
@@ -1127,10 +1127,10 @@ class SC_alt_doc {
         * @param       string          String passed by GET &justLocalized=
         * @return      void
         */
-       function localizationRedirect($justLocalized)   {
+       function localizationRedirect($justLocalized) {
                list($table,$orig_uid,$language) = explode(':',$justLocalized);
 
-               if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'])    {
+               if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']) {
                        $localizedRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
                                        'uid',
                                        $table,
@@ -1140,7 +1140,7 @@ class SC_alt_doc {
                                                t3lib_BEfunc::versioningPlaceholderClause($table)
                                );
 
-                       if (is_array($localizedRecord)) {
+                       if (is_array($localizedRecord)) {
                                        // Create parameters and finally run the classic page module for creating a new page translation
                                $params = '&edit['.$table.']['.$localizedRecord['uid'].']=edit';
                                $returnUrl = '&returnUrl='.rawurlencode(t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl')));
@@ -1158,7 +1158,7 @@ class SC_alt_doc {
         * @param       integer         Page id: If zero, the query will select all sys_language records from root level which are NOT hidden. If set to another value, the query will select all sys_language records that has a pages_language_overlay record on that page (and is not hidden, unless you are admin user)
         * @return      array           Language records including faked record for default language
         */
-       function getLanguages($id)      {
+       function getLanguages($id) {
                $modSharedTSconfig = t3lib_BEfunc::getModTSconfig($id, 'mod.SHARED');
 
                        // fallback non sprite-configuration
@@ -1177,7 +1177,7 @@ class SC_alt_doc {
                );
 
                $exQ = $GLOBALS['BE_USER']->isAdmin() ? '' : ' AND sys_language.hidden=0';
-               if ($id)        {
+               if ($id) {
                        $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                                                        'sys_language.*',
                                                        'pages_language_overlay,sys_language',
@@ -1223,27 +1223,27 @@ class SC_alt_doc {
         * @param       array           Mapping between old and new ids if auto-versioning has been performed.
         * @return      void
         */
-       function fixWSversioningInEditConf($mapArray=FALSE)     {
+       function fixWSversioningInEditConf($mapArray=FALSE) {
 
                        // Traverse the editConf array
-               if (is_array($this->editconf))  {
+               if (is_array($this->editconf)) {
                        foreach($this->editconf as $table => $conf)     {       // Tables:
-                               if (is_array($conf) && $GLOBALS['TCA'][$table]) {
+                               if (is_array($conf) && $GLOBALS['TCA'][$table]) {
 
                                                // Traverse the keys/comments of each table (keys can be a commalist of uids)
                                        $newConf = array();
-                                       foreach($conf as $cKey => $cmd) {
-                                               if ($cmd=='edit')       {
+                                       foreach($conf as $cKey => $cmd) {
+                                               if ($cmd=='edit') {
                                                                // Traverse the ids:
                                                        $ids = t3lib_div::trimExplode(',', $cKey, 1);
-                                                       foreach($ids as $idKey => $theUid)      {
-                                                               if (is_array($mapArray))        {
-                                                                       if ($mapArray[$table][$theUid]) {
+                                                       foreach($ids as $idKey => $theUid) {
+                                                               if (is_array($mapArray)) {
+                                                                       if ($mapArray[$table][$theUid]) {
                                                                                $ids[$idKey] = $mapArray[$table][$theUid];
                                                                        }
                                                                } else {        // Default, look for versions in workspace for record:
                                                                        $calcPRec = $this->getRecordForEdit($table,$theUid);
-                                                                       if (is_array($calcPRec))        {
+                                                                       if (is_array($calcPRec)) {
                                                                                        // Setting UID again if it had changed, eg. due to workspace versioning.
                                                                                $ids[$idKey] = $calcPRec['uid'];
                                                                        }
@@ -1271,20 +1271,20 @@ class SC_alt_doc {
         * @param       integer         Record UID
         * @return      array           Returns record to edit, FALSE if none
         */
-       function getRecordForEdit($table,$theUid)       {
+       function getRecordForEdit($table,$theUid) {
 
                        // Fetch requested record:
                $reqRecord = t3lib_BEfunc::getRecord($table,$theUid,'uid,pid');
 
-               if (is_array($reqRecord))       {
+               if (is_array($reqRecord)) {
                                // If workspace is OFFLINE:
-                       if ($GLOBALS['BE_USER']->workspace!=0)  {
+                       if ($GLOBALS['BE_USER']->workspace!=0) {
 
                                        // Check for versioning support of the table:
-                               if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
+                               if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
 
                                                // If the record is already a version of "something" pass it by.
-                                       if ($reqRecord['pid']==-1)      {
+                                       if ($reqRecord['pid']==-1) {
 
                                                        // (If it turns out not to be a version of the current workspace there will be trouble, but that is handled inside TCEmain then and in the interface it would clearly be an error of links if the user accesses such a scenario)
                                                return $reqRecord;
@@ -1305,7 +1305,7 @@ class SC_alt_doc {
         * @return      void
         */
        function editRegularContentFromId() {
-               if (t3lib_extMgm::isLoaded('cms'))      {
+               if (t3lib_extMgm::isLoaded('cms')) {
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                                                'uid',
                                                'tt_content',
@@ -1316,9 +1316,9 @@ class SC_alt_doc {
                                                '',
                                                'sorting'
                                        );
-                       if ($GLOBALS['TYPO3_DB']->sql_num_rows($res))   {
+                       if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
                                $ecUids=array();
-                               while($ecRec = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))     {
+                               while($ecRec = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                        $ecUids[]=$ecRec['uid'];
                                }
                                $this->editconf['tt_content'][implode(',',$ecUids)]='edit';
@@ -1359,7 +1359,7 @@ class SC_alt_doc {
         * @param       integer         Close code: 0/1 will redirect to $this->retUrl, 3 will clear the docHandler (thus closing all documents) and otehr values will call setDocument with ->retUrl
         * @return      void
         */
-       function closeDocument($code=0) {
+       function closeDocument($code=0) {
 
                        // If current document is found in docHandler,
                        // then unset it, possibly unset it ALL and finally, write it to the session data
@@ -1389,12 +1389,12 @@ class SC_alt_doc {
 
 
                        // If ->returnEditConf is set, then add the current content of editconf to the ->retUrl variable: (used by other scripts, like wizard_add, to know which records was created or so...)
-               if ($this->returnEditConf && $this->retUrl!='dummy.php')        {
+               if ($this->returnEditConf && $this->retUrl!='dummy.php') {
                        $this->retUrl.='&returnEditConf='.rawurlencode(serialize($this->editconf));
                }
 
                        // If code is NOT set OR set to 1, then make a header location redirect to $this->retUrl
-               if (!$code || $code==1) {
+               if (!$code || $code==1) {
                        t3lib_utility_Http::redirect($this->retUrl);
                } else {
                        $this->setDocument('',$this->retUrl);
@@ -1409,16 +1409,16 @@ class SC_alt_doc {
         * @param       string          Alternative/Default retUrl
         * @return      void
         */
-       function setDocument($currentDocFromHandlerMD5='',$retUrl='alt_doc_nodoc.php')  {
+       function setDocument($currentDocFromHandlerMD5='',$retUrl='alt_doc_nodoc.php') {
                if (!t3lib_extMgm::isLoaded('cms') && !strcmp($retUrl,'alt_doc_nodoc.php'))     return;
 
-               if (!$this->modTSconfig['properties']['disableDocSelector'] && is_array($this->docHandler) && count($this->docHandler)) {
-                       if (isset($this->docHandler[$currentDocFromHandlerMD5]))        {
+               if (!$this->modTSconfig['properties']['disableDocSelector'] && is_array($this->docHandler) && count($this->docHandler)) {
+                       if (isset($this->docHandler[$currentDocFromHandlerMD5])) {
                                $setupArr=$this->docHandler[$currentDocFromHandlerMD5];
                        } else {
                                $setupArr = reset($this->docHandler);
                        }
-                       if ($setupArr[2])       {
+                       if ($setupArr[2]) {
                                $sParts = parse_url(t3lib_div::getIndpEnv('REQUEST_URI'));
                                $retUrl = $sParts['path'].'?'.$setupArr[2].'&returnUrl='.rawurlencode($retUrl);
                        }
index cbc80ba..cbf6649 100644 (file)
@@ -135,7 +135,7 @@ class SC_alt_doc_nodoc {
 
 
                        // If either the Web>List OR Web>Page module are active, show the little message with links to those modules:
-               if ($a_wl || $a_wp)     {
+               if ($a_wl || $a_wp) {
                        $msg_2 = array();
                        if ($a_wp)      {       // Web>Page:
                                $msg_2[] = '<strong><a href="#" onclick="top.goToModule(\'' . $pageModule . '\'); return false;">' . $GLOBALS['LANG']->getLL('noDocuments_pagemodule', 1) . $img_web_layout . '</a></strong>';
index a4d2fc6..2f9e794 100644 (file)
@@ -169,7 +169,7 @@ class SC_alt_file_navframe {
                Tree.ajaxID = "SC_alt_file_navframe::expandCollapse";
 
                // Function, loading the list frame from navigation tree:
-               function jumpTo(id, linkObj, highlightID, bank) {
+               function jumpTo(id, linkObj, highlightID, bank) {
                        var theUrl = top.TS.PATH_typo3 + top.currentSubScript ;
                        if (theUrl.indexOf("?") != -1) {
                                theUrl += "&id=" + id
index 9f2cdb0..33b9e95 100644 (file)
@@ -137,20 +137,20 @@ class SC_alt_shortcut {
 
                        // Lookup the title of this page and use it as default description
                $page_id = $this->getLinkedPageId($url);
-               if (t3lib_utility_Math::canBeInterpretedAsInteger($page_id))    {
-                       if (preg_match('/\&edit\[(.*)\]\[(.*)\]=edit/',$url,$matches))  {
+               if (t3lib_utility_Math::canBeInterpretedAsInteger($page_id)) {
+                       if (preg_match('/\&edit\[(.*)\]\[(.*)\]=edit/',$url,$matches)) {
                                        // Edit record
                                $description = '';      // TODO: Set something useful
                        } else {
                                        // Page listing
                                $pageRow = t3lib_BEfunc::getRecord('pages',$page_id);
-                               if (count($pageRow))    {
+                               if (count($pageRow)) {
                                                // If $page_id is an integer, set the description to the title of that page
                                        $description = $pageRow['title'];
                                }
                        }
                } else {
-                       if (preg_match('/\/$/', $page_id))      {
+                       if (preg_match('/\/$/', $page_id)) {
                                        // If $page_id is a string and ends with a slash, assume it is a fileadmin reference and set the description to the basename of that path
                                $description = basename($page_id);
                        }
@@ -174,16 +174,16 @@ class SC_alt_shortcut {
                $addUSERWhere = (!$GLOBALS['BE_USER']->isAdmin() ? ' AND userid=' . intval($GLOBALS['BE_USER']->user['uid']) : '');
 
                        // Deleting shortcuts:
-               if (strcmp($this->deleteCategory,''))   {
-                       if (t3lib_utility_Math::canBeInterpretedAsInteger($this->deleteCategory))       {
+               if (strcmp($this->deleteCategory,'')) {
+                       if (t3lib_utility_Math::canBeInterpretedAsInteger($this->deleteCategory)) {
                                $GLOBALS['TYPO3_DB']->exec_DELETEquery('sys_be_shortcuts', 'sc_group='.intval($this->deleteCategory).$addUSERWhere);
                        }
                }
 
                        // If other changes in post-vars:
-               if (is_array($_POST))   {
+               if (is_array($_POST)) {
                                // Saving:
-                       if (isset($_POST['_savedok_x']) || isset($_POST['_saveclosedok_x']))    {
+                       if (isset($_POST['_savedok_x']) || isset($_POST['_saveclosedok_x'])) {
                                $fields_values = array(
                                        'description' => $this->editName,
                                        'sc_group' => intval($this->editGroup)
@@ -195,11 +195,11 @@ class SC_alt_shortcut {
                                $GLOBALS['TYPO3_DB']->exec_UPDATEquery('sys_be_shortcuts', 'uid='.intval($this->whichItem).$addUSERWhere, $fields_values);
                        }
                                // If save without close, keep the session going...
-                       if (isset($_POST['_savedok_x']))        {
+                       if (isset($_POST['_savedok_x'])) {
                                $this->editSC=$this->whichItem;
                        }
                                // Deleting a single shortcut ?
-                       if (isset($_POST['_deletedok_x']))      {
+                       if (isset($_POST['_deletedok_x'])) {
                                $GLOBALS['TYPO3_DB']->exec_DELETEquery('sys_be_shortcuts', 'uid='.intval($this->whichItem).$addUSERWhere);
 
                                if (!$this->editSC)     $this->editSC=-1;       // Just to have the checkbox set...
@@ -222,7 +222,7 @@ class SC_alt_shortcut {
                        function jump(url,modName,mainModName)  {       //
                                        // Clear information about which entry in nav. tree that might have been highlighted.
                                top.fsMod.navFrameHighlightedID = new Array();
-                               if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav)  {
+                               if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav) {
                                        top.content.nav_frame.refresh_nav();
                                }
 
@@ -268,8 +268,8 @@ class SC_alt_shortcut {
 
                $bookmarkGroups = $GLOBALS['BE_USER']->getTSConfigProp('options.bookmarkGroups');
                if (is_array($bookmarkGroups) && count($bookmarkGroups)) {
-                       foreach ($bookmarkGroups as $k=>$v)     {
-                               if (strcmp('',$v) && strcmp('0',$v))    {
+                       foreach ($bookmarkGroups as $k=>$v) {
+                               if (strcmp('',$v) && strcmp('0',$v)) {
                                        $this->groupLabels[$k] = (string)$v;
                                } elseif ($GLOBALS['BE_USER']->isAdmin()) {
                                        unset($this->groupLabels[$k]);
@@ -279,7 +279,7 @@ class SC_alt_shortcut {
 
                        // List of global groups that will be loaded. All global groups have negative IDs.
                $globalGroups = -100;   // Group -100 is kind of superglobal and can't be changed.
-               if (count($this->groupLabels))  {
+               if (count($this->groupLabels)) {
                        $globalGroups .= ','.implode(',',array_keys($this->groupLabels));
                        $globalGroups = str_replace(',',',-',$globalGroups);    // Ugly hack to make the UIDs negative - is there any better solution?
                }
@@ -295,21 +295,21 @@ class SC_alt_shortcut {
                $formerGr='';
 
                        // Traverse shortcuts
-               while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))       {
+               while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                        $mParts = explode('|',$row['module_name']);
                        $row['module_name']=$mParts[0];
                        $row['M_module_name']=$mParts[1];
                        $mParts = explode('_',$row['M_module_name']?$row['M_module_name']:$row['module_name']);
                        $qParts = parse_url($row['url']);
 
-                       if (!$GLOBALS['BE_USER']->isAdmin())    {
+                       if (!$GLOBALS['BE_USER']->isAdmin()) {
                                        // Check for module access
                                if (!isset($GLOBALS['LANG']->moduleLabels['tabs_images'][implode('_',$mParts).'_tab'])) {       // Nice hack to check if the user has access to this module - otherwise the translation label would not have been loaded :-)
                                        continue;
                                }
 
                                $page_id = $this->getLinkedPageId($row['url']);
-                               if (t3lib_utility_Math::canBeInterpretedAsInteger($page_id))    {
+                               if (t3lib_utility_Math::canBeInterpretedAsInteger($page_id)) {
                                                // Check for webmount access
                                        if (!$GLOBALS['BE_USER']->isInWebMount($page_id)) continue;
 
@@ -321,21 +321,21 @@ class SC_alt_shortcut {
                                }
                        }
 
-                       if ($this->editSC && $row['uid']==$this->editSC)        {
+                       if ($this->editSC && $row['uid']==$this->editSC) {
                                $this->editSC_rec=$row;
                        }
 
                        $sc_group = $row['sc_group'];
-                       if ($sc_group && strcmp($formerGr,$sc_group))   {
-                               if ($sc_group!=-100)    {
-                                       if ($this->groupLabels[abs($sc_group)] && strcmp('1',$this->groupLabels[abs($sc_group)]))       {
+                       if ($sc_group && strcmp($formerGr,$sc_group)) {
+                               if ($sc_group!=-100) {
+                                       if ($this->groupLabels[abs($sc_group)] && strcmp('1',$this->groupLabels[abs($sc_group)])) {
                                                $label = $this->groupLabels[abs($sc_group)];
                                        } else {
                                                $label = $GLOBALS['LANG']->getLL('shortcut_group_'.abs($sc_group),1);
                                                if (!$label)    $label = $GLOBALS['LANG']->getLL('shortcut_group',1).' '.abs($sc_group);        // Fallback label
                                        }
 
-                                       if ($sc_group>=0)       {
+                                       if ($sc_group>=0) {
                                                $onC = 'if (confirm('.$GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL('bookmark_delAllInCat')).')){window.location.href=\'alt_shortcut.php?deleteCategory='.$sc_group.'\';}return false;';
                                                $this->linesPre[]='<td>&nbsp;</td><td class="bgColor5"><a href="#" onclick="'.htmlspecialchars($onC).'" title="'.$GLOBALS['LANG']->getLL('bookmark_delAllInCat',1).'">'.$label.'</a></td>';
                                        } else {
@@ -348,7 +348,7 @@ class SC_alt_shortcut {
 
                        $bgColorClass = $row['uid']==$this->editSC ? 'bgColor5' : ($row['sc_group']<0 ? 'bgColor6' : 'bgColor4');
 
-                       if ($row['description'] && ($row['uid']!=$this->editSC))        {
+                       if ($row['description'] && ($row['uid']!=$this->editSC)) {
                                $label = $row['description'];
                        } else {
                                $label = t3lib_div::fixed_lgd_cs(rawurldecode($qParts['query']),150);
@@ -363,7 +363,7 @@ class SC_alt_shortcut {
                        } else {
                                $this->lines[]='<td class="'.$bgColorClass.'"><a href="#" onclick="'.htmlspecialchars($onC).'"><img src="'.$this->getIcon($row['module_name']).'" title="'.htmlspecialchars($titleA).'" alt="" /></a></td>';
                        }
-                       if (trim($row['description']))  {
+                       if (trim($row['description'])) {
                                $kkey = strtolower(substr($row['description'],0,20)).'_'.$row['uid'];
                                $this->selOpt[$kkey]='<option value="'.htmlspecialchars($jumpSC).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($row['description'],50)).'</option>';
                        }
@@ -375,7 +375,7 @@ class SC_alt_shortcut {
                $this->editLoadedFunc();
                $this->editPageIdFunc();
 
-               if (!$this->editLoaded && t3lib_extMgm::isLoaded('cms'))        {
+               if (!$this->editLoaded && t3lib_extMgm::isLoaded('cms')) {
                                $editIdCode = '<td nowrap="nowrap">'.$GLOBALS['LANG']->getLL('bookmark_editID',1).': <input type="text" value="'.($this->editError?htmlspecialchars($this->editPage):'').'" name="editPage"'.$this->doc->formWidth(15).' onchange="submitEditPage(this.value);" />'.
                                        ($this->editError?'&nbsp;<strong><span class="typo3-red">'.htmlspecialchars($this->editError).'</span></strong>':'').
                                        (is_array($this->theEditRec)?'&nbsp;<strong>'.$GLOBALS['LANG']->getLL('bookmark_loadEdit',1).' \''.t3lib_BEfunc::getRecordTitle('pages',$this->theEditRec,TRUE).'\'</strong> ('.htmlspecialchars($this->editPath).')':'').
@@ -418,19 +418,19 @@ class SC_alt_shortcut {
                        ';
 
                        // Launch Edit page:
-               if ($this->theEditRec['uid'])   {
+               if ($this->theEditRec['uid']) {
                        $this->content.=$this->doc->wrapScriptTags('top.loadEditId('.$this->theEditRec['uid'].');');
 
                }
 
                        // Load alternative table/uid into editing form.
-               if (count($this->alternativeTableUid)==2 && isset($GLOBALS['TCA'][$this->alternativeTableUid[0]]) && t3lib_utility_Math::canBeInterpretedAsInteger($this->alternativeTableUid[1]))      {
+               if (count($this->alternativeTableUid)==2 && isset($GLOBALS['TCA'][$this->alternativeTableUid[0]]) && t3lib_utility_Math::canBeInterpretedAsInteger($this->alternativeTableUid[1])) {
                        $JSaction = t3lib_BEfunc::editOnClick('&edit['.$this->alternativeTableUid[0].']['.$this->alternativeTableUid[1].']=edit','','dummy.php');
                        $this->content.=$this->doc->wrapScriptTags('function editArbitraryElement() { top.content.'.$JSaction.'; } editArbitraryElement();');
                }
 
                        // Load search for something.
-               if ($this->searchFor)   {
+               if ($this->searchFor) {
                        $urlParameters = array();
                        $urlParameters['id'] = intval($GLOBALS['WEBMOUNTS'][0]);
                        $urlParameters['search_field'] = $this->searchFor;
@@ -454,8 +454,8 @@ class SC_alt_shortcut {
                        $opt=array();
                        $opt[]='<option value="0"></option>';
 
-                       foreach($this->groupLabels as $k=>$v)   {
-                               if ($v && strcmp('1',$v))       {
+                       foreach($this->groupLabels as $k=>$v) {
+                               if ($v && strcmp('1',$v)) {
                                        $label = $v;
                                } else {
                                        $label = $GLOBALS['LANG']->getLL('bookmark_group_'.$k,1);
@@ -464,9 +464,9 @@ class SC_alt_shortcut {
                                $opt[]='<option value="'.$k.'"'.(!strcmp($this->editSC_rec['sc_group'],$k)?' selected="selected"':'').'>'.$label.'</option>';
                        }
 
-                       if ($GLOBALS['BE_USER']->isAdmin())     {
-                               foreach($this->groupLabels as $k=>$v)   {
-                                       if ($v && strcmp('1',$v))       {
+                       if ($GLOBALS['BE_USER']->isAdmin()) {
+                               foreach($this->groupLabels as $k=>$v) {
+                                       if ($v && strcmp('1',$v)) {
                                                $label = $v;
                                        } else {
                                                $label = $GLOBALS['LANG']->getLL('bookmark_group_'.$k,1);
@@ -501,7 +501,7 @@ class SC_alt_shortcut {
                                ';
                } else $manageForm='';
 
-               if (!$this->editLoaded && count($this->selOpt)>1)       {
+               if (!$this->editLoaded && count($this->selOpt)>1) {
                        $this->lines[]='<td>&nbsp;</td>';
                        $this->lines[]='<td><select name="_selSC" onchange="eval(this.options[this.selectedIndex].value);this.selectedIndex=0;">'.implode('',$this->selOpt).'</select></td>';
                }
@@ -535,23 +535,23 @@ class SC_alt_shortcut {
                $this->editError = '';
                $this->theEditRec = '';
                $this->searchFor = '';
-               if ($this->editPage)    {
+               if ($this->editPage) {
 
                                // First, test alternative value consisting of [table]:[uid] and if not found, proceed with traditional page ID resolve:
                        $this->alternativeTableUid = explode(':',$this->editPage);
                        if (!(count($this->alternativeTableUid)==2 && $GLOBALS['BE_USER']->isAdmin()))  {       // We restrict it to admins only just because I'm not really sure if alt_doc.php properly checks permissions of passed records for editing. If alt_doc.php does that, then we can remove this.
 
                                $where = ' AND ('.$GLOBALS['BE_USER']->getPagePermsClause(2).' OR '.$GLOBALS['BE_USER']->getPagePermsClause(16).')';
-                               if (t3lib_utility_Math::canBeInterpretedAsInteger($this->editPage))     {
+                               if (t3lib_utility_Math::canBeInterpretedAsInteger($this->editPage)) {
                                        $this->theEditRec = t3lib_BEfunc::getRecordWSOL('pages',$this->editPage,'*',$where);
                                } else {
                                        $records = t3lib_BEfunc::getRecordsByField('pages','alias',$this->editPage,$where);
-                                       if (is_array($records)) {
+                                       if (is_array($records)) {
                                                $this->theEditRec = reset($records);
                                                t3lib_BEfunc::workspaceOL('pages',$this->theEditRec);
                                        }
                                }
-                               if (!is_array($this->theEditRec))       {
+                               if (!is_array($this->theEditRec)) {
                                        unset($this->theEditRec);
                                        $this->searchFor = $this->editPage;
                                } elseif (!$GLOBALS['BE_USER']->isInWebMount($this->theEditRec['uid'])) {
@@ -643,30 +643,30 @@ class SC_alt_shortcut {
        function workspaceSelector() {
 
                        // Changing workspace and if so, reloading entire backend:
-               if (strlen($this->changeWorkspace))     {
+               if (strlen($this->changeWorkspace)) {
                        $GLOBALS['BE_USER']->setWorkspace($this->changeWorkspace);
                        return $this->doc->wrapScriptTags('top.location.href="'. t3lib_BEfunc::getBackendScript() . '";');
                }
                        // Changing workspace and if so, reloading entire backend:
-               if (strlen($this->changeWorkspacePreview))      {
+               if (strlen($this->changeWorkspacePreview)) {
                        $GLOBALS['BE_USER']->setWorkspacePreview($this->changeWorkspacePreview);
                }
 
                        // Create options array:
                $options = array();
-               if ($GLOBALS['BE_USER']->checkWorkspace(array('uid' => 0)))     {
+               if ($GLOBALS['BE_USER']->checkWorkspace(array('uid' => 0))) {
                        $options[0] = '['.$GLOBALS['LANG']->getLL('bookmark_onlineWS').']';
                }
-               if ($GLOBALS['BE_USER']->checkWorkspace(array('uid' => -1)))    {
+               if ($GLOBALS['BE_USER']->checkWorkspace(array('uid' => -1))) {
                        $options[-1] = '['.$GLOBALS['LANG']->getLL('bookmark_offlineWS').']';
                }
 
                        // Add custom workspaces (selecting all, filtering by BE_USER check):
                if (t3lib_extMgm::isLoaded('workspaces')) {
                        $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers','sys_workspace','pid=0'.t3lib_BEfunc::deleteClause('sys_workspace'),'','title');
-                       if (count($workspaces)) {
-                               foreach ($workspaces as $rec)   {
-                                       if ($GLOBALS['BE_USER']->checkWorkspace($rec))  {
+                       if (count($workspaces)) {
+                               foreach ($workspaces as $rec) {
+                                       if ($GLOBALS['BE_USER']->checkWorkspace($rec)) {
                                                $options[$rec['uid']] = $rec['uid'].': '.$rec['title'];
                                        }
                                }
@@ -674,8 +674,8 @@ class SC_alt_shortcut {
                }
 
                        // Build selector box:
-               if (count($options))    {
-                       foreach($options as $value => $label)   {
+               if (count($options)) {
+                       foreach($options as $value => $label) {
                                $selected = ((int)$GLOBALS['BE_USER']->workspace===$value ? ' selected="selected"' : '');
                                $options[$value] = '<option value="'.htmlspecialchars($value).'"'.$selected.'>'.htmlspecialchars($label).'</option>';
                        }
@@ -685,7 +685,7 @@ class SC_alt_shortcut {
 
                $selector = '';
                        // Preview:
-               if ($GLOBALS['BE_USER']->workspace!==0) {
+               if ($GLOBALS['BE_USER']->workspace!==0) {
                        $selector.= '<label for="workspacePreview">Frontend Preview:</label> <input type="checkbox" name="workspacePreview" id="workspacePreview" onclick="changeWorkspacePreview('.($GLOBALS['BE_USER']->user['workspace_preview'] ? 0 : 1).')"; '.($GLOBALS['BE_USER']->user['workspace_preview'] ? 'checked="checked"' : '').'/>&nbsp;';
                }
 
@@ -718,11 +718,11 @@ class SC_alt_shortcut {
         * @param       string          Backpath string to prepend the icon after made relative
         * @return      void
         */
-       function mIconFilename($Ifilename,$backPath)    {
+       function mIconFilename($Ifilename,$backPath) {
                        // Change icon of fileadmin references - otherwise it doesn't differ with Web->List
                $Ifilename = str_replace ('mod/file/list/list.gif', 'mod/file/file.gif', $Ifilename);
 
-               if (t3lib_div::isAbsPath($Ifilename))   {
+               if (t3lib_div::isAbsPath($Ifilename)) {
                        $Ifilename = '../'.substr($Ifilename,strlen(PATH_site));
                }
                return $backPath.$Ifilename;
@@ -734,8 +734,8 @@ class SC_alt_shortcut {
         * @param       string          Backend module name
         * @return      string          Icon file name
         */
-       function getIcon($modName)      {
-               if ($GLOBALS['LANG']->moduleLabels['tabs_images'][$modName.'_tab'])     {
+       function getIcon($modName) {
+               if ($GLOBALS['LANG']->moduleLabels['tabs_images'][$modName.'_tab']) {
                        $icon = $this->mIconFilename($GLOBALS['LANG']->moduleLabels['tabs_images'][$modName.'_tab'],'');
                } elseif ($modName=='xMOD_alt_doc.php') {
                        $icon = 'gfx/edit2.gif';
@@ -757,13 +757,13 @@ class SC_alt_shortcut {
         * @param       string          Backend module label (user defined?)
         * @return      string          Label for the shortcut item
         */
-       function itemLabel($inlabel,$modName,$M_modName='')     {
-               if (substr($modName,0,5)=='xMOD_')      {
+       function itemLabel($inlabel,$modName,$M_modName='') {
+               if (substr($modName,0,5)=='xMOD_') {
                        $label=substr($modName,5);
                } else {
                        $split = explode('_',$modName);
                        $label = $GLOBALS['LANG']->moduleLabels['tabs'][$split[0].'_tab'];
-                       if (count($split)>1)    {
+                       if (count($split)>1) {
                                $label.='>'.$GLOBALS['LANG']->moduleLabels['tabs'][$modName.'_tab'];
                        }
                }
@@ -778,7 +778,7 @@ class SC_alt_shortcut {
         * @param       string          The URL of the current shortcut link
         * @return      string          If a page ID was found, it is returned. Otherwise: 0
         */
-       function getLinkedPageId($url)  {
+       function getLinkedPageId($url) {
                return preg_replace('/.*[\?&]id=([^&]+).*/', '$1', $url);
        }
 
index 930211f..751eb22 100644 (file)
@@ -626,7 +626,7 @@ class TYPO3backend {
         */
        protected function handlePageEditing() {
 
-               if(!t3lib_extMgm::isLoaded('cms'))      {
+               if(!t3lib_extMgm::isLoaded('cms')) {
                        return;
                }
 
@@ -634,25 +634,25 @@ class TYPO3backend {
                $editId     = preg_replace('/[^[:alnum:]_]/', '', t3lib_div::_GET('edit'));
                $editRecord = '';
 
-               if($editId)     {
+               if($editId) {
 
                                // Looking up the page to edit, checking permissions:
                        $where = ' AND ('.$GLOBALS['BE_USER']->getPagePermsClause(2)
                                        .' OR '.$GLOBALS['BE_USER']->getPagePermsClause(16).')';
 
-                       if(t3lib_utility_Math::canBeInterpretedAsInteger($editId))      {
+                       if(t3lib_utility_Math::canBeInterpretedAsInteger($editId)) {
                                $editRecord = t3lib_BEfunc::getRecordWSOL('pages', $editId, '*', $where);
                        } else {
                                $records = t3lib_BEfunc::getRecordsByField('pages', 'alias', $editId, $where);
 
-                               if(is_array($records))  {
+                               if(is_array($records)) {
                                        $editRecord = reset($records);
                                        t3lib_BEfunc::workspaceOL('pages', $editRecord);
                                }
                        }
 
                                // If the page was accessible, then let the user edit it.
-                       if(is_array($editRecord) && $GLOBALS['BE_USER']->isInWebMount($editRecord['uid']))      {
+                       if(is_array($editRecord) && $GLOBALS['BE_USER']->isInWebMount($editRecord['uid'])) {
                                        // Setting JS code to open editing:
                                $this->js .= '
                // Load page to edit:
@@ -683,10 +683,10 @@ class TYPO3backend {
        protected function setStartupModule() {
                $startModule = preg_replace('/[^[:alnum:]_]/', '', t3lib_div::_GET('module'));
 
-               if(!$startModule)       {
-                       if ($GLOBALS['BE_USER']->uc['startModule'])     {
+               if(!$startModule) {
+                       if ($GLOBALS['BE_USER']->uc['startModule']) {
                                $startModule = $GLOBALS['BE_USER']->uc['startModule'];
-                       } elseif ($GLOBALS['BE_USER']->uc['startInTaskCenter']) {
+                       } elseif ($GLOBALS['BE_USER']->uc['startInTaskCenter']) {
                                $startModule = 'user_task';
                        }
                }
index 782df1d..18dfd07 100644 (file)
@@ -100,7 +100,7 @@ class SC_browse_links {
 
                        // Find "mode"
                $this->mode = t3lib_div::_GP('mode');
-               if (!$this->mode)       {
+               if (!$this->mode) {
                        $this->mode = 'rte';
                }
 
@@ -138,7 +138,7 @@ class SC_browse_links {
                $this->content = '';
 
                        // look for alternativ mountpoints
-               switch((string)$this->mode)     {
+               switch((string)$this->mode) {
                        case 'rte':
                        case 'db':
                        case 'wizard':
@@ -156,7 +156,7 @@ class SC_browse_links {
                                $altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.folderTree.altElementBrowserMountPoints'));
                                if ($altMountPoints) {
                                        $altMountPoints = t3lib_div::trimExplode(',', $altMountPoints);
-                                       foreach($altMountPoints as $filePathRelativeToFileadmindir)     {
+                                       foreach($altMountPoints as $filePathRelativeToFileadmindir) {
                                                $GLOBALS['BE_USER']->addFileMount('', $filePathRelativeToFileadmindir, $filePathRelativeToFileadmindir, 1, 'readonly');
                                        }
                                        $GLOBALS['FILEMOUNTS'] = $GLOBALS['BE_USER']->returnFilemounts();
@@ -189,7 +189,7 @@ class SC_browse_links {
                        $GLOBALS['BE_USER']->pushModuleData('browse_links.php', $modData);
 
                                // Output the correct content according to $this->mode
-                       switch((string)$this->mode)     {
+                       switch((string)$this->mode) {
                                case 'rte':
                                        $this->content = $this->browser->main_rte();
                                break;
index 2409c56..239492b 100644 (file)
@@ -85,7 +85,7 @@ class SC_browser {
                                function setParams(mode,params) {       //
                                        parent.content.location.href = "browse_links.php?mode="+mode+"&bparams="+params;
                                }
-                               if (!window.opener)     {
+                               if (!window.opener) {
                                        alert("ERROR: Sorry, no link to main window... Closing");
                                        close();
                                }
index 580deb9..d97afb8 100644 (file)
@@ -85,7 +85,7 @@ class TBE_browser_recordList extends localRecordList {
         * @param       string          Commalist of fields NOT to pass as parameters (currently "sortField" and "sortRev")
         * @return      string          Query-string for URL
         */
-       function listURL($altId='',$table=-1,$exclList='')      {
+       function listURL($altId='',$table=-1,$exclList='') {
                return $this->thisScript.
                        '?id='.(strcmp($altId,'')?$altId:$this->id).
                        '&table='.rawurlencode($table==-1?$this->table:$table).
@@ -120,7 +120,7 @@ class TBE_browser_recordList extends localRecordList {
         * @param       array           Records array (from table name)
         * @return      string
         */
-       function linkWrapItems($table,$uid,$code,$row)  {
+       function linkWrapItems($table,$uid,$code,$row) {
                if (!$code) {
                        $code = '<i>['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title',1).']</i>';
                } else {
@@ -252,8 +252,8 @@ class localPageTree extends t3lib_browseTree {
         * @param       boolean         (Ignore)
         * @return      string          Wrapping title string.
         */
-       function wrapTitle($title,$v,$ext_pArrPages='') {
-               if ($this->ext_isLinkable($v['doktype'],$v['uid']))     {
+       function wrapTitle($title,$v,$ext_pArrPages='') {
+               if ($this->ext_isLinkable($v['doktype'],$v['uid'])) {
                        $aOnClick = "return link_typo3Page('".$v['uid']."');";
                        return '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$title.'</a>';
                } else {
@@ -267,17 +267,17 @@ class localPageTree extends t3lib_browseTree {
         * @param       array           Tree array
         * @return      string          HTML output.
         */
-       function printTree($treeArr='') {
+       function printTree($treeArr='') {
                $titleLen=intval($GLOBALS['BE_USER']->uc['titleLen']);
                if (!is_array($treeArr))        $treeArr=$this->tree;
 
                $out='';
                $c=0;
 
-               foreach($treeArr as $k => $v)   {
+               foreach($treeArr as $k => $v) {
                        $c++;
                        $bgColorClass = ($c+1)%2 ? 'bgColor' : 'bgColor-10';
-                       if ($GLOBALS['SOBE']->browser->curUrlInfo['act']=='page' && $GLOBALS['SOBE']->browser->curUrlInfo['pageid']==$v['row']['uid'] && $GLOBALS['SOBE']->browser->curUrlInfo['pageid'])       {
+                       if ($GLOBALS['SOBE']->browser->curUrlInfo['act']=='page' && $GLOBALS['SOBE']->browser->curUrlInfo['pageid']==$v['row']['uid'] && $GLOBALS['SOBE']->browser->curUrlInfo['pageid']) {
                                $arrCol='<td><img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/blinkarrow_right.gif','width="5" height="9"').' class="c-blinkArrowR" alt="" /></td>';
                                $bgColorClass='bgColor4';
                        } else {
@@ -317,8 +317,8 @@ class localPageTree extends t3lib_browseTree {
         * @param       integer         uid to test.
         * @return      boolean
         */
-       function ext_isLinkable($doktype,$uid)  {
-               if ($uid && $doktype<199)       {
+       function ext_isLinkable($doktype,$uid) {
+               if ($uid && $doktype<199) {
                        return TRUE;
                }
        }
@@ -331,8 +331,8 @@ class localPageTree extends t3lib_browseTree {
         * @param       boolean         If set, the link will have a anchor point (=$bMark) and a name attribute (=$bMark)
         * @return      string          Link-wrapped input string
         */
-       function PM_ATagWrap($icon,$cmd,$bMark='')      {
-               if ($bMark)     {
+       function PM_ATagWrap($icon,$cmd,$bMark='') {
+               if ($bMark) {
                        $anchor = '#'.$bMark;
                        $name=' name="'.$bMark.'"';
                }
@@ -397,7 +397,7 @@ class TBE_PageTree extends localPageTree {
         * @param       integer         uid to test.
         * @return      boolean
         */
-       function ext_isLinkable($doktype,$uid)  {
+       function ext_isLinkable($doktype,$uid) {
                return TRUE;
        }
 
@@ -409,8 +409,8 @@ class TBE_PageTree extends localPageTree {
         * @param       boolean         If set, pages clicked will return immediately, otherwise reload page.
         * @return      string          Wrapping title string.
         */
-       function wrapTitle($title,$v,$ext_pArrPages)    {
-               if ($ext_pArrPages)     {
+       function wrapTitle($title,$v,$ext_pArrPages) {
+               if ($ext_pArrPages) {
                        $ficon=t3lib_iconWorks::getIcon('pages',$v);
                        $onClick = "return insertElement('pages', '".$v['uid']."', 'db', ".t3lib_div::quoteJSvalue($v['title']).", '', '', '".$ficon."','',1);";
                } else {
@@ -489,8 +489,8 @@ class localFolderTree extends t3lib_folderTree {
         * @return      string          Link-wrapped input string
         * @access private
         */
-       function PM_ATagWrap($icon,$cmd,$bMark='')      {
-               if ($bMark)     {
+       function PM_ATagWrap($icon,$cmd,$bMark='') {
+               if ($bMark) {
                        $anchor = '#'.$bMark;
                        $name=' name="'.$bMark.'"';
                }
@@ -537,7 +537,7 @@ class TBE_FolderTree extends localFolderTree {
         * @return boolean TRUE is returned if the path is NOT a recycler or temp folder AND if ->ext_noTempRecyclerDirs is not set.
         */
        function ext_isLinkable($folderObject) {
-               if ($this->ext_noTempRecyclerDirs && (substr($folderObject->getIdentifier(), -7)=='_temp_/' || substr($folderObject->getIdentifier(),-11)=='_recycler_/'))      {
+               if ($this->ext_noTempRecyclerDirs && (substr($folderObject->getIdentifier(), -7)=='_temp_/' || substr($folderObject->getIdentifier(),-11)=='_recycler_/')) {
                        return FALSE;
                } else {
                        return TRUE;
@@ -706,7 +706,7 @@ class browse_links {
 
                        // Find "mode"
                $this->mode = t3lib_div::_GP('mode');
-               if (!$this->mode)       {
+               if (!$this->mode) {
                        $this->mode = 'rte';
                }
                        // Creating backend template object:
@@ -745,7 +745,7 @@ class browse_links {
 
 
                        // CurrentUrl - the current link url must be passed around if it exists
-               if ($this->mode == 'wizard')    {
+               if ($this->mode == 'wizard') {
                        $currentValues = t3lib_div::trimExplode(LF, trim($this->P['currentValue']));
                        if (count($currentValues) > 0) {
                                $currentValue = array_pop($currentValues);
@@ -787,7 +787,7 @@ class browse_links {
                                        $currentLinkParts[0] = rawurldecode(substr($this->curUrlArray['href'], 5));     // remove the "file:" prefix
 
                                        // check if this is a link to a file
-                               } elseif (file_exists(PATH_site.rawurldecode($this->curUrlArray['href'])))      {
+                               } elseif (file_exists(PATH_site.rawurldecode($this->curUrlArray['href']))) {
                                        if (t3lib_div::isFirstPartOfStr($this->curUrlArray['href'], PATH_site)) {
                                                $currentLinkParts[0] = substr($this->curUrlArray['href'], strlen(PATH_site));
                                        }
@@ -811,7 +811,7 @@ class browse_links {
                        }
                } else {
                        $this->curUrlArray = t3lib_div::_GP('curUrl');
-                       if ($this->curUrlArray['all'])  {
+                       if ($this->curUrlArray['all']) {
                                $this->curUrlArray=t3lib_div::get_tag_attributes($this->curUrlArray['all']);
                        }
                        $this->curUrlInfo=$this->parseCurUrl($this->curUrlArray['href'],$this->siteURL);
@@ -819,13 +819,13 @@ class browse_links {
 
                        // Determine nature of current url:
                $this->act=t3lib_div::_GP('act');
-               if (!$this->act)        {
+               if (!$this->act) {
                        $this->act=$this->curUrlInfo['act'];
                }
 
                        // Rich Text Editor specific configuration:
                $addPassOnParams='';
-               if ((string)$this->mode == 'rte')       {
+               if ((string)$this->mode == 'rte') {
                        $RTEtsConfigParts = explode(':',$this->RTEtsConfigParams);
                        $addPassOnParams.='&RTEtsConfigParams='.rawurlencode($this->RTEtsConfigParams);
                        $RTEsetup = $GLOBALS['BE_USER']->getTSConfig('RTE',t3lib_BEfunc::getPagesTSconfig($RTEtsConfigParts[5]));
@@ -834,7 +834,7 @@ class browse_links {
 
                        // Initializing the target value (RTE)
                $this->setTarget = ($this->curUrlArray['target'] != '-') ? rawurlencode($this->curUrlArray['target']) : '';
-               if ($this->thisConfig['defaultLinkTarget'] && !isset($this->curUrlArray['target']))     {
+               if ($this->thisConfig['defaultLinkTarget'] && !isset($this->curUrlArray['target'])) {
                        $this->setTarget=$this->thisConfig['defaultLinkTarget'];
                }
 
@@ -917,7 +917,7 @@ class browse_links {
                                        return false;
                                }
                                function link_current() {       //
-                                       if (cur_href!="http://" && cur_href!="mailto:") {
+                                       if (cur_href!="http://" && cur_href!="mailto:") {
                                                returnBeforeCleaned = cur_href;
                                                if (returnBeforeCleaned.substr(0, 7) == "http://") {
                                                        returnToMainFormValue = returnBeforeCleaned.substr(7);
@@ -936,7 +936,7 @@ class browse_links {
                                        return false;
                                }
                                function checkReference()       {       //
-                                       if (window.opener && window.opener.document && window.opener.document.'.$this->P['formName'].' && window.opener.document.'.$this->P['formName'].'["'.$this->P['itemName'].'"] ) {
+                                       if (window.opener && window.opener.document && window.opener.document.'.$this->P['formName'].' && window.opener.document.'.$this->P['formName'].'["'.$this->P['itemName'].'"] ) {
                                                return window.opener.document.'.$this->P['formName'].'["'.$this->P['itemName'].'"];
                                        } else {
                                                close();
@@ -944,7 +944,7 @@ class browse_links {
                                }
                                function updateValueInMainForm(input)   {       //
                                        var field = checkReference();
-                                       if (field)      {
+                                       if (field) {
                                                if (cur_target == "" && (cur_class != "" || cur_title != "" || cur_params != "")) {
                                                        cur_target = "-";
                                                }
@@ -992,7 +992,7 @@ class browse_links {
                                        return false;
                                }
                                function link_current() {       //
-                                       if (cur_href!="http://" && cur_href!="mailto:") {
+                                       if (cur_href!="http://" && cur_href!="mailto:") {
                                                self.parent.parent.renderPopup_addLink(cur_href, cur_target, cur_class, cur_title);
                                        }
                                        return false;
@@ -1092,7 +1092,7 @@ class browse_links {
                        function launchView(url)        {       //
                                var thePreviewWindow="";
                                thePreviewWindow = window.open("'.$GLOBALS['BACK_PATH'].'show_item.php?table="+url,"ShowItem","height=300,width=410,status=0,menubar=0,resizable=0,location=0,directories=0,scrollbars=1,toolbar=0");
-                               if (thePreviewWindow && thePreviewWindow.focus) {
+                               if (thePreviewWindow && thePreviewWindow.focus) {
                                        thePreviewWindow.focus();
                                }
                        }
@@ -1120,7 +1120,7 @@ class browse_links {
                                return false;
                        }
                        function addElement(elName,elValue,altElValue,close)    {       //
-                               if (parent.window.opener && parent.window.opener.setFormValueFromBrowseWin)     {
+                               if (parent.window.opener && parent.window.opener.setFormValueFromBrowseWin) {
                                        parent.window.opener.setFormValueFromBrowseWin("'.$pArr[0].'",altElValue?altElValue:elValue,elName);
                                        focusOpenerAndClose(close);
                                } else {
@@ -1176,9 +1176,9 @@ class browse_links {
        function processSessionData($data) {
                $store = FALSE;
 
-               switch((string)$this->mode)     {
+               switch((string)$this->mode) {
                        case 'db':
-                               if (isset($this->expandPage))   {
+                               if (isset($this->expandPage)) {
                                        $data['expandPage']=$this->expandPage;
                                        $store = TRUE;
                                } else {
@@ -1188,7 +1188,7 @@ class browse_links {
                        case 'file':
                        case 'filedrag':
                        case 'folder':
-                               if (isset($this->expandFolder)) {
+                               if (isset($this->expandFolder)) {
                                        $data['expandFolder']=$this->expandFolder;
                                        $store = TRUE;
                                } else {
@@ -1217,7 +1217,7 @@ class browse_links {
         * @param       boolean         If set, the "remove link" is not shown in the menu: Used for the "Select link" wizard which is used by the TCEforms
         * @return      string          Modified content variable.
         */
-       function main_rte($wiz=0)       {
+       function main_rte($wiz=0) {
                        // Starting content:
                $content=$this->doc->startPage('RTE link');
 
@@ -1250,7 +1250,7 @@ class browse_links {
 
                        // Making menu in top:
                $menuDef = array();
-               if (!$wiz)      {
+               if (!$wiz) {
                        $menuDef['removeLink']['isActive'] = $this->act=='removeLink';
                        $menuDef['removeLink']['label'] = $GLOBALS['LANG']->getLL('removeLink', 1);
                        $menuDef['removeLink']['url'] = '#';
@@ -1304,7 +1304,7 @@ class browse_links {
                $content.=$this->printCurrentUrl($this->curUrlInfo['info']).'<br />';
 
                        // Depending on the current action we will create the actual module content for selecting a link:
-               switch($this->act)      {
+               switch($this->act) {
                        case 'mail':
                                $extUrl='
 
@@ -1394,16 +1394,16 @@ class browse_links {
                                        ';
                        break;
                        case 'spec':
-                               if (is_array($this->thisConfig['userLinks.']))  {
+                               if (is_array($this->thisConfig['userLinks.'])) {
                                        $subcats=array();
                                        $v=$this->thisConfig['userLinks.'];
                                        foreach ($v as $k2 => $value) {
                                                $k2i = intval($k2);
-                                               if (substr($k2,-1)=='.' && is_array($v[$k2i.'.']))      {
+                                               if (substr($k2,-1)=='.' && is_array($v[$k2i.'.'])) {
 
                                                                // Title:
                                                        $title = trim($v[$k2i]);
-                                                       if (!$title)    {
+                                                       if (!$title) {
                                                                $title=$v[$k2i.'.']['url'];
                                                        } else {
                                                                $title = $GLOBALS['LANG']->sL($title);
@@ -1415,7 +1415,7 @@ class browse_links {
                                                        $onClickEvent='';
                                                        if (isset($v[$k2i.'.']['target']))      $onClickEvent.="browse_links_setTarget('".$v[$k2i.'.']['target']."');";
                                                        $v[$k2i.'.']['url'] = str_replace('###_URL###',$this->siteURL,$v[$k2i.'.']['url']);
-                                                       if (substr($v[$k2i.'.']['url'],0,7)=='http://' || substr($v[$k2i.'.']['url'],0,7)=='mailto:')   {
+                                                       if (substr($v[$k2i.'.']['url'],0,7)=='http://' || substr($v[$k2i.'.']['url'],0,7)=='mailto:') {
                                                                $onClickEvent.="cur_href=unescape('".rawurlencode($v[$k2i.'.']['url'])."');link_current();";
                                                        } else {
                                                                $onClickEvent.="link_spec(unescape('".$this->siteURL.rawurlencode($v[$k2i.'.']['url'])."'));";
@@ -1460,7 +1460,7 @@ class browse_links {
                                $cElements = $this->expandPage();
 
                                // Outputting Temporary DB mount notice:
-                               if (intval($GLOBALS['BE_USER']->getSessionData('pageTree_temporaryMountPoint')))        {
+                               if (intval($GLOBALS['BE_USER']->getSessionData('pageTree_temporaryMountPoint'))) {
                                        $link = '<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('setTempDBmount' => 0))) . '">' .
                                                                                $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_core.xml:labels.temporaryDBmount', 1) .
                                                                        '</a>';
@@ -1582,7 +1582,7 @@ class browse_links {
                        }
 
                        $selectJS = '
-                               if (document.ltargetform.popup_width.options[document.ltargetform.popup_width.selectedIndex].value>0 && document.ltargetform.popup_height.options[document.ltargetform.popup_height.selectedIndex].value>0)     {
+                               if (document.ltargetform.popup_width.options[document.ltargetform.popup_width.selectedIndex].value>0 && document.ltargetform.popup_height.options[document.ltargetform.popup_height.selectedIndex].value>0) {
                                        document.ltargetform.ltarget.value = document.ltargetform.popup_width.options[document.ltargetform.popup_width.selectedIndex].value+"x"+document.ltargetform.popup_height.options[document.ltargetform.popup_height.selectedIndex].value;
                                        browse_links_setTarget(document.ltargetform.ltarget.value);
                                        browse_links_setClass(document.lclassform.lclass.value);
@@ -1726,7 +1726,7 @@ class browse_links {
                        // Getting flag for showing/not showing thumbnails:
                $noThumbs = $GLOBALS['BE_USER']->getTSConfigVal('options.noThumbsInEB');
 
-               if (!$noThumbs) {
+               if (!$noThumbs) {
                                // MENU-ITEMS, fetching the setting for thumbnails from File>List module:
                        $_MOD_MENU = array('displayThumbs' => '');
                        $_MCONF['name']='file_list';
@@ -1742,7 +1742,7 @@ class browse_links {
 
                list(,,$specUid) = explode('_',$this->PM);
 
-               if ($this->mode=='filedrag')    {
+               if ($this->mode=='filedrag') {
                        $files = $this->TBE_dragNDrop($this->selectedFolder, $pArr[3]);
                } else {
                        $files = $this->TBE_expandFolder($this->selectedFolder, $pArr[3], $noThumbs);
@@ -1918,10 +1918,10 @@ class browse_links {
 
                                // Traverse list of records:
                        $c=0;
-                       while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))       {
+                       while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                $c++;
                                $icon = t3lib_iconWorks::getSpriteIconForRecord('tt_content', $row);
-                               if ($this->curUrlInfo['act']=='page' && $this->curUrlInfo['cElement']==$row['uid'])     {
+                               if ($this->curUrlInfo['act']=='page' && $this->curUrlInfo['cElement']==$row['uid']) {
                                        $arrCol='<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/blinkarrow_left.gif','width="5" height="9"').' class="c-blinkArrowL" alt="" />';
                                } else {
                                        $arrCol='';
@@ -1935,11 +1935,11 @@ class browse_links {
                                                '</a><br />';
 
                                        // Finding internal anchor points:
-                               if (t3lib_div::inList('text,textpic', $row['CType']))   {
+                               if (t3lib_div::inList('text,textpic', $row['CType'])) {
                                        $split = preg_split('/(<a[^>]+name=[\'"]?([^"\'>[:space:]]+)[\'"]?[^>]*>)/i', $row['bodytext'], -1, PREG_SPLIT_DELIM_CAPTURE);
 
-                                       foreach($split as $skey => $sval)       {
-                                               if (($skey%3)==2)       {
+                                       foreach($split as $skey => $sval) {
+                                               if (($skey%3)==2) {
                                                                // Putting list element HTML together:
                                                        $sval = substr($sval,0,100);
                                                        $out.='<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/ol/line.gif','width="18" height="16"').' alt="" />'.
@@ -1961,12 +1961,12 @@ class browse_links {
         * @param       string          Commalist of tables. Set to "*" if you want all tables.
         * @return      string          HTML output.
         */
-       function TBE_expandPage($tables)        {
+       function TBE_expandPage($tables) {
                $out='';
                if ($this->expandPage >= 0 && t3lib_utility_Math::canBeInterpretedAsInteger($this->expandPage) && $GLOBALS['BE_USER']->isInWebMount($this->expandPage)) {
 
                                // Set array with table names to list:
-                       if (!strcmp(trim($tables),'*')) {
+                       if (!strcmp(trim($tables),'*')) {
                                $tablesArr = array_keys($GLOBALS['TCA']);
                        } else {
                                $tablesArr = t3lib_div::trimExplode(',',$tables,1);
@@ -2114,7 +2114,7 @@ class browse_links {
                        $folderIcon .= htmlspecialchars(t3lib_div::fixed_lgd_cs($folder->getIdentifier(), $titleLen));
 
                        $picon='<a href="#" onclick="return link_folder(\'file:'.$folder->getCombinedIdentifier().'\');">' . $folderIcon . '</a>';
-                       if ($this->curUrlInfo['act'] == 'folder' && $currentIdentifier == $folder->getCombinedIdentifier())     {
+                       if ($this->curUrlInfo['act'] == 'folder' && $currentIdentifier == $folder->getCombinedIdentifier()) {
                                $out.= '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/blinkarrow_left.gif', 'width="5" height="9"') . ' class="c-blinkArrowL" alt="" />';
                        }
                        $out.=$picon.'<br />';
@@ -2335,7 +2335,7 @@ class browse_links {
 
                        // Create the header of current folder:
                if($baseFolder) {
-                       if (strstr($baseFolder, ',') || strstr($baseFolder, '|'))       {
+                       if (strstr($baseFolder, ',') || strstr($baseFolder, '|')) {
                                        // In case an invalid character is in the filepath, display error message:
                                $errorMessage     = $GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->getLL('invalidChar'), ', |'));
                                $aTag = $aTag_alt = "<a href=\"#\" onclick=\"alert(".$errorMessage.");return false;\">";
@@ -2365,7 +2365,7 @@ class browse_links {
                        if(count($folders) > 0) {
                                        // Traverse the folder list:
                                $lines = array();
-                               foreach($folders as $folderPath)        {
+                               foreach($folders as $folderPath) {
                                        $pathInfo = pathinfo($folderPath);
 
                                                // Create folder icon:
@@ -2378,7 +2378,7 @@ class browse_links {
                                                $aTag = "<a href=\"#\" onclick=\"return insertElement('','".rawurlencode($folderPath)."', 'folder', '".rawurlencode($folderPath)."', unescape('".rawurlencode($folderPath)."'), '".$pathInfo['extension']."', '".$ficon."');\">";
                                        }
 
-                                       if (strstr($folderPath,',') || strstr($folderPath,'|')) {
+                                       if (strstr($folderPath,',') || strstr($folderPath,'|')) {
                                                        // In case an invalid character is in the filepath, display error message:
                                                $errorMessage     = $GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->getLL('invalidChar'), ', |'));
                                                $aTag = $aTag_alt = "<a href=\"#\" onclick=\"alert(".$errorMessage.");return false;\">";
@@ -2472,14 +2472,14 @@ class browse_links {
 
                                                        // Show only web-images
                                                $fileExtension = strtolower($fileObject->getExtension());
-                                               if (t3lib_div::inList('gif,jpeg,jpg,png', $fileExtension))      {
+                                               if (t3lib_div::inList('gif,jpeg,jpg,png', $fileExtension)) {
                                                        $imgInfo = @getimagesize($fileObject->getForLocalProcessing(FALSE));
                                                        $pDim = $imgInfo[0] . 'x' . $imgInfo[1] . ' pixels';
 
                                                        $size = ' ('.t3lib_div::formatSize($fileObject->getSize()) . 'bytes' . ($pDim ? ', ' . $pDim : '') . ')';
                                                        $filenameAndIcon = t3lib_iconWorks::getSpriteIconForFile($fileExtension, array('title' => $fileObject->getName() . $size));
 
-                                                       if (t3lib_div::_GP('noLimit'))  {
+                                                       if (t3lib_div::_GP('noLimit')) {
                                                                $maxW=10000;
                                                                $maxH=10000;
                                                        } else {
@@ -2488,11 +2488,11 @@ class browse_links {
                                                        }
                                                        $IW = $imgInfo[0];
                                                        $IH = $imgInfo[1];
-                                                       if ($IW>$maxW)  {
+                                                       if ($IW>$maxW) {
                                                                $IH=ceil($IH/$IW*$maxW);
                                                                $IW=$maxW;
                                                        }
-                                                       if ($IH>$maxH)  {
+                                                       if ($IH>$maxH) {
                                                                $IW=ceil($IW/$IH*$maxH);
                                                                $IH=$maxH;
                                                        }
@@ -2563,7 +2563,7 @@ class browse_links {
         * @param       string          Absolute filepath
         * @return      boolean         If the input path is found in PATH_site then it returns TRUE.
         */
-       function isWebFolder($folder)   {
+       function isWebFolder($folder) {
                $folder = rtrim($folder, '/').'/';
                return t3lib_div::isFirstPartOfStr($folder,PATH_site) ? TRUE : FALSE;
        }
@@ -2574,7 +2574,7 @@ class browse_links {
         * @param       string          Absolute filepath
         * @return      boolean         If the input path is found in the backend users filemounts, then return TRUE.
         */
-       function checkFolder($folder)   {
+       function checkFolder($folder) {
                return $this->fileProcessor->checkPathAgainstMounts(rtrim($folder, '/') . '/') ? TRUE : FALSE;
        }
 
@@ -2594,7 +2594,7 @@ class browse_links {
         * @param       string          The string to print in the header. The value is htmlspecialchars()'ed before output.
         * @return      string          The header HTML (wrapped in a table)
         */
-       function barheader($str)        {
+       function barheader($str) {
                return '
                        <!-- Bar header: -->
                        <h3>' . htmlspecialchars($str) . '</h3>
@@ -2608,7 +2608,7 @@ class browse_links {
         * @param       string          Icon filename body from gfx/ (default is "icon_note") - meant to allow change to warning type icons...
         * @return      string          HTML for the message (wrapped in a table).
         */
-       function getMsgBox($in_msg,$icon='icon_note')   {
+       function getMsgBox($in_msg,$icon='icon_note') {
                $msg = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/'.$icon.'.gif','width="18" height="16"').' alt="" />'.htmlspecialchars($in_msg);
                $msg = '
 
@@ -2704,14 +2704,14 @@ class browse_links {
                                        }
                                } else {        // URL is a page (id parameter)
                                        $uP=parse_url($rel);
-                                       if (!trim($uP['path'])) {
+                                       if (!trim($uP['path'])) {
                                                $pp = preg_split('/^id=/', $uP['query']);
                                                $pp[1] = preg_replace( '/&id=[^&]*/', '', $pp[1]);
                                                $parameters = explode('&', $pp[1]);
                                                $id = array_shift($parameters);
-                                               if ($id)        {
+                                               if ($id) {
                                                        // Checking if the id-parameter is an alias.
-                                                       if (!t3lib_utility_Math::canBeInterpretedAsInteger($id))        {
+                                                       if (!t3lib_utility_Math::canBeInterpretedAsInteger($id)) {
                                                                list($idPartR) = t3lib_BEfunc::getRecordsByField('pages','alias',$id);
                                                                $id=intval($idPartR['uid']);
                                                        }
@@ -2727,7 +2727,7 @@ class browse_links {
                                        }
                                }
                        } else {        // Email link:
-                               if (strtolower(substr($href,0,7))=='mailto:')   {
+                               if (strtolower(substr($href,0,7))=='mailto:') {
                                        $info['value']=trim(substr($href,7));
                                        $info['act']='mail';
                                }
@@ -2787,7 +2787,7 @@ class browse_links {
                                                <td class="c-wCell c-hCell">';
 
                        // Traverse the number of upload fields (default is 3):
-               for ($a=1;$a<=$count;$a++)      {
+               for ($a=1;$a<=$count;$a++) {
                        $code.='<input type="file" multiple="multiple" name="upload_'.$a.'"'.$this->doc->formWidth(35).' size="50" />
                                <input type="hidden" name="file[upload]['.$a.'][target]" value="'.htmlspecialchars($folderObject->getCombinedIdentifier()).'" />
                                <input type="hidden" name="file[upload]['.$a.'][data]" value="'.$a.'" /><br />';
index b85625b..31e4e5f 100644 (file)
@@ -123,7 +123,7 @@ class recordList extends t3lib_recordList {
         * @param       integer         Limit of records to be listed.
         * @return      void
         */
-       function start($id,$table,$pointer,$search="",$levels="",$showLimit=0)  {
+       function start($id,$table,$pointer,$search="",$levels="",$showLimit=0) {
 
                        // Setting internal variables:
                $this->id=intval($id);                                  // sets the parent id
@@ -143,7 +143,7 @@ class recordList extends t3lib_recordList {
                $this->displayFields = t3lib_div::_GP('displayFields');
                $this->duplicateField = t3lib_div::_GP('duplicateField');
 
-               if (t3lib_div::_GP('justLocalized'))    {
+               if (t3lib_div::_GP('justLocalized')) {
                        $this->localizationRedirect(t3lib_div::_GP('justLocalized'));
                }
 
@@ -201,7 +201,7 @@ class recordList extends t3lib_recordList {
                }
 
                        // Initialize languages:
-               if ($this->localizationView)    {
+               if ($this->localizationView) {
                        $this->initializeLanguages();
                }
        }
@@ -213,7 +213,7 @@ class recordList extends t3lib_recordList {
         *
         * @return      void
         */
-       function generateList() {
+       function generateList() {
 
                        // Set page record in header
                $this->pageRecord = t3lib_BEfunc::getRecordWSOL('pages',$this->id);
@@ -242,7 +242,7 @@ class recordList extends t3lib_recordList {
                                }
 
                                        // iLimit is set depending on whether we're in single- or multi-table mode
-                               if ($this->table)       {
+                               if ($this->table) {
                                        $this->iLimit= (isset($GLOBALS['TCA'][$tableName]['interface']['maxSingleDBListItems'])
                                                ? intval($GLOBALS['TCA'][$tableName]['interface']['maxSingleDBListItems']) :
                                                $this->itemsLimitSingleTable);
@@ -254,13 +254,13 @@ class recordList extends t3lib_recordList {
                                if ($this->showLimit)   $this->iLimit = $this->showLimit;
 
                                        // Setting fields to select:
-                               if ($this->allFields)   {
+                               if ($this->allFields) {
                                        $fields = $this->makeFieldList($tableName);
                                        $fields[]='tstamp';
                                        $fields[]='crdate';
                                        $fields[]='_PATH_';
                                        $fields[]='_CONTROL_';
-                                       if (is_array($this->setFields[$tableName]))     {
+                                       if (is_array($this->setFields[$tableName])) {
                                                $fields = array_intersect($fields,$this->setFields[$tableName]);
                                        } else {
                                                $fields = array();
@@ -270,7 +270,7 @@ class recordList extends t3lib_recordList {
                                }
 
                                        // Find ID to use (might be different for "versioning_followPages" tables)
-                               if (intval($this->searchLevels)==0)     {
+                               if (intval($this->searchLevels)==0) {
                                        if ($GLOBALS['TCA'][$tableName]['ctrl']['versioning_followPages'] && $this->pageRecord['_ORIG_pid'] == -1
                                                && $this->pageRecord['t3ver_swapmode'] == 0) {
                                                $this->pidSelect = 'pid='.intval($this->pageRecord['_ORIG_uid']);
@@ -291,11 +291,11 @@ class recordList extends t3lib_recordList {
         * @param       boolean         If TRUE, the search box is wrapped in its own form-tags
         * @return      string          HTML for the search box
         */
-       function getSearchBox($formFields=1)    {
+       function getSearchBox($formFields=1) {
 
                        // Setting form-elements, if applicable:
                $formElements=array('','');
-               if ($formFields)        {
+               if ($formFields) {
                        $formElements = array('<form action="' . htmlspecialchars($this->listURL('', -1, 'firstElementNumber')) . '" method="post">', '</form>');
                }
 
@@ -337,7 +337,7 @@ class recordList extends t3lib_recordList {
         *
         * @return      string          HTML for the sys-notes (if any)
         */
-       function showSysNotesForPage()  {
+       function showSysNotesForPage() {
                $out='';
 
                        // Checking if extension is loaded:
@@ -350,7 +350,7 @@ class recordList extends t3lib_recordList {
                $dbCount = $GLOBALS['TYPO3_DB']->sql_num_rows($result);
 
                        // If some notes were found, render them:
-               if ($dbCount)   {
+               if ($dbCount) {
                        $cat = array();
 
                                // Load full table description:
@@ -365,7 +365,7 @@ class recordList extends t3lib_recordList {
                        }
 
                                // For each note found, make rendering:
-                       while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))    {
+                       while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
 
                                        // Create content:
                                $iconImg = t3lib_iconWorks::getSpriteIconForRecord('sys_note', $row);
@@ -413,13 +413,13 @@ class recordList extends t3lib_recordList {
         *
         * @return      void
         */
-       function setDispFields()        {
+       function setDispFields() {
 
                        // Getting from session:
                $dispFields = $GLOBALS['BE_USER']->getModuleData('list/displayFields');
 
                        // If fields has been inputted, then set those as the value and push it to session variable:
-               if (is_array($this->displayFields))     {
+               if (is_array($this->displayFields)) {
                        reset($this->displayFields);
                        $tKey = key($this->displayFields);
                        $dispFields[$tKey]=$this->displayFields[$tKey];
@@ -438,7 +438,7 @@ class recordList extends t3lib_recordList {
         * @param string $field Field name for which thumbsnail are to be rendered.
         * @return string HTML for thumbnails, if any.
         */
-       function thumbCode($row, $table, $field)        {
+       function thumbCode($row, $table, $field) {
                return t3lib_BEfunc::thumbCode($row, $table, $field, $this->backPath);
        }
 
@@ -451,7 +451,7 @@ class recordList extends t3lib_recordList {
         * @param       string          Field list to select, * for all (for "SELECT [fieldlist] FROM ...")
         * @return      array           Returns query array
         */
-       function makeQueryArray($table, $id, $addWhere='', $fieldList='*')      {
+       function makeQueryArray($table, $id, $addWhere='', $fieldList='*') {
                $hookObjectsArr = array();
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list.inc']['makeQueryArray'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list.inc']['makeQueryArray'] as $classRef) {
@@ -463,8 +463,8 @@ class recordList extends t3lib_recordList {
                $orderBy = ($GLOBALS['TCA'][$table]['ctrl']['sortby']
                        ? 'ORDER BY ' . $GLOBALS['TCA'][$table]['ctrl']['sortby']
                        : $GLOBALS['TCA'][$table]['ctrl']['default_sortby']);
-               if ($this->sortField)   {
-                       if (in_array($this->sortField,$this->makeFieldList($table,1)))  {
+               if ($this->sortField) {
+                       if (in_array($this->sortField,$this->makeFieldList($table,1))) {
                                $orderBy = 'ORDER BY '.$this->sortField;
                                if ($this->sortRev)     $orderBy.=' DESC';
                        }
@@ -525,7 +525,7 @@ class recordList extends t3lib_recordList {
         * @return      void
         * @see makeQueryArray()
         */
-       function setTotalItems($queryParts)     {
+       function setTotalItems($queryParts) {
                $this->totalItems = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows(
                        '*',
                        $queryParts['FROM'],
@@ -560,7 +560,7 @@ class recordList extends t3lib_recordList {
                                                'uid=' . $this->searchString
                                        );
 
-                                       foreach($searchableFields as $fieldName)        {
+                                       foreach($searchableFields as $fieldName) {
                                                if (isset($GLOBALS['TCA'][$table]['columns'][$fieldName])) {
                                                        $fieldConfig = &$GLOBALS['TCA'][$table]['columns'][$fieldName]['config'];
                                                        if ($fieldConfig['type'] == 'input' && $fieldConfig['eval'] && t3lib_div::inList($fieldConfig['eval'], 'int')) {
@@ -627,14 +627,14 @@ class recordList extends t3lib_recordList {
                }
 
                        // Call hook to add or change the list
-               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['mod_list']['getSearchFieldList']))      {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['mod_list']['getSearchFieldList'])) {
                        $hookParameters = array(
                                'tableHasSearchConfiguration' => $fieldListWasSet,
                                'tableName' => $tableName,
                                'searchFields' => &$fieldArray,
                                'searchString' => $this->searchString
                        );
-                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['mod_list']['getSearchFieldList'] as $hookFunction)  {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['mod_list']['getSearchFieldList'] as $hookFunction) {
                                t3lib_div::callUserFunction($hookFunction, $hookParameters, $this);
                        }
                }
@@ -650,8 +650,8 @@ class recordList extends t3lib_recordList {
         * @param       string          Table label
         * @return      string          The linked table label
         */
-       function linkWrapTable($table,$code)    {
-               if ($this->table!=$table)       {
+       function linkWrapTable($table,$code) {
+               if ($this->table!=$table) {
                        return '<a href="' . htmlspecialchars($this->listURL('', $table, 'firstElementNumber')) . '">' . $code . '</a>';
                } else {
                        return '<a href="' . htmlspecialchars($this->listURL('', '', 'sortField,sortRev,table,firstElementNumber')) . '">' . $code . '</a>';
@@ -667,7 +667,7 @@ class recordList extends t3lib_recordList {
         * @param       array           Item row
         * @return      string          The item title. Ready for HTML output (is htmlspecialchars()'ed)
         */
-       function linkWrapItems($table,$uid,$code,$row)  {
+       function linkWrapItems($table,$uid,$code,$row) {
                $origCode = $code;
 
                        // If the title is blank, make a "no title" label:
@@ -680,10 +680,10 @@ class recordList extends t3lib_recordList {
                        }
                }
 
-               switch((string)$this->clickTitleMode)   {
+               switch((string)$this->clickTitleMode) {
                        case 'edit':
                                        // If the listed table is 'pages' we have to request the permission settings for each page:
-                               if ($table=='pages')    {
+                               if ($table=='pages') {
                                        $localCalcPerms = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::getRecord('pages',$row['uid']));
                                        $permsEdit = $localCalcPerms&2;
                                } else {
@@ -691,7 +691,7 @@ class recordList extends t3lib_recordList {
                                }
 
                                        // "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
-                               if ($permsEdit) {
+                               if ($permsEdit) {
                                        $params='&edit['.$table.']['.$row['uid'].']=edit';
                                        $code = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $this->backPath, -1)) .
                                                '" title="' . $GLOBALS['LANG']->getLL('edit', 1) . '">' .
@@ -701,7 +701,7 @@ class recordList extends t3lib_recordList {
                        break;
                        case 'show':
                                        // "Show" link (only pages and tt_content elements)
-                               if ($table=='pages' || $table=='tt_content')    {
+                               if ($table=='pages' || $table=='tt_content') {
                                        $code = '<a href="#" onclick="'. htmlspecialchars(t3lib_BEfunc::viewOnClick(
                                                        $table == 'tt_content' ? $this->id . '#' . $row['uid'] : $row['uid'])
                                                ) . '" title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '">'.
@@ -717,7 +717,7 @@ class recordList extends t3lib_recordList {
                        break;
                        default:
                                        // Output the label now:
-                               if ($table=='pages')    {
+                               if ($table=='pages') {
                                        $code = '<a href="' . htmlspecialchars($this->listURL($uid, '', 'firstElementNumber')) . '" onclick="setHighlight(' . $uid . ')">' . $code . '</a>';
                                } else {
                                        $code = $this->linkUrlMail($code,$origCode);
@@ -735,16 +735,16 @@ class recordList extends t3lib_recordList {
         * @param       string          String which is tested for being a URL or email and which will be used for the link if so.
         * @return      string          Link-Wrapped $code value, if $testString was URL or email.
         */
-       function linkUrlMail($code,$testString) {
+       function linkUrlMail($code,$testString) {
 
                        // Check for URL:
                $schema = parse_url($testString);
-               if ($schema['scheme'] && t3lib_div::inList('http,https,ftp',$schema['scheme'])) {
+               if ($schema['scheme'] && t3lib_div::inList('http,https,ftp',$schema['scheme'])) {
                        return '<a href="'.htmlspecialchars($testString).'" target="_blank">'.$code.'</a>';
                }
 
                        // Check for email:
-               if (t3lib_div::validEmail($testString)) {
+               if (t3lib_div::validEmail($testString)) {
                        return '<a href="mailto:'.htmlspecialchars($testString).'" target="_blank">'.$code.'</a>';
                }
 
@@ -762,7 +762,7 @@ class recordList extends t3lib_recordList {
         * @param       string          Commalist of fields NOT to include ("sortField", "sortRev" or "firstElementNumber")
         * @return      string          URL
         */
-       function listURL($altId='',$table=-1,$exclList='')      {
+       function listURL($altId='',$table=-1,$exclList='') {
                $urlParameters = array();
                if (strcmp($altId, '')) {
                        $urlParameters['id'] = $altId;
@@ -807,7 +807,7 @@ class recordList extends t3lib_recordList {
         *
         * @return      string          Content of ->listURL()
         */
-       function requestUri()   {
+       function requestUri() {
                return $this->listURL();
        }
 
@@ -819,7 +819,7 @@ class recordList extends t3lib_recordList {
         * @param       boolean         If set, also adds crdate and tstamp fields (note: they will also be added if user is admin or dontCheckUser is set)
         * @return      array           Array, where values are fieldnames to include in query
         */
-       function makeFieldList($table,$dontCheckUser=0,$addDateFields=0)        {
+       function makeFieldList($table,$dontCheckUser=0,$addDateFields=0) {
 
                        // Init fieldlist array:
                $fieldListArr = array();
@@ -869,7 +869,7 @@ class recordList extends t3lib_recordList {
                                                $fieldListArr[]='t3ver_id';
                                                $fieldListArr[]='t3ver_state';
                                                $fieldListArr[]='t3ver_wsid';
-                                               if ($table==='pages')   {
+                                               if ($table==='pages') {
                                                        $fieldListArr[]='t3ver_swapmode';
                                                }
                                        }
@@ -893,12 +893,12 @@ class recordList extends t3lib_recordList {
         * @param       string          Select clause
         * @return      object          t3lib_pageTree instance with created list of ids.
         */
-       function getTreeObject($id,$depth,$perms_clause)        {
+       function getTreeObject($id,$depth,$perms_clause) {
                $tree = t3lib_div::makeInstance('t3lib_pageTree');
                $tree->init('AND '.$perms_clause);
                $tree->makeHTML=0;
                $tree->fieldArray = Array('uid','php_tree_stop');
-               if ($depth)     {
+               if ($depth) {
                        $tree->getTree($id, $depth, '');
                }
                $tree->ids[]=$id;
@@ -911,7 +911,7 @@ class recordList extends t3lib_recordList {
         * @param       string          string with table, orig uid and language separated by ":"
         * @return      void
         */
-       function localizationRedirect($justLocalized)   {
+       function localizationRedirect($justLocalized) {
                list($table,$orig_uid,$language) = explode(':',$justLocalized);
 
                if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['languageField']
@@ -925,7 +925,7 @@ class recordList extends t3lib_recordList {
                                                t3lib_BEfunc::versioningPlaceholderClause($table)
                                );
 
-                       if (is_array($localizedRecord)) {
+                       if (is_array($localizedRecord)) {
                                        // Create parameters and finally run the classic page module for creating a new page translation
                                $url = substr($this->listURL(), strlen($this->backPath));
                                $params = '&edit['.$table.']['.$localizedRecord['uid'].']=edit';
index cd30c12..fa5121f 100644 (file)
@@ -127,7 +127,7 @@ class localRecordList extends recordList {
                $localCalcPerms = $GLOBALS['BE_USER']->calcPerms($this->pageRow);
 
                        // CSH
-               if (!strlen($this->id)) {
+               if (!strlen($this->id)) {
                        $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_noId', $GLOBALS['BACK_PATH'], '', TRUE);
                } elseif(!$this->id) {
                        $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_root', $GLOBALS['BACK_PATH'], '', TRUE);
@@ -158,7 +158,7 @@ class localRecordList extends recordList {
                        }
 
                                // If edit permissions are set (see class.t3lib_userauthgroup.php)
-                       if ($localCalcPerms&2 && !empty($this->id))     {
+                       if ($localCalcPerms&2 && !empty($this->id)) {
 
                                        // Edit
                                $params = '&edit[pages][' . $this->pageRow['uid'] . ']=edit';
@@ -228,7 +228,7 @@ class localRecordList extends recordList {
         * @param       string          List of fields to show in the listing. Pseudo fields will be added including the record header.
         * @return      string          HTML table with the listing for the record.
         */
-       function getTable($table,$id,$rowlist)  {
+       function getTable($table,$id,$rowlist) {
                        // Loading all TCA details for this table:
                t3lib_div::loadTCA($table);
 
@@ -284,7 +284,7 @@ class localRecordList extends recordList {
 
                        // Cleaning up:
                $this->fieldArray=array_unique(array_merge($this->fieldArray, t3lib_div::trimExplode(',', $rowlist, 1)));
-               if ($this->noControlPanels)     {
+               if ($this->noControlPanels) {
                        $tempArray = array_flip($this->fieldArray);
                        unset($tempArray['_CONTROL_']);
                        unset($tempArray['_CLIPBOARD_']);
@@ -395,7 +395,7 @@ class localRecordList extends recordList {
                $listOnlyInSingleTableMode = $this->listOnlyInSingleTableMode && !$this->table;
 
                        // If the count query returned any number of records, we perform the real query, selecting records.
-               if ($this->totalItems)  {
+               if ($this->totalItems) {
                        // Fetch records only if not in single table mode or if in multi table mode and not collapsed
                        if ($listOnlyInSingleTableMode || (!$this->table && $tableCollapsed)) {
                                $dbCount = $this->totalItems;
@@ -416,7 +416,7 @@ class localRecordList extends recordList {
                                // Half line is drawn between tables:
                        if (!$listOnlyInSingleTableMode) {
                                $theData = Array();
-                               if (!$this->table && !$rowlist) {
+                               if (!$this->table && !$rowlist) {
                                        $theData[$titleCol] = '<img src="clear.gif" width="' . ($GLOBALS['SOBE']->MOD_SETTINGS['bigControlPanel'] ? '230' : '350') . '" height="1" alt="" />';
                                        if (in_array('_CONTROL_', $this->fieldArray))
                                                $theData['_CONTROL_']='';
@@ -441,7 +441,7 @@ class localRecordList extends recordList {
                                        ($this->table ? t3lib_iconWorks::getSpriteIcon('actions-view-table-collapse', array('title' => $GLOBALS['LANG']->getLL('contractView', TRUE))) : t3lib_iconWorks::getSpriteIcon('actions-view-table-expand', array('title' => $GLOBALS['LANG']->getLL('expandView', TRUE)))));
                        }
 
-                       if ($listOnlyInSingleTableMode) {
+                       if ($listOnlyInSingleTableMode) {
                                $out.='
                                        <tr>
                                                <td class="t3-row-header" style="width:95%;">' . t3lib_BEfunc::wrapInHelp($table, '', $theData[$titleCol]) . '</td>
@@ -476,7 +476,7 @@ class localRecordList extends recordList {
                                }
 
                                $accRows = array();     // Accumulate rows here
-                               while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))    {
+                               while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
 
                                        if (!$this->isRowListingConditionFulfilled($table, $row)) {
                                                continue;
@@ -485,11 +485,11 @@ class localRecordList extends recordList {
                                                // In offline workspace, look for alternative record:
                                        t3lib_BEfunc::workspaceOL($table, $row, $GLOBALS['BE_USER']->workspace, TRUE);
 
-                                       if (is_array($row))     {
+                                       if (is_array($row)) {
                                                $accRows[] = $row;
                                                $currentIdList[] = $row['uid'];
-                                               if ($doSort)    {
-                                                       if ($prevUid)   {
+                                               if ($doSort) {
+                                                       if ($prevUid) {
                                                                $this->currentTable['prev'][$row['uid']] = $prevPrevUid;
                                                                $this->currentTable['next'][$prevUid] = '-'.$row['uid'];
                                                                $this->currentTable['prevUid'][$row['uid']] = $prevUid;
@@ -626,7 +626,7 @@ class localRecordList extends recordList {
                        $this->id = $row['pid'];
                }
 
-               if (is_array($row))     {
+               if (is_array($row)) {
                                // add special classes for first and last row
                        $rowSpecial = '';
                        if ($cc == 1 && $indent == 0) {
@@ -657,7 +657,7 @@ class localRecordList extends recordList {
 
                                // Preparing and getting the data-array
                        $theData = Array();
-                       foreach($this->fieldArray as $fCol)     {
+                       foreach($this->fieldArray as $fCol) {
                                if ($fCol == $titleCol) {
                                        $recTitle = t3lib_BEfunc::getRecordTitle($table, $row, FALSE, TRUE);
                                                // If the record is edit-locked by another user, we will show a little warning sign:
@@ -779,12 +779,12 @@ class localRecordList extends recordList {
                $theData = Array();
 
                        // Traverse the fields:
-               foreach($this->fieldArray as $fCol)     {
+               foreach($this->fieldArray as $fCol) {
 
                                // Calculate users permissions to edit records in the table:
                        $permsEdit = $this->calcPerms & ($table=='pages' ? 2 : 16);
 
-                       switch((string)$fCol)   {
+                       switch((string)$fCol) {
                                case '_PATH_':                  // Path
                                        $theData[$fCol] = '<i>[' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels._PATH_', 1) . ']</i>';
                                        break;
@@ -802,7 +802,7 @@ class localRecordList extends recordList {
 
                                                // If there are elements on the clipboard for this table, then display the "paste into" icon:
                                        $elFromTable = $this->clipObj->elFromTable($table);
-                                       if (count($elFromTable))        {
+                                       if (count($elFromTable)) {
                                                $cells['pasteAfter'] = '<a href="' . htmlspecialchars($this->clipObj->pasteUrl($table, $this->id)) .
                                                        '" onclick="' . htmlspecialchars('return ' . $this->clipObj->confirmMsg('pages', $this->pageRow, 'into' ,$elFromTable)) .
                                                        '" title="' . $GLOBALS['LANG']->getLL('clip_paste', TRUE) . '">' .
@@ -810,7 +810,7 @@ class localRecordList extends recordList {
                                        }
 
                                                // If the numeric clipboard pads are enabled, display the control icons for that:
-                                       if ($this->clipObj->current!='normal')  {
+                                       if ($this->clipObj->current!='normal') {
 
                                                        // The "select" link:
                                                $cells['copyMarked'] = $this->linkClipboardHeaderIcon(
@@ -859,7 +859,7 @@ class localRecordList extends recordList {
                                         */
 
                                        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'])) {
-                                               foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'] as $classData)    {
+                                               foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'] as $classData) {
                                                        $hookObject = t3lib_div::getUserObj($classData);
                                                        if (!($hookObject instanceof localRecordList_actionsHook)) {
                                                                throw new UnexpectedValueException('$hookObject must implement interface localRecordList_actionsHook', 1195567850);
@@ -883,7 +883,7 @@ class localRecordList extends recordList {
                                                                $icon = '<a href="#" onclick="' . htmlspecialchars('return jumpExt(\'' . $newContentWizScriptPath . '?id=' . $this->id . '\');') . '" title="' . $GLOBALS['LANG']->getLL('new', TRUE) . '">' .
                                                                                ($table == 'pages' ? t3lib_iconWorks::getSpriteIcon('actions-page-new') : t3lib_iconWorks::getSpriteIcon('actions-document-new')) .
                                                                                '</a>';
-                                                       } elseif ($table=='pages' && $this->newWizards) {
+                                                       } elseif ($table=='pages' && $this->newWizards) {
                                                                $icon = '<a href="' . htmlspecialchars($this->backPath . 'db_new.php?id=' . $this->id . '&pagesOnly=1&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '" title="' . $GLOBALS['LANG']->getLL('new', TRUE) . '">'.
                                                                                ($table=='pages' ? t3lib_iconWorks::getSpriteIcon('actions-page-new') : t3lib_iconWorks::getSpriteIcon('actions-document-new')) .
                                                                                '</a>';
@@ -900,7 +900,7 @@ class localRecordList extends recordList {
                                                }
 
                                                        // If the table can be edited, add link for editing ALL SHOWN fields for all listed records:
-                                               if ($permsEdit && $this->table && is_array($currentIdList))     {
+                                               if ($permsEdit && $this->table && is_array($currentIdList)) {
                                                        $editIdList = implode(',', $currentIdList);
                                                        if ($this->clipNumPane())
                                                                $editIdList = "'+editList('" . $table . "','" . $editIdList . "')+'";
@@ -952,7 +952,7 @@ class localRecordList extends recordList {
                 * @request             Bernhard Kraft  <krafbt@kraftb.at>
                 * @usage               Above each listed table in Web>List a header row is shown. Containing the labels of all shown fields and additional icons to create new records for this table or perform special clipboard tasks like mark and copy all listed records to clipboard, etc.
                 */
-               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions']))    {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'])) {
                        foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'] as $classData) {
                                $hookObject = t3lib_div::getUserObj($classData);
                                if (!($hookObject instanceof localRecordList_actionsHook)) {
@@ -1125,7 +1125,7 @@ class localRecordList extends recordList {
                $cells = array();
 
                        // If the listed table is 'pages' we have to request the permission settings for each page:
-               if ($table=='pages')    {
+               if ($table=='pages') {
                        $localCalcPerms = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::getRecord('pages',$row['uid']));
                }
 
@@ -1133,7 +1133,7 @@ class localRecordList extends recordList {
                $permsEdit = ($table=='pages' && ($localCalcPerms&2)) || ($table!='pages' && ($this->calcPerms&16));
 
                        // "Show" link (only pages and tt_content elements)
-               if ($table=='pages' || $table=='tt_content')    {
+               if ($table=='pages' || $table=='tt_content') {
                        $params='&edit['.$table.']['.$row['uid'].']=edit';
                        $cells['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick(
                                        $table=='tt_content' ? $this->id . '#' . $row['uid'] : $row['uid'],
@@ -1145,7 +1145,7 @@ class localRecordList extends recordList {
                }
 
                        // "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
-               if ($permsEdit) {
+               if ($permsEdit) {
                        $params='&edit['.$table.']['.$row['uid'].']=edit';
                        $cells['edit'] = '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params, $this->backPath, -1)) .
                                '" title="' . $GLOBALS['LANG']->getLL('edit', TRUE) . '">' .
@@ -1156,7 +1156,7 @@ class localRecordList extends recordList {
                }
 
                        // "Move" wizard link for pages/tt_content elements:
-               if (($table=="tt_content" && $permsEdit) || ($table=='pages'))  {
+               if (($table=="tt_content" && $permsEdit) || ($table=='pages')) {
                        $cells['move'] = '<a href="#" onclick="' .
                                htmlspecialchars(
                                        'return jumpExt(\'' . $this->backPath . 'move_el.php?table=' . $table . '&uid='.$row['uid'] . '\');'
@@ -1168,7 +1168,7 @@ class localRecordList extends recordList {
                }
 
                        // If the extended control panel is enabled OR if we are seeing a single table:
-               if ($GLOBALS['SOBE']->MOD_SETTINGS['bigControlPanel'] || $this->table)  {
+               if ($GLOBALS['SOBE']->MOD_SETTINGS['bigControlPanel'] || $this->table) {
 
                                // "Info": (All records)
                        $cells['viewBig'] = '<a href="#" onclick="' . htmlspecialchars(
@@ -1205,7 +1205,7 @@ class localRecordList extends recordList {
                                }
 
                                        // "Edit Perms" link:
-                               if ($table == 'pages' && $GLOBALS['BE_USER']->check('modules','web_perm') && t3lib_extMgm::isLoaded('perm'))    {
+                               if ($table == 'pages' && $GLOBALS['BE_USER']->check('modules','web_perm') && t3lib_extMgm::isLoaded('perm')) {
                                        $cells['perms'] =
                                                '<a href="' .
                                                        htmlspecialchars(
@@ -1226,7 +1226,7 @@ class localRecordList extends recordList {
                                                ($table!='pages' && ($this->calcPerms&16)) ||   // For NON-pages, must have permission to edit content on this parent page
                                                ($table=='pages' && ($this->calcPerms&8))               // For pages, must have permission to create new pages here.
                                                )       {
-                                               if ($this->showNewRecLink($table))      {
+                                               if ($this->showNewRecLink($table)) {
                                                        $params='&edit['.$table.']['.(-($row['_MOVE_PLH']?$row['_MOVE_PLH_uid']:$row['uid'])).']=new';
                                                        $cells['new'] = '<a href="#" onclick="' . htmlspecialchars(
                                                                t3lib_BEfunc::editOnClick($params, $this->backPath, -1)) .
@@ -1267,7 +1267,7 @@ class localRecordList extends recordList {
                                        // "Hide/Unhide" links:
                                $hiddenField = $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'];
                                if ($permsEdit && $hiddenField && $GLOBALS['TCA'][$table]['columns'][$hiddenField] && (!$GLOBALS['TCA'][$table]['columns'][$hiddenField]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields', $table . ':' . $hiddenField))) {
-                                       if ($row[$hiddenField]) {
+                                       if ($row[$hiddenField]) {
                                                $params = '&data[' . $table . '][' . $rowUid . '][' . $hiddenField . ']=0';
                                                $cells['hide']='<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '" title="'.$GLOBALS['LANG']->getLL('unHide' . ($table == 'pages' ? 'Page' : ''), TRUE) . '">' .
                                                                        t3lib_iconWorks::getSpriteIcon('actions-edit-unhide') .
@@ -1305,19 +1305,19 @@ class localRecordList extends recordList {
                                }
 
                                        // "Levels" links: Moving pages into new levels...
-                               if ($permsEdit && $table=='pages' && !$this->searchLevels)      {
+                               if ($permsEdit && $table=='pages' && !$this->searchLevels) {
 
                                                // Up (Paste as the page right after the current parent page)
-                                       if ($this->calcPerms&8) {
+                                       if ($this->calcPerms&8) {
                                                $params='&cmd['.$table.']['.$row['uid'].'][move]='.-$this->id;
                                                $cells['moveLeft'] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '" title="' . $GLOBALS['LANG']->getLL('prevLevel', TRUE) . '">' .
                                                                        t3lib_iconWorks::getSpriteIcon('actions-move-left') .
                                                                '</a>';
                                        }
                                                // Down (Paste as subpage to the page right above)
-                                       if ($this->currentTable['prevUid'][$row['uid']])        {
+                                       if ($this->currentTable['prevUid'][$row['uid']]) {
                                                $localCalcPerms = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::getRecord('pages',$this->currentTable['prevUid'][$row['uid']]));
-                                               if ($localCalcPerms&8)  {
+                                               if ($localCalcPerms&8) {
                                                        $params='&cmd['.$table.']['.$row['uid'].'][move]='.$this->currentTable['prevUid'][$row['uid']];
                                                        $cells['moveRight'] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '" title="' . $GLOBALS['LANG']->getLL('nextLevel', TRUE) . '">' .
                                                                                t3lib_iconWorks::getSpriteIcon('actions-move-right') .
@@ -1341,10 +1341,10 @@ class localRecordList extends recordList {
                 * @date                        2007-09-22
                 * @request             Kasper Skårhøj  <kasper2007@typo3.com>
                 */
-               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks']))  {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'])) {
                        $stat='';
                        $_params = array($table,$row['uid']);
-                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'] as $_funcRef)  {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'] as $_funcRef) {
                                $stat.=t3lib_div::callUserFunction($_funcRef,$_params,$this);
                        }
                        $cells['stat'] = $stat;
@@ -1358,7 +1358,7 @@ class localRecordList extends recordList {
                if(is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'])) {
                        foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'] as $classData) {
                                $hookObject = t3lib_div::getUserObj($classData);
-                               if(!($hookObject instanceof localRecordList_actionsHook))       {
+                               if(!($hookObject instanceof localRecordList_actionsHook)) {
                                        throw new UnexpectedValueException('$hookObject must implement interface localRecordList_actionsHook', 1195567840);
                                }
                                $cells = $hookObject->makeControl($table, $row, $cells, $this);
@@ -1378,7 +1378,7 @@ class localRecordList extends recordList {
         * @param       array           The record for which to make the clipboard panel.
         * @return      string          HTML table with the clipboard panel (unless disabled)
         */
-       function makeClip($table,$row)  {
+       function makeClip($table,$row) {
                        // Return blank, if disabled:
                if ($this->dontShowClipControlPanels)   return '';
                $cells=array();
@@ -1409,9 +1409,9 @@ class localRecordList extends recordList {
                        $checked = ($this->clipObj->isSelected($table,$row['uid'])?' checked="checked"':'');
 
                                // If the "duplicateField" value is set then select all elements which are duplicates...
-                       if ($this->duplicateField && isset($row[$this->duplicateField]))        {
+                       if ($this->duplicateField && isset($row[$this->duplicateField])) {
                                $checked='';
-                               if (in_array($row[$this->duplicateField], $this->duplicateStack))       {
+                               if (in_array($row[$this->duplicateField], $this->duplicateStack)) {
                                        $checked=' checked="checked"';
                                }
                                $this->duplicateStack[] = $row[$this->duplicateField];
@@ -1432,7 +1432,7 @@ class localRecordList extends recordList {
 
                        // Now, looking for elements in general:
                $elFromTable = $this->clipObj->elFromTable('');
-               if ($table=='pages' && count($elFromTable))     {
+               if ($table=='pages' && count($elFromTable)) {
                        $cells['pasteInto'] = '<a href="' . htmlspecialchars($this->clipObj->pasteUrl('', $row['uid'])) . '" onclick="' . htmlspecialchars('return ' . $this->clipObj->confirmMsg($table, $row, 'into', $elFromTable)) . '" title="' . $GLOBALS['LANG']->getLL('clip_pasteInto', TRUE) . '">' .
                                                t3lib_iconWorks::getSpriteIcon('actions-document-paste-into') .
                                        '</a>';
@@ -1447,7 +1447,7 @@ class localRecordList extends recordList {
                if(is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'])) {
                        foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions'] as $classData) {
                                $hookObject = t3lib_div::getUserObj($classData);
-                               if(!($hookObject instanceof localRecordList_actionsHook))       {
+                               if(!($hookObject instanceof localRecordList_actionsHook)) {
                                        throw new UnexpectedValueException('$hookObject must implement interface localRecordList_actionsHook', 1195567845);
                                }
                                $cells = $hookObject->makeClip($table, $row, $cells, $this);
@@ -1518,7 +1518,7 @@ class localRecordList extends recordList {
         * @param       array           The record for which to make the localization panel.
         * @return      array           Array with key 0/1 with content for column 1 and 2
         */
-       function makeLocalizationPanel($table,$row)     {
+       function makeLocalizationPanel($table,$row) {
                $out = array(
                        0 => '',
                        1 => '',
@@ -1530,12 +1530,12 @@ class localRecordList extends recordList {
                        // Language title and icon:
                $out[0] = $this->languageFlag($row[$GLOBALS['TCA'][$table]['ctrl']['languageField']]);
 
-               if (is_array($translations))    {
+               if (is_array($translations)) {
 
                                // Traverse page translations and add icon for each language that does NOT yet exist:
                        $lNew = '';
-                       foreach($this->pageOverlays as $lUid_OnPage => $lsysRec)        {
-                               if (!isset($translations['translations'][$lUid_OnPage]) && $GLOBALS['BE_USER']->checkLanguageAccess($lUid_OnPage))      {
+                       foreach($this->pageOverlays as $lUid_OnPage => $lsysRec) {
+                               if (!isset($translations['translations'][$lUid_OnPage]) && $GLOBALS['BE_USER']->checkLanguageAccess($lUid_OnPage)) {
                                        $url = substr($this->listURL(), strlen($this->backPath));
                                        $href = $GLOBALS['SOBE']->doc->issueCommand(
                                                '&cmd[' . $table . '][' . $row['uid'] . '][localize]=' . $lUid_OnPage,
@@ -1569,12 +1569,12 @@ class localRecordList extends recordList {
         * @param       boolean         If TRUE, form-fields will be wrapped around the table.
         * @return      string          HTML table with the selector box (name: displayFields['.$table.'][])
         */
-       function fieldSelectBox($table,$formFields=1)   {
+       function fieldSelectBox($table,$formFields=1) {
 
                        // Init:
                t3lib_div::loadTCA($table);
                $formElements=array('','');
-               if ($formFields)        {
+               if ($formFields) {
                        $formElements=array('<form action="'.htmlspecialchars($this->listURL()).'" method="post">','</form>');
                }
 
@@ -1594,7 +1594,7 @@ class localRecordList extends recordList {
                        // Create an option for each field:
                $opt=array();
                $opt[] = '<option value=""></option>';
-               foreach($fields as $fN) {
+               foreach($fields as $fN) {
                                // Field label
                        $fL = (is_array($GLOBALS['TCA'][$table]['columns'][$fN])
                                ? rtrim($GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['columns'][$fN]['label']), ':')
@@ -1652,7 +1652,7 @@ class localRecordList extends recordList {
         * @param       string          Warning text, if any ("delete" uses this for confirmation)
         * @return      string          <a> tag wrapped link.
         */
-       function linkClipboardHeaderIcon($string,$table,$cmd,$warning='')       {
+       function linkClipboardHeaderIcon($string,$table,$cmd,$warning='') {
                $onClickEvent = 'document.dblistForm.cmd.value=\''.$cmd.'\';document.dblistForm.cmd_table.value=\''.$table.'\';document.dblistForm.submit();';
                if ($warning)   $onClickEvent = 'if (confirm('.$GLOBALS['LANG']->JScharCode($warning).')){'.$onClickEvent.'}';
                return '<a href="#" onclick="'.htmlspecialchars($onClickEvent.'return false;').'">'.$string.'</a>';
@@ -1663,7 +1663,7 @@ class localRecordList extends recordList {
         *
         * @return      boolean
         */
-       function clipNumPane()  {
+       function clipNumPane() {
                return in_Array('_CLIPBOARD_',$this->fieldArray) && $this->clipObj->current!='normal';
        }
 
@@ -1677,7 +1677,7 @@ class localRecordList extends recordList {
         * @param       string          Table name
         * @return      string          Linked $code variable
         */
-       function addSortLink($code,$field,$table)       {
+       function addSortLink($code,$field,$table) {
 
                        // Certain circumstances just return string right away (no links):
                if ($field=='_CONTROL_' || $field=='_LOCALIZATION_' || $field=='_CLIPBOARD_' || $field=='_REF_' || $this->disableSingleTableView)       return $code;
@@ -1702,8 +1702,8 @@ class localRecordList extends recordList {
         * @param       integer         The page id for which to get the path
         * @return      string          The path.
         */
-       function recPath($pid)  {
-               if (!isset($this->recPath_cache[$pid])) {
+       function recPath($pid) {
+               if (!isset($this->recPath_cache[$pid])) {
                        $this->recPath_cache[$pid] = t3lib_BEfunc::getRecordPath($pid,$this->perms_clause,20);
                }
                return $this->recPath_cache[$pid];
@@ -1716,7 +1716,7 @@ class localRecordList extends recordList {
         * @return      boolean         Returns TRUE if a link for creating new records should be displayed for $table
         * @see         SC_db_new::showNewRecLink
         */
-       function showNewRecLink($table) {
+       function showNewRecLink($table) {
                        // No deny/allow tables are set:
                if (!count($this->allowedNewTables) && !count($this->deniedNewTables)) {
                        return TRUE;
@@ -1735,7 +1735,7 @@ class localRecordList extends recordList {
         *
         * @return      string
         */
-       function makeReturnUrl()        {
+       function makeReturnUrl() {
                return '&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
        }
 
@@ -1814,7 +1814,7 @@ class localRecordList extends recordList {
         * @param       array           Array with values to be listed.
         * @return      void
         */
-       function setCsvRow($csvRow)     {
+       function setCsvRow($csvRow) {
                $this->csvLines[] = t3lib_div::csvValues($csvRow);
        }
 
@@ -1825,7 +1825,7 @@ class localRecordList extends recordList {
         * @param       string          Filename prefix:
         * @return      void            EXITS php execusion!
         */
-       function outputCSV($prefix)     {
+       function outputCSV($prefix) {
 
                        // Setting filename:
                $filename=$prefix.'_'.date('dmy-Hi').'.csv';
index d77bac8..28db3aa 100644 (file)
@@ -181,7 +181,7 @@ class fileList extends t3lib_recordList {
         * @param       string          Warning for JS confirm message
         * @return      string          Linked string
         */
-       function linkClipboardHeaderIcon($string,$table,$cmd,$warning='')       {
+       function linkClipboardHeaderIcon($string,$table,$cmd,$warning='') {
                $onClickEvent = 'document.dblistForm.cmd.value=\''.$cmd.'\';document.dblistForm.submit();';
                if ($warning)   $onClickEvent = 'if (confirm('.$GLOBALS['LANG']->JScharCode($warning).')){'.$onClickEvent.'}';
                return '<a href="#" onclick="'.htmlspecialchars($onClickEvent).'return false;">'.$string.'</a>';
@@ -214,7 +214,7 @@ class fileList extends t3lib_recordList {
                                foreach($files as $file) {
                                        $fileObject = $storage->getFile($file['identifier']);
 
-                                       switch ($this->sort)    {
+                                       switch ($this->sort) {
                                                case 'size':
                                                        $sortingKey = $fileObject->getSize();
                                                        break;
@@ -287,17 +287,17 @@ class fileList extends t3lib_recordList {
                        // Header line is drawn
                $theData = array();
 
-               foreach ($this->fieldArray as $v)       {
+               foreach ($this->fieldArray as $v) {
                        if ($v == '_CLIPBOARD_' && $this->clipBoard) {
                                $cells=array();
                                $table='_FILE';
                                $elFromTable = $this->clipObj->elFromTable($table);
-                               if (count($elFromTable))        {
+                               if (count($elFromTable)) {
                                        $cells[] = '<a href="' . htmlspecialchars($this->clipObj->pasteUrl('_FILE',$this->folderObject->getCombinedIdentifier())) . '" onclick="return ' . htmlspecialchars($this->clipObj->confirmMsg('_FILE', $this->path, 'into', $elFromTable)) . '" title="' . $GLOBALS['LANG']->getLL('clip_paste', 1) . '">' .
                                                t3lib_iconWorks::getSpriteIcon('actions-document-paste-after') .
                                        '</a>';
                                }
-                               if ($this->clipObj->current!='normal' && $iOut) {
+                               if ($this->clipObj->current!='normal' && $iOut) {
                                        $cells[]=$this->linkClipboardHeaderIcon(t3lib_iconWorks::getSpriteIcon('actions-edit-copy', array('title' => $GLOBALS['LANG']->getLL('clip_selectMarked', 1))), $table,'setCB');
                                        $cells[]=$this->linkClipboardHeaderIcon(t3lib_iconWorks::getSpriteIcon('actions-edit-delete', array('title' => $GLOBALS['LANG']->getLL('clip_deleteMarked'))), $table,'delete',$GLOBALS['LANG']->getLL('clip_deleteMarkedWarning'));
                                        $onClick = 'checkOffCB(\'' . implode(',', $this->CBnames) . '\', this); return false;';
@@ -467,7 +467,7 @@ class fileList extends t3lib_recordList {
         *
         * @return      string          URL
         */
-       function listURL()      {
+       function listURL() {
                return t3lib_div::linkThisScript(array(
                        'target'    => rawurlencode($this->folderObject->getCombinedIdentifier()),
                        'imagemode' => $this->thumbs
@@ -484,12 +484,12 @@ class fileList extends t3lib_recordList {
                $title = htmlspecialchars($folderObject->getName());
                $icon = 'apps-filetree-folder-default';
 
-               if ($title == '_temp_') {
+               if ($title == '_temp_') {
                        $icon = 'apps-filetree-folder-temp';
                        $title = '<strong>' . $GLOBALS['LANG']->getLL('temp', TRUE) . '</strong>';
                }
 
-               if ($title == '_recycler_')     {
+               if ($title == '_recycler_') {
                        $icon = 'apps-filetree-folder-recycler';
                        $title = '<strong>' . $GLOBALS['LANG']->getLL('recycler', TRUE) . '</strong>';
                }
@@ -532,7 +532,7 @@ class fileList extends t3lib_recordList {
                                        //      Preparing and getting the data-array
                                $theData = array();
                                foreach ($this->fieldArray as $field) {
-                                       switch ($field) {
+                                       switch ($field) {
                                                case 'size':
                                                        $theData[$field] = t3lib_div::formatSize($fileObject->getSize(), $GLOBALS['LANG']->getLL('byteSizeUnits', TRUE));
                                                break;
@@ -590,7 +590,7 @@ class fileList extends t3lib_recordList {
         * @param       string          file extension
         * @return      boolean
         */
-       function isImage($ext)  {
+       function isImage($ext) {
                return t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],strtolower($ext));
        }
 
@@ -602,7 +602,7 @@ class fileList extends t3lib_recordList {
         * @param       string          Sorting column
         * @return      string          HTML
         */
-       function linkWrapSort($code, $folderIdentifier, $col)   {
+       function linkWrapSort($code, $folderIdentifier, $col) {
                if ($this->sort==$col && !$this->sortRev)       {               // reverse sorting
                        $params='&SET[sort]=' . $col . '&SET[reverse]=1';
                } else {
@@ -753,7 +753,7 @@ class fileList extends t3lib_recordList {
                        // Compile information for title tag:
                $infoData=array();
                if (is_array($rows)) {
-                       foreach($rows as $row)  {
+                       foreach($rows as $row) {
                                $infoData[]= $row['tablename'] . ':' . $row['recuid'] . ':' . $row['field'];
                        }
                }
index 37e362f..9160d2e 100644 (file)
@@ -61,7 +61,7 @@ class recordHistory {
         *
         * @return      void
         */
-       function __construct()  {
+       function __construct() {
                        // GPvars:
                $this->element = t3lib_div::_GP('element');
                $this->returnUrl = t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'));
@@ -77,7 +77,7 @@ class recordHistory {
         *
         * @return      HTML            content for the module
         */
-       function main() {
+       function main() {
                $content = '';
 
                        // single-click rollback
@@ -105,7 +105,7 @@ class recordHistory {
                }
 
                        // save snapshot
-               if (t3lib_div::_GP('highlight') && !t3lib_div::_GP('settings')) {
+               if (t3lib_div::_GP('highlight') && !t3lib_div::_GP('settings')) {
                        $this->toggleHighlight(t3lib_div::_GP('highlight'));
                }
 
@@ -121,7 +121,7 @@ class recordHistory {
                                $content .= $this->displayMultipleDiff($completeDiff);
                        }
 
-                       if ($this->element)     {
+                       if ($this->element) {
                                $content .= $this->displayHistory();
                        }
                }
@@ -153,8 +153,8 @@ class recordHistory {
         * @return      void
         * @access private
         */
-       function performRollback($diff) {
-               if (!$this->rollbackFields)     {
+       function performRollback($diff) {
+               if (!$this->rollbackFields) {
                        return 0;
                }
 
@@ -181,7 +181,7 @@ class recordHistory {
                                        break;
                        }
                        if ($data) {
-                               foreach ($data as $key => $action)      {
+                               foreach ($data as $key => $action) {
                                        $elParts = explode(':', $key);
                                        if ($action == 1) {     // inserted records should be deleted
                                                $cmdmapArray[$elParts[0]][$elParts[1]]['delete'] = 1;
@@ -212,7 +212,7 @@ class recordHistory {
                        // PROCESS CHANGES
                        // create an array for process_datamap
                $diff_modified = array();
-               foreach ($diff['oldData'] as $key => $value)    {
+               foreach ($diff['oldData'] as $key => $value) {
                        $splitKey = explode(':', $key);
                        $diff_modified[$splitKey[0]][$splitKey[1]] = $value;
                }
@@ -252,7 +252,7 @@ class recordHistory {
                if ($reloadPageFrame) {
                        return '<script type="text/javascript">
                        /*<![CDATA[*/
-                       if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav)  {
+                       if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav) {
                                top.content.nav_frame.refresh_nav();
                        }
                        /*]]>*/
@@ -271,7 +271,7 @@ class recordHistory {
         *
         * @return      string          HTML code to modify settings
         */
-       function displaySettings()      {
+       function displaySettings() {
                        // get current selection from UC, merge data, write it back to UC
                $currentSelection = is_array($GLOBALS['BE_USER']->uc['moduleData']['history']) ? $GLOBALS['BE_USER']->uc['moduleData']['history'] : array('maxSteps' => '', 'showDiff' => 1, 'showSubElements' => 1, 'showInsertDelete' => 1);
 
@@ -306,7 +306,7 @@ class recordHistory {
 
                        // render selectors
                $displayCode = '';
-               foreach ($selector as $key => $values)  {
+               foreach ($selector as $key => $values) {
                        $displayCode .= '<tr><td>' . $GLOBALS['LANG']->getLL($key, 1) . '</td>';
                        $displayCode .= '<td><select name="settings[' . $key . ']" onChange="document.settings.submit()" style="width:100px">';
                        foreach ($values as $singleKey => $singleVal) {
@@ -317,7 +317,7 @@ class recordHistory {
                }
 
                        // set values correctly
-               if ($currentSelection['maxSteps'] != 'marked')  {
+               if ($currentSelection['maxSteps'] != 'marked') {
                        $this->maxSteps = $currentSelection['maxSteps'] ? intval($currentSelection['maxSteps']) : '';
                } else {
                        $this->showMarked = TRUE;
@@ -330,7 +330,7 @@ class recordHistory {
                $content = '';
                        // get link to page history if the element history is shown
                $elParts = explode(':', $this->element);
-               if ($elParts[0] != 'pages')     {
+               if ($elParts[0] != 'pages') {
                        $content .= '<strong>' . $GLOBALS['LANG']->getLL('elementHistory', 1) . '</strong><br />';
                        $pid = t3lib_BEfunc::getRecordRaw($elParts[0],'uid='.intval($elParts[1]));
                        $content .= $this->linkPage($GLOBALS['LANG']->getLL('elementHistory_link', 1), array('element' => 'pages:' . $pid['pid']));
@@ -345,7 +345,7 @@ class recordHistory {
         *
         * @return      string          HTML for list, wrapped in a table.
         */
-       function displayHistory()       {
+       function displayHistory() {
                $lines = array();
 
                        // Initialize:
@@ -361,7 +361,7 @@ class recordHistory {
 
                        // get default page TSconfig expiration time
                $elParts = explode(':', $this->element);
-               if ($elParts[0] != 'pages')     {
+               if ($elParts[0] != 'pages') {
                        $tmp = t3lib_BEfunc::getRecordRaw($elParts[0], 'uid=' . intval($elParts[1]));
                        $pid = $tmp['pid'];
                } else {
@@ -388,7 +388,7 @@ class recordHistory {
                        }
 
                                // display inconsistency warning
-                       if ($entry['tstamp'] < $expirationTimestamp && !$expirationWarning)     {
+                       if ($entry['tstamp'] < $expirationTimestamp && !$expirationWarning) {
                                $expirationWarning = 1;
 
                                $lines[] = '
@@ -442,7 +442,7 @@ class recordHistory {
 
                                // show link to mark/unmark state
                        if (!$entry['action']) {
-                               if ($entry['snapshot']) {
+                               if ($entry['snapshot']) {
                                        $image = '<img' . t3lib_iconWorks::skinImg('', 'gfx/unmarkstate.gif') . ' align="top" alt="' . $GLOBALS['LANG']->getLL('unmarkState', 1) . '" title="' . $GLOBALS['LANG']->getLL('unmarkState', 1) . '" />';
                                } else {
                                        $image = '<img' . t3lib_iconWorks::skinImg('', 'gfx/markstate.gif') . ' align="top" alt="' . $GLOBALS['LANG']->getLL('markState', 1) . '" title="' . $GLOBALS['LANG']->getLL('markState', 1) . '" />';
@@ -492,14 +492,14 @@ class recordHistory {
         * @param       array           difference array
         * @return      string          HTML output
         */
-       function displayMultipleDiff($diff)     {
+       function displayMultipleDiff($diff) {
                $content = '';
 
                        // get all array keys needed
                $arrayKeys = array_merge(array_keys($diff['newData']),array_keys($diff['insertsDeletes']), array_keys($diff['oldData']));
                $arrayKeys = array_unique($arrayKeys);
 
-               if ($arrayKeys) {
+               if ($arrayKeys) {
                        foreach ($arrayKeys as $key) {
                                $record = '';
                                $elParts = explode(':', $key);
@@ -513,7 +513,7 @@ class recordHistory {
                                }
                                        // build up temporary diff array
                                        // turn around diff because it should be a "rollback preview"
-                               if ($diff['newData'][$key])     {
+                               if ($diff['newData'][$key]) {
                                        $tmpArr['newRecord'] = $diff['oldData'][$key];
                                        $tmpArr['oldRecord'] = $diff['newData'][$key];
                                        $record .= $this->renderDiff($tmpArr, $elParts[0], $elParts[1]);
@@ -566,7 +566,7 @@ class recordHistory {
                                }
                        }
                }
-               if ($lines)     {
+               if ($lines) {
                        $content = '<table border="0" cellpadding="2" cellspacing="2" id="typo3-history-item">
                                        ' . implode('', $lines) . '
                                </table>';
@@ -599,7 +599,7 @@ class recordHistory {
                        $field = $value['tablename'] . ':' . $value['recuid'];
 
                                // inserts / deletes
-                       if ($value['action'])   {
+                       if ($value['action']) {
                                if (!$insertsDeletes[$field]) {
                                        $insertsDeletes[$field] = 0;
                                }
@@ -648,7 +648,7 @@ class recordHistory {
         *
         * @return      [type]          ...
         */
-       function createChangeLog()      {
+       function createChangeLog() {
                $elParts = explode(':', $this->element);
                $changeLog = $this->getHistoryData($elParts[0], $elParts[1]);
 
@@ -753,7 +753,7 @@ class recordHistory {
                                        }
                                        $hisDat = array();
 
-                                       switch ($row['action']) {
+                                       switch ($row['action']) {
                                                case 1: // Insert
                                                        $hisDat['action'] = 'insert';
                                                        break;
@@ -789,7 +789,7 @@ class recordHistory {
         */
        function generateTitle($table, $uid) {
                $out = $table . ':' . $uid;
-               if ($labelField = $GLOBALS['TCA'][$table]['ctrl']['label'])     {
+               if ($labelField = $GLOBALS['TCA'][$table]['ctrl']['label']) {
                        $record = t3lib_BEfunc::getRecordRaw($table, 'uid=' . intval($uid));
                        $out .= ' (' . t3lib_BEfunc::getRecordTitle($table, $record, TRUE) . ')';
                }
@@ -803,7 +803,7 @@ class recordHistory {
         * @param       integer         optional, type of rollback: 0 - ALL; 1 - element; 2 - field
         * @return      string          HTML output
         */
-       function createRollbackLink($key, $alt = '', $type = 0) {
+       function createRollbackLink($key, $alt = '', $type = 0) {
                return $this->linkPage('<img ' . t3lib_iconWorks::skinImg('', 'gfx/revert_' . $type . '.gif', 'width="33" height="33"') . ' alt="' . $alt . '" title="' . $alt . '" align="middle" />', array('rollbackFields' => $key));
        }
 
@@ -860,8 +860,8 @@ class recordHistory {
         * @return      integer         converted UID of record
         */
        function resolveElement($table, $uid) {
-               if (isset($GLOBALS['TCA'][$table]))     {
-                       if ($workspaceVersion = t3lib_BEfunc::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, $table, $uid, 'uid')) {
+               if (isset($GLOBALS['TCA'][$table])) {
+                       if ($workspaceVersion = t3lib_BEfunc::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, $table, $uid, 'uid')) {
                                $uid = $workspaceVersion['uid'];
                        }
                }
index 1fce1f2..01283aa 100644 (file)
@@ -90,9 +90,9 @@ class webPageTree extends t3lib_browseTree {
         * @param       array           Data row for element.
         * @return      string          Page icon
         */
-       function wrapIcon($thePageIcon, &$row)  {
+       function wrapIcon($thePageIcon, &$row) {
                        // If the record is locked, present a warning sign.
-               if ($lockInfo=t3lib_BEfunc::isRecordLocked('pages',$row['uid']))        {
+               if ($lockInfo=t3lib_BEfunc::isRecordLocked('pages',$row['uid'])) {
                        $aOnClick = 'alert('.$GLOBALS['LANG']->JScharCode($lockInfo['msg']).');return false;';
                        $lockIcon='<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
                                t3lib_iconWorks::getSpriteIcon('status-warning-in-use',array('title'=>htmlspecialchars($lockInfo['msg']))).
@@ -100,9 +100,9 @@ class webPageTree extends t3lib_browseTree {
                } else $lockIcon = '';
 
                        // Wrap icon in click-menu link.
-               if (!$this->ext_IconMode)       {
+               if (!$this->ext_IconMode) {
                        $thePageIcon = $GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon($thePageIcon,'pages',$row['uid'],0,'&bank='.$this->bank);
-               } elseif (!strcmp($this->ext_IconMode,'titlelink'))     {
+               } elseif (!strcmp($this->ext_IconMode,'titlelink')) {
                        $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->treeName.'\');';
                        $thePageIcon='<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$thePageIcon.'</a>';
                }
@@ -118,9 +118,9 @@ class webPageTree extends t3lib_browseTree {
 
                        // Call stats information hook
                $stat = '';
-               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks']))  {
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'])) {
                        $_params = array('pages',$row['uid']);
-                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'] as $_funcRef)  {
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'] as $_funcRef) {
                                $stat.=t3lib_div::callUserFunction($_funcRef,$_params,$this);
                        }
                }
@@ -136,8 +136,8 @@ class webPageTree extends t3lib_browseTree {
         * @return      string          Modified string
         * @access private
         */
-       function wrapStop($str,$row)    {
-               if ($row['php_tree_stop'])      {
+       function wrapStop($str,$row) {
+               if ($row['php_tree_stop']) {
                        $str.='<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('setTempDBmount' => $row['uid']))).'" class="typo3-red">+</a> ';
                }
                return $str;
@@ -152,7 +152,7 @@ class webPageTree extends t3lib_browseTree {
         * @return      string
         * @access      private
         */
-       function wrapTitle($title,$row,$bank=0) {
+       function wrapTitle($title,$row,$bank=0) {
                        // Hook for overriding the page title
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.webpagetree.php']['pageTitleOverlay'])) {
                        $_params = array('title' => &$title, 'row' => &$row);
@@ -194,7 +194,7 @@ class webPageTree extends t3lib_browseTree {
                if(($PMpos = strpos($PM, '#')) !== FALSE) { $PM = substr($PM, 0, $PMpos); }
                $PM = explode('_', $PM);
                if ((TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX) && is_array($PM) && count($PM) == 4 && $PM[2] != 0) {
-                       if($PM[1])      {
+                       if($PM[1]) {
                                $expandedPageUid = $PM[2];
                                $ajaxOutput = '';
                                $invertedDepthOfAjaxRequestedItem = 0; // We don't know yet. Will be set later.
@@ -209,7 +209,7 @@ class webPageTree extends t3lib_browseTree {
                // so we know how many we have to close when all children are done rendering
                $closeDepth = array();
 
-               foreach($treeArr as $k => $v)   {
+               foreach($treeArr as $k => $v) {
                        $classAttr = $v['row']['_CSSCLASS'];
                        $uid       = $v['row']['uid'];
                        $idAttr = htmlspecialchars($this->domIdPrefix.$this->getId($v['row']).'_'.$v['bank']);
@@ -217,7 +217,7 @@ class webPageTree extends t3lib_browseTree {
 
                        // if this item is the start of a new level,
                        // then a new level <ul> is needed, but not in ajax mode
-                       if($v['isFirst'] && !($doCollapse) && !($doExpand && $expandedPageUid == $uid)) {
+                       if($v['isFirst'] && !($doCollapse) && !($doExpand && $expandedPageUid == $uid)) {
                                $itemHTML = '<ul>';
                        }
 
@@ -292,7 +292,7 @@ class webPageTree extends t3lib_browseTree {
         * @access private
         * @see t3lib_pageTree::PMicon()
         */
-       function PMicon($row,$a,$c,$nextCount,$exp)     {
+       function PMicon($row,$a,$c,$nextCount,$exp) {
                $PM   = $nextCount ? ($exp ? 'minus' : 'plus') : 'join';
                $BTM  = ($a == $c) ? 'bottom' : '';
                $icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.$PM.$BTM.'.gif','width="18" height="16"').' alt="" />';
@@ -313,7 +313,7 @@ class webPageTree extends t3lib_browseTree {
         * @return      string          Link-wrapped input string
         * @access private
         */
-       function PMiconATagWrap($icon, $cmd, $isExpand = TRUE)  {
+       function PMiconATagWrap($icon, $cmd, $isExpand = TRUE) {
                if ($this->thisScript) {
                                // activate dynamic ajax-based tree
                        $js = htmlspecialchars('Tree.load(\''.$cmd.'\', '.intval($isExpand).', this);');
@@ -377,7 +377,7 @@ class webPageTree extends t3lib_browseTree {
                                $this->tree[] = array('HTML'=>$firstHtml, 'row'=>$rootRec, 'bank'=>$this->bank, 'hasSub'=>TRUE, 'invertedDepth'=>1000);
 
                                        // If the mount is expanded, go down:
-                               if ($isOpen)    {
+                               if ($isOpen) {
                                                // Set depth:
                                        if ($this->addSelfId) { $this->ids[] = $uid; }
                                        $this->getTree($uid, 999, '', $rootRec['_SUBCSSCLASS']);
@@ -415,7 +415,7 @@ class webPageTree extends t3lib_browseTree {
                $inMenuPages = array();
                $outOfMenuPages = array();
                $outOfMenuPagesTextIndex = array();
-               while ($crazyRecursionLimiter > 0 && $row = $this->getDataNext($res,$subCSSclass))      {
+               while ($crazyRecursionLimiter > 0 && $row = $this->getDataNext($res,$subCSSclass)) {
                        $crazyRecursionLimiter--;
 
                                // Not in menu:
@@ -430,14 +430,14 @@ class webPageTree extends t3lib_browseTree {
                }
 
                $label_shownAlphabetically = "";
-               if (count($outOfMenuPages))     {
+               if (count($outOfMenuPages)) {
                                // Sort out-of-menu pages:
                        $outOfMenuPages_alphabetic = array();
-                       if ($this->ext_alphasortNotinmenuPages) {
+                       if ($this->ext_alphasortNotinmenuPages) {
                                asort($outOfMenuPagesTextIndex);
                                $label_shownAlphabetically = " (alphabetic)";
                        }
-                       foreach($outOfMenuPagesTextIndex as $idx => $txt)       {
+                       foreach($outOfMenuPagesTextIndex as $idx => $txt) {
                                $outOfMenuPages_alphabetic[] = $outOfMenuPages[$idx];
                        }
 
@@ -449,7 +449,7 @@ class webPageTree extends t3lib_browseTree {
                }
 
                        // Traverse the records:
-               foreach ($allRows as $row)      {
+               foreach ($allRows as $row) {
                        $a++;
 
                        $newID = $row['uid'];
@@ -466,7 +466,7 @@ class webPageTree extends t3lib_browseTree {
                        $this->ids_hierarchy[$depth][] = $row['uid'];
 
                                // Make a recursive call to the next level
-                       if ($depth > 1 && $this->expandNext($newID) && !$row['php_tree_stop'])  {
+                       if ($depth > 1 && $this->expandNext($newID) && !$row['php_tree_stop']) {
                                $nextCount=$this->getTree(
                                        $newID,
                                        $depth-1,
@@ -481,8 +481,8 @@ class webPageTree extends t3lib_browseTree {
                        }
 
                                // Set HTML-icons, if any:
-                       if ($this->makeHTML)    {
-                               if ($row['_FIRST_NOT_IN_MENU']) {
+                       if ($this->makeHTML) {
+                               if ($row['_FIRST_NOT_IN_MENU']) {
                                        $HTML = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/line.gif').' alt="" /><br/><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/line.gif').' alt="" /><i>Not shown in menu'.$label_shownAlphabetically.':</i><br>';
                                } else {
                                        $HTML = '';
index 215c5de..c141eac 100644 (file)
@@ -185,7 +185,7 @@ class ModuleMenu {
                $modules = array();
 
                        // Remove the 'doc' module?
-               if($GLOBALS['BE_USER']->getTSConfigVal('options.disableDocModuleInAB')) {
+               if($GLOBALS['BE_USER']->getTSConfigVal('options.disableDocModuleInAB')) {
                        unset($this->loadedModules['doc']);
                }
 
@@ -296,7 +296,7 @@ class ModuleMenu {
         */
        protected function getModuleIconAbsolute($iconFilename) {
 
-               if(!t3lib_div::isAbsPath($iconFilename))        {
+               if(!t3lib_div::isAbsPath($iconFilename)) {
                        $iconFilename = $this->backPath . $iconFilename;
                }
 
@@ -325,7 +325,7 @@ class ModuleMenu {
         * @param       string          Link URL
         * @return      string          link URl appended with ? if there wasn't one
         */
-       protected function appendQuestionmarkToLink($link)      {
+       protected function appendQuestionmarkToLink($link) {
                if(!strstr($link, '?')) {
                        $link .= '?';
                }
index ed417e8..3bdb4c9 100644 (file)
@@ -533,7 +533,7 @@ class ShortcutMenu implements backend_toolbarItem {
                                }
                        } else {
                                $dirName = urldecode($pageId);
-                               if (preg_match('/\/$/', $dirName))      {
+                               if (preg_match('/\/$/', $dirName)) {
                                                // if $pageId is a string and ends with a slash,
                                                // assume it is a fileadmin reference and set
                                                // the description to the basename of that path
@@ -781,7 +781,7 @@ class ShortcutMenu implements backend_toolbarItem {
         * @param       string          The URL of the current shortcut link
         * @return      string          If a page ID was found, it is returned. Otherwise: 0
         */
-       protected function getLinkedPageId($url)        {
+       protected function getLinkedPageId($url) {
                return preg_replace('/.*[\?&]id=([^&]+).*/', '$1', $url);
        }
 
index eef7ad8..9b32e48 100644 (file)
@@ -66,7 +66,7 @@ class TYPO3Logo {
                                '</a>';
 
                        // overwrite with custom logo
-               if($GLOBALS['TBE_STYLES']['logo'])      {
+               if($GLOBALS['TBE_STYLES']['logo']) {
                        $imgInfo = @getimagesize(t3lib_div::resolveBackPath(PATH_typo3 . $GLOBALS['TBE_STYLES']['logo'], 3));
                        $logo = '<a href="' . TYPO3_URL_GENERAL . '" target="_blank">' .
                                '<img src="' . $GLOBALS['TBE_STYLES']['logo'] . '" ' . $imgInfo[3] . ' title="TYPO3 Content Management System" alt="" />' .
index 397ca7f..748a622 100644 (file)
@@ -83,7 +83,7 @@ package org.flowplayer.view {
                        
                        var resizingFunc:Function = function(event:TimerEvent = null):void {
 
-                               if ( event && ! resizer.hasOrigSize() && Timer(event.target).currentCount < Timer(event.target).repeatCount )   {
+                               if ( event && ! resizer.hasOrigSize() && Timer(event.target).currentCount < Timer(event.target).repeatCount ) {
                                        log.debug("we don't have a size yet.. waiting for the video object to have a size");
                                        return;
                                }
index 4094a02..2696987 100644 (file)
@@ -61,7 +61,7 @@ class localPageTree extends t3lib_pageTree {
         * @param       array           Item row
         * @return      string          Wrapping icon image.
         */
-       function wrapIcon($icon,$row)   {
+       function wrapIcon($icon,$row) {
                return $this->addTagAttributes($icon,' title="id='.htmlspecialchars($row['uid']).'"');
        }
 
@@ -72,7 +72,7 @@ class localPageTree extends t3lib_pageTree {
         * @param       integer         The ID (page id) of the element
         * @return      boolean         Returns TRUE if the IDs matches
         */
-       function expandNext($id)        {
+       function expandNext($id) {
                return $id==$GLOBALS['SOBE']->id ? 1 : 0;
        }
 }
@@ -164,12 +164,12 @@ class SC_db_new {
                $this->content.=$this->doc->header($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:db_new.php.pagetitle'));
 
                        // Id a positive id is supplied, ask for the page record with permission information contained:
-               if ($this->id > 0)      {
+               if ($this->id > 0) {
                        $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
                }
 
                        // If a page-record was returned, the user had read-access to the page.
-               if ($this->pageinfo['uid'])     {
+               if ($this->pageinfo['uid']) {
                                // Get record of parent page
 
                        $this->pidInfo=t3lib_BEfunc::getRecord('pages',$this->pageinfo['pid']);
@@ -217,16 +217,16 @@ class SC_db_new {
                        $this->deniedNewTables_pid = t3lib_div::trimExplode(',',$this->web_list_modTSconfig_pid['properties']['deniedNewTables'],1);
 
                                // More init:
-                       if (!$this->showNewRecLink('pages'))    {
+                       if (!$this->showNewRecLink('pages')) {
                                $this->newPagesInto=0;
                        }
-                       if (!$this->showNewRecLink('pages', $this->allowedNewTables_pid, $this->deniedNewTables_pid))   {
+                       if (!$this->showNewRecLink('pages', $this->allowedNewTables_pid, $this->deniedNewTables_pid)) {
                                $this->newPagesAfter=0;
                        }
 
 
                                // Set header-HTML and return_url
-                       if (is_array($this->pageinfo) && $this->pageinfo['uid'])        {
+                       if (is_array($this->pageinfo) && $this->pageinfo['uid']) {
                                $iconImgTag = t3lib_iconWorks::getSpriteIconForRecord('pages', $this->pageinfo, array('title' => htmlspecialchars($this->pageinfo['_thePath'])));
                                $title = strip_tags($this->pageinfo[$GLOBALS['TCA']['pages']['ctrl']['label']]);
                        } else {
@@ -279,7 +279,7 @@ class SC_db_new {
 
                if (!$this->pagesOnly)  {       // Regular new element:
                                // New page
-                       if ($this->showNewRecLink('pages'))     {
+                       if ($this->showNewRecLink('pages')) {
                                $buttons['new_page'] = '<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('pagesOnly' => '1'))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:cms/layout/locallang.xml:newPage', 1) . '">' .
                                                t3lib_iconWorks::getSpriteIcon('actions-page-new') .
                                        '</a>';
@@ -461,10 +461,10 @@ class SC_db_new {
                        // New tables (but not pages) INSIDE this pages
                $isAdmin = $GLOBALS['BE_USER']->isAdmin();
                $newContentIcon = t3lib_iconWorks::getSpriteIcon('actions-document-new');
-               if ($this->newContentInto)      {
-                       if (is_array($GLOBALS['TCA']))  {
+               if ($this->newContentInto) {
+                       if (is_array($GLOBALS['TCA'])) {
                                $groupName = '';
-                               foreach($GLOBALS['TCA'] as $table => $v)        {
+                               foreach($GLOBALS['TCA'] as $table => $v) {
                                        $count = count($GLOBALS['TCA'][$table]);
                                        $counter = 1;
                                        if ($table != 'pages'
@@ -485,7 +485,7 @@ class SC_db_new {
                                                        ,$this->id);
 
                                                        // If the table is 'tt_content' (from "cms" extension), create link to wizard
-                                               if ($table == 'tt_content')     {
+                                               if ($table == 'tt_content') {
                                                        $groupName = $GLOBALS['LANG']->getLL('createNewContent');
                                                        $rowContent = $firstLevel . $newContentIcon . '&nbsp;<strong>' . $GLOBALS['LANG']->getLL('createNewContent') . '</strong>';
                                                                // If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's wizard instead:
@@ -618,7 +618,7 @@ class SC_db_new {
         * @param       string          first array element for compare
         * @return      int                     -1 for lower, 0 for equal, 1 for greater
         */
-       function sortNewRecordsByConfig($a, $b) {
+       function sortNewRecordsByConfig($a, $b) {
                if (count($this->newRecordSortList)) {
                        if (in_array($a, $this->newRecordSortList) && in_array($b, $this->newRecordSortList)) {
                                        // both are in the list, return relative to position in array
@@ -684,16 +684,16 @@ class SC_db_new {
         * @param       string          Table name to check
         * @return      boolean         Returns TRUE if the tablename $checkTable is allowed to be created on the page with record $pid_row
         */
-       function isTableAllowedForThisPage($pid_row, $checkTable)       {
-               if (!is_array($pid_row))        {
-                       if ($GLOBALS['BE_USER']->user['admin']) {
+       function isTableAllowedForThisPage($pid_row, $checkTable) {
+               if (!is_array($pid_row)) {
+                       if ($GLOBALS['BE_USER']->user['admin']) {
                                return TRUE;
                        } else {
                                return FALSE;
                        }
                }
                        // be_users and be_groups may not be created anywhere but in the root.
-               if ($checkTable=='be_users' || $checkTable=='be_groups')        {
+               if ($checkTable=='be_users' || $checkTable=='be_groups') {
                        return FALSE;
                }
                        // Checking doktype:
index 556ae5e..3f6b0a3 100644 (file)
@@ -128,7 +128,7 @@ class SC_file_edit {
                                        'content' => &$this->content,
                                        'target' => &$this->target,
                                );
-                               foreach ($preOutputProcessingHook as $hookFunction)     {
+                               foreach ($preOutputProcessingHook as $hookFunction) {
                                        t3lib_div::callUserFunction($hookFunction, $hookParameters, $this);
                                }
                        }
@@ -181,7 +181,7 @@ class SC_file_edit {
                                        'pageContent' => &$pageContent,
                                        'target' => &$this->target,
                                );
-                               foreach ($postOutputProcessingHook as $hookFunction)    {
+                               foreach ($postOutputProcessingHook as $hookFunction) {
                                        t3lib_div::callUserFunction($hookFunction, $hookParameters, $this);
                                }
                        }
index 8486bef..c98fd6e 100644 (file)
@@ -153,7 +153,7 @@ class SC_file_newfolder {
                                $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.number_of_folders') .
                                '</label>
                                <select name="number" id="number-of-new-folders" onchange="reload(this.options[this.selectedIndex].value);">';
-               for ($a=1;$a<=$this->folderNumber;$a++) {
+               for ($a=1;$a<=$this->folderNumber;$a++) {
                        $code .= '<option value="' . $a . '"' .
                                        ($this->number == $a ? ' selected="selected"' : '') .
                                        '>' . $a . '</option>';
@@ -167,7 +167,7 @@ class SC_file_newfolder {
                $code.='
                        <div id="c-createFolders">
                ';
-               for ($a=0;$a<$this->number;$a++)        {
+               for ($a=0;$a<$this->number;$a++) {
                        $code.='
                                        <input'.$this->doc->formWidth(20).' type="text" name="file[newfolder]['.$a.'][data]" onchange="changed=true;" />
                                        <input type="hidden" name="file[newfolder][' . $a . '][target]" value="' . htmlspecialchars($this->target) . '" /><br />
index c1f73eb..a07a6a7 100644 (file)
@@ -336,7 +336,7 @@ class SC_index {
        function checkRedirect() {
                        // Do redirect:
                        // If a user is logged in AND a) if either the login is just done (isLoginInProgress) or b) a loginRefresh is done or c) the interface-selector is NOT enabled (If it is on the other hand, it should not just load an interface, because people has to choose then...)
-               if ($GLOBALS['BE_USER']->user['uid'] && ($this->isLoginInProgress() || $this->loginRefresh || !$this->interfaceSelector))       {
+               if ($GLOBALS['BE_USER']->user['uid'] && ($this->isLoginInProgress() || $this->loginRefresh || !$this->interfaceSelector)) {
 
                                // If no cookie has been set previously we tell people that this is a problem. This assumes that a cookie-setting script (like this one) has been hit at least once prior to this instance.
                        if (!$_COOKIE[t3lib_beUserAuth::getCookieName()]) {
@@ -360,7 +360,7 @@ class SC_index {
                        $GLOBALS['BE_USER']->writeUC();
 
                                // Based on specific setting of interface we set the redirect script:
-                       switch ($this->GPinterface)     {
+                       switch ($this->GPinterface) {
                                case 'backend':
                                case 'backend_old':
                                        $this->redirectToURL = 'backend.php';
@@ -372,7 +372,7 @@ class SC_index {
 
                        $formProtection = t3lib_formprotection_Factory::get();
                                // If there is a redirect URL AND if loginRefresh is not set...
-                       if (!$this->loginRefresh)       {
+                       if (!$this->loginRefresh) {
                                $formProtection->storeSessionTokenInRegistry();
                                t3lib_utility_Http::redirect($this->redirectToURL);
                        } else {
@@ -406,7 +406,7 @@ class SC_index {
                $this->interfaceSelector_jump = '';
 
                        // If interfaces are defined AND no input redirect URL in GET vars:
-               if ($GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces'] && ($this->isLoginInProgress() || !$this->redirect_url))    {
+               if ($GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces'] && ($this->isLoginInProgress() || !$this->redirect_url)) {
                        $parts = t3lib_div::trimExplode(',',$GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces']);
                        if (count($parts)>1)    {       // Only if more than one interface is defined will we show the selector:
 
@@ -423,7 +423,7 @@ class SC_index {
                                $jumpScript['frontend']    = '../';
 
                                        // Traverse the interface keys:
-                               foreach($parts as $valueStr)    {
+                               foreach($parts as $valueStr) {
                                        $this->interfaceSelector.='
                                                        <option value="'.htmlspecialchars($valueStr).'"'.(t3lib_div::_GP('interface')==htmlspecialchars($valueStr) ? ' selected="selected"' : '').'>'.htmlspecialchars($labels[$valueStr]).'</option>';
                                        $this->interfaceSelector_jump.='
@@ -461,7 +461,7 @@ class SC_index {
                $loginImageSmall = (trim($GLOBALS['TBE_STYLES']['loginBoxImageSmall'])) ? trim($GLOBALS['TBE_STYLES']['loginBoxImageSmall']) : 'gfx/loginlogo_transp.gif';
 
                        // Make warranty note:
-               if (strlen($loginCopyrightWarrantyProvider)>=2 && strlen($loginCopyrightWarrantyURL)>=10)       {
+               if (strlen($loginCopyrightWarrantyProvider)>=2 && strlen($loginCopyrightWarrantyURL)>=10) {
                        $warrantyNote = sprintf($GLOBALS['LANG']->getLL('warranty.by'), htmlspecialchars($loginCopyrightWarrantyProvider), '<a href="' . htmlspecialchars($loginCopyrightWarrantyURL) . '" target="_blank">', '</a>');
                } else {
                        $warrantyNote = sprintf($GLOBALS['LANG']->getLL('no.warranty'), '<a href="' . TYPO3_URL_LICENSE . '" target="_blank">', '</a>');
@@ -494,7 +494,7 @@ class SC_index {
 
                                // Get rotation folder:
                        $dir = t3lib_div::getFileAbsFileName($absPath);
-                       if ($dir && @is_dir($dir))      {
+                       if ($dir && @is_dir($dir)) {
 
                                        // Get files for rotation into array:
                                $files = t3lib_div::getFilesInDir($dir,'png,jpg,gif');
@@ -508,7 +508,7 @@ class SC_index {
                                $imgAuthor = is_array($GLOBALS['TBE_STYLES']['loginBoxImage_author']) && $GLOBALS['TBE_STYLES']['loginBoxImage_author'][$files[$randImg]] ? htmlspecialchars($GLOBALS['TBE_STYLES']['loginBoxImage_author'][$files[$randImg]]) : '';
 
                                        // Create image tag:
-                               if (is_array($imgSize)) {
+                               if (is_array($imgSize)) {
                                        $loginboxImage = '<img src="'.htmlspecialchars($GLOBALS['TBE_STYLES']['loginBoxImage_rotationFolder'].$files[$randImg]).'" '.$imgSize[3].' id="loginbox-image" alt="'.$imgAuthor.'" title="'.$imgAuthor.'" />';
                                }
                        }
@@ -669,7 +669,7 @@ class SC_index {
                        function startUp() {
                                        // If the login screen is shown in the login_frameset window for re-login, then try to get the username of the current/former login from opening windows main frame:
                                try {
-                                       if (parent.opener && parent.opener.TS && parent.opener.TS.username && document.loginform && document.loginform.username)        {
+                                       if (parent.opener && parent.opener.TS && parent.opener.TS.username && document.loginform && document.loginform.username) {
                                                document.loginform.username.value = parent.opener.TS.username;
                                        }
                                }
index 1402429..96ea324 100644 (file)
@@ -100,7 +100,7 @@ function str_replace(match,replace,string)  {       //
        var output = "";
        var pointer=0;
        var pos = input.indexOf(matchStr);
-       while (pos !== -1)      {
+       while (pos !== -1) {
                output+=""+input.substr(pointer, pos-pointer)+replace;
                pointer=pos+matchStr.length;
                pos = input.indexOf(match,pos+1);
@@ -118,7 +118,7 @@ function launchView(table,uid,bP)   {       //
        var backPath= bP ? bP : "";
        var thePreviewWindow="";
        thePreviewWindow = window.open(TS.PATH_typo3+"show_item.php?table="+encodeURIComponent(table)+"&uid="+encodeURIComponent(uid),"ShowItem"+TS.uniqueID,"width=550,height=600,status=0,menubar=0,resizable=0,location=0,directories=0,scrollbars=1,toolbar=0");
-       if (thePreviewWindow && thePreviewWindow.focus) {
+       if (thePreviewWindow && thePreviewWindow.focus) {
                thePreviewWindow.focus();
        }
 }
@@ -142,7 +142,7 @@ function loadEditId(id,addGetVars)  {       //
        top.fsMod.recentIds.web = id;
        top.fsMod.navFrameHighlightedID.web = "pages" + id + "_0";              // For highlighting
 
-       if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav)  {
+       if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav) {
                top.content.nav_frame.refresh_nav();
        }
        if (TYPO3.configuration.pageModule) {
@@ -157,7 +157,7 @@ function loadEditId(id,addGetVars)  {       //
 var nextLoadModuleUrl="";
 function getModuleUrl(inUrl)   {       //
        var nMU;
-       if (top.nextLoadModuleUrl)      {
+       if (top.nextLoadModuleUrl) {
                nMU=top.nextLoadModuleUrl;
                top.nextLoadModuleUrl="";
                return nMU;
@@ -172,7 +172,7 @@ function getModuleUrl(inUrl)        {       //
 function debugObj(obj,name)    {       //
        var acc;
        for (var i in obj) {
-               if (obj[i])     {
+               if (obj[i]) {
                        acc+=i+":  "+obj[i]+"\n";
                }
        }
index ed4844e..1f313ed 100644 (file)
@@ -226,7 +226,7 @@ Event.observe(document, 'mousemove', Clickmenu.calcMousePosEvent.bindAsEventList
 // ## BEGIN ##
 
 // Still used in Core: typo3/template.php::wrapClickMenuOnIcon()
-function showClickmenu(table, uid, listFr, enDisItems, backPath, addParams)    {
+function showClickmenu(table, uid, listFr, enDisItems, backPath, addParams) {
        Clickmenu.show(table, uid, listFr, enDisItems, backPath, addParams);
 }
 
@@ -251,7 +251,7 @@ function hideEmpty() {
        return false;
 }
 function hideSpecific(level) {
-       if (level === 0 || level === 1) {
+       if (level === 0 || level === 1) {
                Clickmenu.hide('contentMenu'+level);
        }
 } 
index ab9ad1a..28e5c29 100644 (file)
@@ -362,7 +362,7 @@ var TBE_EDITOR = {
                TBE_EDITOR.setImage(imgObjName,TBE_EDITOR.images.cm);
 
                        // Set change image
-               if (document[TBE_EDITOR.formname][theField] && document[TBE_EDITOR.formname][theField].type=="select-one" && document[TBE_EDITOR.formname][theField+"_selIconVal"])     {
+               if (document[TBE_EDITOR.formname][theField] && document[TBE_EDITOR.formname][theField].type=="select-one" && document[TBE_EDITOR.formname][theField+"_selIconVal"]) {
                        var imgObjName = "selIcon_"+table+"_"+uid+"_"+field+"_";
                        TBE_EDITOR.setImage(imgObjName+document[TBE_EDITOR.formname][theField+"_selIconVal"].value,TBE_EDITOR.images.clear);
                        document[TBE_EDITOR.formname][theField+"_selIconVal"].value = document[TBE_EDITOR.formname][theField].selectedIndex;
@@ -371,7 +371,7 @@ var TBE_EDITOR = {
 
                        // Set required flag:
                var imgReqObjName = "req_"+table+"_"+uid+"_"+field;
-               if (TBE_EDITOR.getElement(theRecord,field,'required') && document[TBE_EDITOR.formname][theField])       {
+               if (TBE_EDITOR.getElement(theRecord,field,'required') && document[TBE_EDITOR.formname][theField]) {
                        if (TBE_EDITOR.checkElements('required', false, theRecord, field)) {
                                TBE_EDITOR.setImage(imgReqObjName,TBE_EDITOR.images.clear);
                                TBE_EDITOR.notifyNested(theField, true);
@@ -381,7 +381,7 @@ var TBE_EDITOR = {
                        }
                }
                if (TBE_EDITOR.getElement(theRecord,field,'range') && document[TBE_EDITOR.formname][theField]) {
-                       if (TBE_EDITOR.checkElements('range', false, theRecord, field)) {
+                       if (TBE_EDITOR.checkElements('range', false, theRecord, field)) {
                                TBE_EDITOR.setImage(imgReqObjName,TBE_EDITOR.images.clear);
                                TBE_EDITOR.notifyNested(theField, true);
                        } else {
@@ -425,8 +425,8 @@ var TBE_EDITOR = {
                        }
                }
 
-               if(!OK) {
-                       if (!confirm(unescape("SYSTEM ERROR: One or more Rich Text Editors on the page could not be contacted. This IS an error, although it should not be regular.\nYou can save the form now by pressing OK, but you will loose the Rich Text Editor content if you do.\n\nPlease report the error to your administrator if it persists.")))  {
+               if(!OK) {
+                       if (!confirm(unescape("SYSTEM ERROR: One or more Rich Text Editors on the page could not be contacted. This IS an error, although it should not be regular.\nYou can save the form now by pressing OK, but you will loose the Rich Text Editor content if you do.\n\nPlease report the error to your administrator if it persists."))) {
                                return false;
                        } else {
                                OK = 1;
@@ -489,7 +489,7 @@ var TBE_EDITOR = {
                var lengthOfDelim = delim.length;
                sPos = -lengthOfDelim;
                if (index<1) {index=1;}
-               for (var a=1; a<index; a++)     {
+               for (var a=1; a<index; a++) {
                        sPos = theStr.indexOf(delim, sPos+lengthOfDelim);
                        if (sPos==-1) { return null; }
                }
@@ -497,14 +497,14 @@ var TBE_EDITOR = {
                if(ePos == -1) { ePos = theStr.length; }
                return (theStr.substring(sPos+lengthOfDelim,ePos));
        },
-       curSelected: function(theField) {
+       curSelected: function(theField) {
                var fObjSel = document[TBE_EDITOR.formname][theField];
                var retVal="";
-               if (fObjSel)    {
-                       if (fObjSel.type=='select-multiple' || fObjSel.type=='select-one')      {
+               if (fObjSel) {
+                       if (fObjSel.type=='select-multiple' || fObjSel.type=='select-one') {
                                var l=fObjSel.length;
-                               for (a=0;a<l;a++)       {
-                                       if (fObjSel.options[a].selected==1)     {
+                               for (a=0;a<l;a++) {
+                                       if (fObjSel.options[a].selected==1) {
                                                retVal+=fObjSel.options[a].value+",";
                                        }
                                }
@@ -525,7 +525,7 @@ var TBE_EDITOR = {
                var output = '';
                var pointer=0;
                var pos = input.indexOf(matchStr);
-               while (pos!=-1) {
+               while (pos!=-1) {
                        output+=''+input.substr(pointer, pos-pointer)+replace;
                        pointer=pos+matchStr.length;
                        pos = input.indexOf(match,pos+1);
@@ -595,10 +595,10 @@ var TBE_EDITOR_str_replace = TBE_EDITOR.str_replace;
 
 var typo3form = {
        fieldSet: function(theField, evallist, is_in, checkbox, checkboxValue) {
-               if (document[TBE_EDITOR.formname][theField])    {
+               if (document[TBE_EDITOR.formname][theField]) {
                        var theFObj = new evalFunc_dummy (evallist,is_in, checkbox, checkboxValue);
                        var theValue = document[TBE_EDITOR.formname][theField].value;
-                       if (checkbox && theValue==checkboxValue)        {
+                       if (checkbox && theValue==checkboxValue) {
                                document[TBE_EDITOR.formname][theField+"_hr"].value="";
                                if (document[TBE_EDITOR.formname][theField+"_cb"])      document[TBE_EDITOR.formname][theField+"_cb"].checked = "";
                        } else {
@@ -608,18 +608,18 @@ var typo3form = {
                }
        },
        fieldGet: function(theField, evallist, is_in, checkbox, checkboxValue, checkbox_off, checkSetValue) {
-               if (document[TBE_EDITOR.formname][theField])    {
+               if (document[TBE_EDITOR.formname][theField]) {
                        var theFObj = new evalFunc_dummy (evallist,is_in, checkbox, checkboxValue);
-                       if (checkbox_off)       {
-                               if (document[TBE_EDITOR.formname][theField+"_cb"].checked)      {
+                       if (checkbox_off) {
+                               if (document[TBE_EDITOR.formname][theField+"_cb"].checked) {
                                        var split = evallist.split(',');
                                        for (var i = 0; split.length > i; i++) {
                                                var el = split[i].replace(/ /g, '');
-                                               if (el == 'datetime' || el == 'date')   {
+                                               if (el == 'datetime' || el == 'date') {
                                                        var now = new Date();
                                                        checkSetValue = Date.parse(now)/1000 - now.getTimezoneOffset()*60;
                                                        break;
-                                               } else if (el == 'time' || el == 'timesec')     {
+                                               } else if (el == 'time' || el == 'timesec') {
                                                        checkSetValue = evalFunc_getTimeSecs(new Date());
                                                        break;
                                                }
index f34887d..b189939 100644 (file)
@@ -67,7 +67,7 @@ class localPageTree extends t3lib_pageTree {
         * @param       array           Item row
         * @return      string          Wrapping icon image.
         */
-       function wrapIcon($icon,$row)   {
+       function wrapIcon($icon,$row) {
                return $this->addTagAttributes($icon,' title="id='.htmlspecialchars($row['uid']).'"');
        }
 }
@@ -99,7 +99,7 @@ class ext_posMap_pages extends t3lib_positionMap {
         * @param       integer         New page id.
         * @return      string          Onclick attribute content
         */
-       function onClickEvent($pid,$newPagePID) {
+       function onClickEvent($pid,$newPagePID) {
                return 'window.location.href=\'tce_db.php?cmd[pages][' . $GLOBALS['SOBE']->moveUid . '][' . $this->moveOrCopy . ']=' . $pid .
                                '&redirect=' . rawurlencode($this->R_URI) .
                                '&prErr=1&uPT=1&vC=' . $GLOBALS['BE_USER']->veriCode() .
@@ -114,7 +114,7 @@ class ext_posMap_pages extends t3lib_positionMap {
         * @param       array           Page record (?)
         * @return      string          Wrapped title.
         */
-       function linkPageTitle($str,$rec)       {
+       function linkPageTitle($str,$rec) {
                $url = t3lib_div::linkThisScript(array('uid'=>intval($rec['uid']),'moveUid'=>$GLOBALS['SOBE']->moveUid));
                return '<a href="'.htmlspecialchars($url).'">'.$str.'</a>';
        }
@@ -127,7 +127,7 @@ class ext_posMap_pages extends t3lib_positionMap {
         * @param       integer         The current id.
         * @return      string          The title string.
         */
-       function boldTitle($t_code,$dat,$id)    {
+       function boldTitle($t_code,$dat,$id) {
                return parent::boldTitle($t_code,$dat,$GLOBALS['SOBE']->moveUid);
        }
 }
@@ -160,7 +160,7 @@ class ext_posMap_tt_content extends t3lib_positionMap {
         * @param       array           Page record (?)
         * @return      string          Wrapped title.
         */
-       function linkPageTitle($str,$rec)       {
+       function linkPageTitle($str,$rec) {
                $url = t3lib_div::linkThisScript(array('uid'=>intval($rec['uid']),'moveUid'=>$GLOBALS['SOBE']->moveUid));
                return '<a href="'.htmlspecialchars($url).'">'.$str.'</a>';
        }
@@ -172,7 +172,7 @@ class ext_posMap_tt_content extends t3lib_positionMap {
         * @param       array           The record row.
         * @return      string          Wrapped title string.
         */
-       function wrapRecordTitle($str,$row)     {
+       function wrapRecordTitle($str,$row) {
                if ($GLOBALS['SOBE']->moveUid==$row['uid'])     $str = '<strong>'.$str.'</strong>';
                return parent::wrapRecordTitle($str,$row);
        }
@@ -252,7 +252,7 @@ class SC_move_el {
         * @return      void
         */
        function main() {
-               if ($this->page_id)     {
+               if ($this->page_id) {
 
                                // Get record for element:
                        $elRow = t3lib_BEfunc::getRecordWSOL($this->table,$this->moveUid);
@@ -279,7 +279,7 @@ class SC_move_el {
                        $code='';
 
                                // IF the table is "pages":
-                       if ((string)$this->table=='pages')      {
+                       if ((string)$this->table=='pages') {
                                        // Get page record (if accessible):
                                $pageinfo = t3lib_BEfunc::readPageAccess($this->page_id,$this->perms_clause);
                                if (is_array($pageinfo) && $GLOBALS['BE_USER']->isInWebMount($pageinfo['pid'],$this->perms_clause)) {
@@ -289,9 +289,9 @@ class SC_move_el {
                                        $posMap->moveOrCopy = $this->makeCopy?'copy':'move';
 
                                                // Print a "go-up" link IF there is a real parent page (and if the user has read-access to that page).
-                                       if ($pageinfo['pid'])   {
+                                       if ($pageinfo['pid']) {
                                                $pidPageInfo = t3lib_BEfunc::readPageAccess($pageinfo['pid'],$this->perms_clause);
-                                               if (is_array($pidPageInfo))     {
+                                               if (is_array($pidPageInfo)) {
                                                        if ($GLOBALS['BE_USER']->isInWebMount($pidPageInfo['pid'],$this->perms_clause)) {
                                                                $code.= '<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('uid'=>intval($pageinfo['pid']),'moveUid'=>$this->moveUid))).'">'.
                                                                        t3lib_iconWorks::getSpriteIcon('actions-view-go-up') .
@@ -311,7 +311,7 @@ class SC_move_el {
                        }
 
                                // IF the table is "tt_content":
-                       if ((string)$this->table=='tt_content') {
+                       if ((string)$this->table=='tt_content') {
 
                                        // First, get the record:
                                $tt_content_rec = t3lib_BEfunc::getRecord('tt_content',$this->moveUid);
@@ -347,9 +347,9 @@ class SC_move_el {
                                                // Print a "go-up" link IF there is a real parent page (and if the user has read-access to that page).
                                        $code .= '<br />';
                                        $code .= '<br />';
-                                       if ($pageinfo['pid'])   {
+                                       if ($pageinfo['pid']) {
                                                $pidPageInfo = t3lib_BEfunc::readPageAccess($pageinfo['pid'], $this->perms_clause);
-                                               if (is_array($pidPageInfo))     {
+                                               if (is_array($pidPageInfo)) {
                                                        if ($GLOBALS['BE_USER']->isInWebMount($pidPageInfo['pid'], $this->perms_clause)) {
                                                                $code .= '<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array(
                                                                                'uid' => intval($pageinfo['pid']),
@@ -407,7 +407,7 @@ class SC_move_el {
                        'back' => ''
                );
 
-               if ($this->page_id)     {
+               if ($this->page_id) {
                        if ((string)$this->table == 'pages') {
                                        // CSH
                                $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'move_el_pages', $GLOBALS['BACK_PATH'], '', TRUE);
index c970f92..90f7779 100644 (file)
@@ -72,10 +72,10 @@ class transferData extends t3lib_transferData       {
         * @param       string          Content string.
         * @return      void
         */
-       function regItem($table, $id, $field, $content) {
+       function regItem($table, $id, $field, $content) {
                t3lib_div::loadTCA($table);
                $config = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
-               switch($config['type']) {
+               switch($config['type']) {
                        case 'input':
                                if (isset($config['checkbox']) && $content == $config['checkbox']) {
                                        $content = '';
@@ -172,7 +172,7 @@ class SC_show_item {
                                        $this->row = $this->pageinfo;
                                } else {
                                        $this->row = t3lib_BEfunc::getRecordWSOL($this->table, $this->uid);
-                                       if ($this->row) {
+                                       if ($this->row) {
                                                $this->pageinfo = t3lib_BEfunc::readPageAccess($this->row['pid'],$this->perms_clause);
                                                $this->access = is_array($this->pageinfo) ? 1 : 0;
                                        }
@@ -257,7 +257,7 @@ class SC_show_item {
                        }
 
                                // If return Url is set, output link to go back:
-                       if (t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl')))   {
+                       if (t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'))) {
                                $this->content = $this->doc->section('',$returnLinkTag.'<strong>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.goBack',1).'</strong></a><br /><br />').$this->content;
 
                                $this->content .= $this->doc->section('','<br />'.$returnLinkTag.'<strong>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.goBack',1).'</strong></a>');
index 2ec7114..843067d 100644 (file)
@@ -126,7 +126,7 @@ class SC_show_rechis {
                        // Start history object
                $historyObj = t3lib_div::makeInstance('recordHistory');
 
-               if ($historyObj->returnUrl)     {
+               if ($historyObj->returnUrl) {
                        $buttons['back'] = '<a href="' . htmlspecialchars($historyObj->returnUrl) . '" class="typo3-goBack">' . t3lib_iconWorks::getSpriteIcon('actions-view-go-back') . '</a>';
                }
 
index d6ca68a..2be0002 100644 (file)
@@ -10,7 +10,7 @@
  * License: GNU General Public License
  */
 
-function checkBrowser()        {
+function checkBrowser() {
        browserName = navigator.appName;
        browserVer = parseInt(navigator.appVersion);
 
@@ -22,14 +22,14 @@ function checkBrowser()     {
 }
 
        // Automatically change all textarea elements
-function changeTextareaElements()      {
+function changeTextareaElements() {
        if(!checkBrowser()) return false;       // Stop unless we're using IE or Netscape (includes Mozilla family)
 
        document.textAreas = document.getElementsByTagName("textarea");
 
-       for(i=0; i<document.textAreas.length; i++)      {
+       for(i=0; i<document.textAreas.length; i++) {
                        // Only change if the class parameter contains "enable-tab"
-               if(document.textAreas[i].className && document.textAreas[i].className.search(/(^| )enable-tab( |$)/) != -1)     {
+               if(document.textAreas[i].className && document.textAreas[i].className.search(/(^| )enable-tab( |$)/) != -1) {
                        document.textAreas[i].textAreaID = i;
                        makeAdvancedTextArea(document.textAreas[i]);
                }
@@ -41,12 +41,12 @@ function changeTextareaElements()   {
 window.setTimeout("changeTextareaElements();", 200);
 
        // Turn textarea elements into "better" ones. Actually this is just adding some lines of JavaScript...
-function makeAdvancedTextArea(textArea)        {
+function makeAdvancedTextArea(textArea) {
        if(textArea.tagName.toLowerCase() != "textarea") return false;
 
                // On attempt to leave the element:
                // Do not leave if this.dontLeave is true
-       textArea.onblur = function(e)   {
+       textArea.onblur = function(e) {
                if(!this.dontLeave) return;
                this.dontLeave = null;
                window.setTimeout("document.textAreas[" + this.textAreaID + "].restoreFocus()", 1);
@@ -54,18 +54,18 @@ function makeAdvancedTextArea(textArea)     {
        }
 
                // Set the focus back to the element and move the cursor to the correct position.
-       textArea.restoreFocus = function()      {
+       textArea.restoreFocus = function() {
                this.focus();
 
-               if(this.caretPos)       {
+               if(this.caretPos) {
                        this.caretPos.collapse(false);
                        this.caretPos.select();
                }
        }
 
                // Determine the current cursor position
-       textArea.getCursorPos = function()      {
-               if(this.selectionStart) {
+       textArea.getCursorPos = function() {
+               if(this.selectionStart) {
                        currPos = this.selectionStart;
                } else if(this.caretPos)        {       // This is very tricky in IE :-(
                        oldText = this.caretPos.text;
@@ -83,38 +83,38 @@ function makeAdvancedTextArea(textArea)     {
        }
 
                // On tab, insert a tabulator. Otherwise, check if a slash (/) was pressed.
-       textArea.onkeydown = function(e)        {
+       textArea.onkeydown = function(e) {
                if(this.selectionStart == null &! this.createTextRange) return;
                if(!e) e = window.event;
 
                        // Tabulator
-               if(e.keyCode == 9)      {
+               if(e.keyCode == 9) {
                        this.dontLeave = true;
                        this.textInsert(String.fromCharCode(9));
                }
 
                        // Newline
-               if(e.keyCode == 13)     {
+               if(e.keyCode == 13) {
                                // Get the cursor position
                        currPos = this.getCursorPos();
 
                                // Search the last line
                        lastLine = "";
-                       for(i=currPos-1;i>=0;i--)       {
+                       for(i=currPos-1;i>=0;i--) {
                                if(this.value.substring(i, i + 1) == '\n') break;
                        }
                        lastLine = this.value.substring(i + 1, currPos);
 
                                // Search for whitespaces in the current line
                        whiteSpace = "";
-                       for(i=0;i<lastLine.length;i++)  {
+                       for(i=0;i<lastLine.length;i++) {
                                if(lastLine.substring(i, i + 1) == '\t') whiteSpace += "\t";
                                else if(lastLine.substring(i, i + 1) == ' ') whiteSpace += " ";
                                else break;
                        }
 
                                // Another ugly IE hack
-                       if(navigator.appVersion.match(/MSIE/))  {
+                       if(navigator.appVersion.match(/MSIE/)) {
                                whiteSpace = "\\n" + whiteSpace;
                        }
 
@@ -124,19 +124,19 @@ function makeAdvancedTextArea(textArea)   {
        }
 
                // Save the current cursor position in IE
-       textArea.onkeyup = textArea.onclick = textArea.onselect = function(e)   {
-               if(this.createTextRange)        {
+       textArea.onkeyup = textArea.onclick = textArea.onselect = function(e) {
+               if(this.createTextRange) {
                        this.caretPos = document.selection.createRange().duplicate();
                }
        }
 
                // Insert text at the current cursor position
-       textArea.textInsert = function(insertText)      {
-               if(this.selectionStart != null) {
+       textArea.textInsert = function(insertText) {
+               if(this.selectionStart != null) {
                        var savedScrollTop = this.scrollTop;
                        var begin = this.selectionStart;
                        var end = this.selectionEnd;
-                       if(end > begin + 1)     {
+                       if(end > begin + 1) {
                                this.value = this.value.substr(0, begin) + insertText + this.value.substr(end);
                        } else {
                                this.value = this.value.substr(0, begin) + insertText + this.value.substr(begin);
@@ -145,7 +145,7 @@ function makeAdvancedTextArea(textArea)     {
                        this.selectionStart = begin + insertText.length;
                        this.selectionEnd = begin + insertText.length;
                        this.scrollTop = savedScrollTop;
-               } else if(this.caretPos)        {
+               } else if(this.caretPos) {
                        this.caretPos.text = insertText;
                        this.caretPos.scrollIntoView(true);
                } else {
index 0a8ec37..f8f46b4 100644 (file)
@@ -126,19 +126,19 @@ class SC_tce_db {
                }
 
                $TCAdefaultOverride = $GLOBALS['BE_USER']->getTSConfigProp('TCAdefaults');
-               if (is_array($TCAdefaultOverride))      {
+               if (is_array($TCAdefaultOverride)) {
                        $this->tce->setDefaultsFromUserTS($TCAdefaultOverride);
                }
 
                        // Reverse order.
-               if ($this->flags['reverseOrder'])       {
+               if ($this->flags['reverseOrder']) {
                        $this->tce->reverseOrder=1;
                }
 
 #              $this->tce->disableRTE = $this->_disableRTE;
 
                        // Clipboard?
-               if (is_array($this->CB))        {
+               if (is_array($this->CB)) {
                        $this->include_once[]=PATH_t3lib.'class.t3lib_clipboard.php';
                }
        }
@@ -149,14 +149,14 @@ class SC_tce_db {
         * @return      void
         */
        function initClipboard() {
-               if (is_array($this->CB))        {
+               if (is_array($this->CB)) {
                        $clipObj = t3lib_div::makeInstance('t3lib_clipboard');
                        $clipObj->initializeClipboard();
-                       if ($this->CB['paste']) {
+                       if ($this->CB['paste']) {
                                $clipObj->setCurrentPad($this->CB['pad']);
                                $this->cmd = $clipObj->makePasteCmdArray($this->CB['paste'],$this->cmd);
                        }
-                       if ($this->CB['delete'])        {
+                       if ($this->CB['delete']) {
                                $clipObj->setCurrentPad($this->CB['pad']);
                                $this->cmd = $clipObj->makeDeleteCmdArray($this->cmd);
                        }
@@ -191,7 +191,7 @@ class SC_tce_db {
                        $this->tce->clear_cacheCmd($this->cacheCmd);
 
                                // Update page tree?
-                       if ($this->uPT && (isset($this->data['pages']) || isset($this->cmd['pages'])))  {
+                       if ($this->uPT && (isset($this->data['pages']) || isset($this->cmd['pages']))) {
                                t3lib_BEfunc::setUpdateSignal('updatePageTree');
                        }
                }
index bda9155..4f1adcd 100644 (file)
@@ -178,14 +178,14 @@ class template {
                } else {
                        $this->scriptID = preg_replace('/^.*\/(sysext|ext)\//', 'ext/', substr(PATH_thisScript, strlen(PATH_site)));
                }
-               if (TYPO3_mainDir!='typo3/' && substr($this->scriptID,0,strlen(TYPO3_mainDir)) == TYPO3_mainDir)        {
+               if (TYPO3_mainDir!='typo3/' && substr($this->scriptID,0,strlen(TYPO3_mainDir)) == TYPO3_mainDir) {
                        $this->scriptID = 'typo3/'.substr($this->scriptID,strlen(TYPO3_mainDir));       // This fixes if TYPO3_mainDir has been changed so the script ids are STILL "typo3/..."
                }
 
                $this->bodyTagId = preg_replace('/[^A-Za-z0-9-]/','-',$this->scriptID);
 
                        // Individual configuration per script? If so, make a recursive merge of the arrays:
-               if (is_array($GLOBALS['TBE_STYLES']['scriptIDindex'][$this->scriptID])) {
+               if (is_array($GLOBALS['TBE_STYLES']['scriptIDindex'][$this->scriptID])) {
                        $ovr = $GLOBALS['TBE_STYLES']['scriptIDindex'][$this->scriptID];                // Make copy
                        $GLOBALS['TBE_STYLES'] = t3lib_div::array_merge_recursive_overrule($GLOBALS['TBE_STYLES'],$ovr);                // merge styles.
                        unset($GLOBALS['TBE_STYLES']['scriptIDindex'][$this->scriptID]);        // Have to unset - otherwise the second instantiation will do it again!
@@ -418,9 +418,9 @@ class template {
                        $storeUrl = '&M='.$modName.$storeUrl;
                }
 
-               if (!strcmp($motherModName,'1'))        {
+               if (!strcmp($motherModName,'1')) {
                        $mMN="&motherModName='+top.currentModuleLoaded+'";
-               } elseif ($motherModName)       {
+               } elseif ($motherModName) {
                        $mMN='&motherModName='.rawurlencode($motherModName);
                } else $mMN='';
 
@@ -494,7 +494,7 @@ class template {
        function formWidthText($size = 48, $styleOverride = '', $wrap = '') {
                $wTags = $this->formWidth($size,1,$styleOverride);
                        // Netscape 6+/Mozilla seems to have this ODD problem where there WILL ALWAYS be wrapping with the cols-attribute set and NEVER without the col-attribute...
-               if (strtolower(trim($wrap))!='off' && $GLOBALS['CLIENT']['BROWSER']=='net' && $GLOBALS['CLIENT']['VERSION']>=5) {
+               if (strtolower(trim($wrap))!='off' && $GLOBALS['CLIENT']['BROWSER']=='net' && $GLOBALS['CLIENT']['VERSION']>=5) {
                        $wTags.=' cols="'.$size.'"';
                }
                return $wTags;
@@ -534,7 +534,7 @@ class template {
         */
        function formatTime($tstamp, $type) {
                $dateStr = '';
-               switch($type)   {
+               switch($type) {
                        case 1: $dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'],$tstamp);
                        break;
                        case 10: $dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'],$tstamp);
@@ -595,13 +595,13 @@ class template {
         */
        function startPage($title, $includeCsh = TRUE) {
                        // hook pre start page
-               if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preStartPageHook'])) {
+               if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preStartPageHook'])) {
                        $preStartPageHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preStartPageHook'];
                        if (is_array($preStartPageHook)) {
                                $hookParameters = array(
                                        'title' => &$title,
                                );
-                               foreach ($preStartPageHook as $hookFunction)    {
+                               foreach ($preStartPageHook as $hookFunction) {
                                        t3lib_div::callUserFunction($hookFunction, $hookParameters, $this);
                                }
                        }
@@ -626,7 +626,7 @@ class template {
                        // Standard HTML tag
                $htmlTag = '<html xmlns="http://www.w3.org/1999/xhtml">';
 
-               switch($this->docType)  {
+               switch($this->docType) {
                        case 'html_3':
                                $headerStart = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">';
                                $htmlTag = '<html>';
@@ -773,7 +773,7 @@ class template {
 
                $this->endOfPageJsBlock = $this->pageRenderer->render(t3lib_PageRenderer::PART_FOOTER);
 
-               if ($this->docType=='xhtml_frames')     {
+               if ($this->docType=='xhtml_frames') {
                        return $str;
                } else
                        $str.=$this->docBodyTagBegin().
@@ -872,7 +872,7 @@ class template {
                $str='';
 
                        // Setting header
-               if ($label)     {
+               if ($label) {
                        if (!$allowHTMLinHeader)        $label = htmlspecialchars($label);
                        $str.=$this->sectionHeader($this->icons($type).$label, $sH, $nostrtoupper ? '' : ' class="uppercase"');
                }
@@ -909,7 +909,7 @@ class template {
         * @return string HTML content
         */
        function spacer($dist) {
-               if ($dist>0)    {
+               if ($dist>0) {
                        return '
 
        <!-- Spacer element -->
@@ -948,7 +948,7 @@ class template {
         * @return string HTML content
         */
        function sectionBegin() {
-               if (!$this->sectionFlag)        {
+               if (!$this->sectionFlag) {
                        $this->sectionFlag=1;
                        $str='
 
@@ -969,7 +969,7 @@ class template {
         * @return string HTML content
         */
        function sectionEnd() {
-               if ($this->sectionFlag) {
+               if ($this->sectionFlag) {
                        $this->sectionFlag=0;
                        return '
        </div>
@@ -1016,7 +1016,7 @@ class template {
        function docStyle() {
 
                        // Request background image:
-               if ($this->backGroundImage)     {
+               if ($this->backGroundImage) {
                        $this->inDocStylesArray[]=' BODY { background-image: url('.$this->backPath.$this->backGroundImage.'); }';
                }
 
@@ -1204,7 +1204,7 @@ class template {
         * @return string HTML image tag (if applicable)
         */
        function icons($type, $styleAttribValue = '') {
-               switch($type)   {
+               switch($type) {
                        case self::STATUS_ICON_ERROR:
                                $icon = 'status-dialog-error';
                        break;
@@ -1220,7 +1220,7 @@ class template {
                        default:
                        break;
                }
-               if ($icon)      {
+               if ($icon) {
                        return t3lib_iconWorks::getSpriteIcon($icon);
                }
        }
@@ -1368,14 +1368,14 @@ class template {
 
                $menu='
                <table border="0" cellpadding="0" cellspacing="0" id="typo3-tablemenu">';
-               for($a=0;$a<$rows;$a++) {
+               for($a=0;$a<$rows;$a++) {
                        $menu.='<tr>';
                        $cls=array();
                        $valign='middle';
                        $cls[]='<td valign="'.$valign.'">'.$arr1[$a][0].'</td><td>'.$arr1[$a][1].'</td>';
-                       if (count($arr2))       {
+                       if (count($arr2)) {
                                $cls[]='<td valign="'.$valign.'">'.$arr2[$a][0].'</td><td>'.$arr2[$a][1].'</td>';
-                               if (count($arr3))       {
+                               if (count($arr3)) {
                                        $cls[]='<td valign="'.$valign.'">'.$arr3[$a][0].'</td><td>'.$arr3[$a][1].'</td>';
                                }
                        }
@@ -1481,7 +1481,7 @@ class template {
        function getTabMenu($mainParams, $elementName, $currentValue, $menuItems, $script = '', $addparams = '') {
                $content='';
 
-               if (is_array($menuItems))       {
+               if (is_array($menuItems)) {
                        if (!is_array($mainParams)) {
                                $mainParams = array('id' => $mainParams);
                        }
@@ -1511,7 +1511,7 @@ class template {
        function getTabMenuRaw($menuItems) {
                $content='';
 
-               if (is_array($menuItems))       {
+               if (is_array($menuItems)) {
                        $options='';
 
                        $count = count($menuItems);
@@ -1538,7 +1538,7 @@ class template {
                                $options .= '<td width="' . $width . '%" class="' . $class . '"><a href="' . $url . '" ' . $params . '>' . $label . '</a></td>';
                        }
 
-                       if ($options)   {
+                       if ($options) {
                                $content .= '
                                <!-- Tab menu -->
                                <table cellpadding="0" cellspacing="0" border="0" width="100%" id="typo3-tabmenu">
@@ -1575,7 +1575,7 @@ class template {
 
                $content = '';
 
-               if (is_array($menuItems))       {
+               if (is_array($menuItems)) {
 
                                // Init:
                        $options = array(array());
@@ -1600,7 +1600,7 @@ class template {
                                        $options[$tabRows] = array();
                                }
 
-                               if ($toggle==1) {
+                               if ($toggle==1) {
                                        $onclick = 'this.blur(); DTM_toggle("'.$id.'","'.$index.'"); return false;';
                                } else {
                                        $onclick = 'this.blur(); DTM_activate("'.$id.'","'.$index.'", '.($toggle<0?1:0).'); return false;';
@@ -1616,7 +1616,7 @@ class template {
                                $mouseOverOut = ' onmouseover="DTM_mouseOver(this);" onmouseout="DTM_mouseOut(this);"';
                                $requiredIcon = '<img name="' . $id . '-' . $index . '-REQ" src="' . $GLOBALS['BACK_PATH'] . 'gfx/clear.gif" class="t3-TCEforms-reqTabImg" alt="" />';
 
-                               if (!$foldout)  {
+                               if (!$foldout) {
                                                // Create TAB cell:
                                        $options[$tabRows][] = '
                                                        <td class="'.($isEmpty ? 'disabled' : 'tab').'" id="'.$id.'-'.$index.'-MENU"'.$noWrap.$mouseOverOut.'>'.
@@ -1661,12 +1661,12 @@ class template {
                        }
 
                                // Render menu:
-                       if (count($options))    {
+                       if (count($options)) {
 
                                        // Tab menu is compiled:
-                               if (!$foldout)  {
+                               if (!$foldout) {
                                        $tabContent = '';
-                                       for($a=0;$a<=$tabRows;$a++)     {
+                                       for($a=0;$a<=$tabRows;$a++) {
                                                $tabContent.= '
 
                                        <!-- Tab menu -->
@@ -1873,7 +1873,7 @@ class template {
                                'markers'       => &$markers,
                                'pObj'          => &$this
                        );
-                       foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['docHeaderButtonsHook'] as $funcRef)    {
+                       foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['docHeaderButtonsHook'] as $funcRef) {
                                t3lib_div::callUserFunction($funcRef, $params, $this);
                        }
                }
@@ -1889,7 +1889,7 @@ class template {
         */
        protected function getPagePath($pageRecord) {
                        // Is this a real page
-               if ($pageRecord['uid']) {
+               if ($pageRecord['uid'])&n