[BUGFIX ] CGL violations FunctionCallArgumentSpacing in /typo3/
authorRoland Waldner <most.wanted@gmx.at>
Fri, 25 May 2012 18:31:37 +0000 (20:31 +0200)
committerGeorg Ringer <mail@ringerge.org>
Mon, 28 May 2012 16:43:25 +0000 (18:43 +0200)
There are some violations against the CGL rule
"FunctionCallArgumentSpacingNoSpaceAfterComma" in /typo3/. These will be
reduced by this commit.

Change-Id: I98e1d8a7bc0f373a6b2cc621e9c1abe8b8e1950a
Resolves: #37491
Releases: 6.0
Reviewed-on: http://review.typo3.org/11622
Reviewed-by: Oliver Klee
Tested-by: Oliver Klee
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
28 files changed:
typo3/Bootstrap_Cli.php
typo3/alt_clickmenu.php
typo3/alt_db_navframe.php
typo3/alt_doc.php
typo3/alt_doc_nodoc.php
typo3/alt_file_navframe.php
typo3/alt_shortcut.php
typo3/class.filelistfoldertree.php
typo3/class.webpagetree.php
typo3/classes/class.shortcutmenu.php
typo3/db_new.php
typo3/file_edit.php
typo3/file_newfolder.php
typo3/index.php
typo3/init.php
typo3/move_el.php
typo3/show_item.php
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 80a0820..915e586 100644 (file)
@@ -77,7 +77,7 @@ class Typo3_Bootstrap_Cli {
                        // This is a compatibility layer: Some cli scripts rely on this, like ext:phpunit cli
                $GLOBALS['temp_cliScriptPath'] = array_shift($_SERVER['argv']);
                $GLOBALS['temp_cliKey'] = array_shift($_SERVER['argv']);
-               array_unshift($_SERVER['argv'],$GLOBALS['temp_cliScriptPath']);
+               array_unshift($_SERVER['argv'], $GLOBALS['temp_cliScriptPath']);
        }
 
        /**
index 60d2169..ea4b139 100644 (file)
@@ -968,7 +968,7 @@ class clickMenu {
                return $this->linkItem(
                        $this->label($type),
                        $this->excludeIcon(t3lib_iconWorks::getSpriteIcon('actions-edit-' . $type . ($isSel === $type ? '-release' : ''))),
-                       "top.loadTopMenu('".$this->clipObj->selUrlFile($path,($type=='copy'?1:0),($isSel==$type),$addParam)."');return false;"
+                       "top.loadTopMenu('".$this->clipObj->selUrlFile($path, ($type=='copy'?1:0), ($isSel==$type), $addParam)."');return false;"
                );
        }
 
@@ -983,7 +983,7 @@ class clickMenu {
                $editOnClick='';
                $loc = 'top.content.list_frame';
                if($GLOBALS['BE_USER']->jsConfirmation(4)) {
-                       $conf = "confirm(".$GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess.delete'),basename($path)).t3lib_BEfunc::referenceCount('_FILE',$path,' (There are %s reference(s) to this file!)')).")";
+                       $conf = "confirm(".$GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess.delete'), basename($path)).t3lib_BEfunc::referenceCount('_FILE', $path, ' (There are %s reference(s) to this file!)')).")";
                } else {
                        $conf = '1==1';
                }
@@ -1010,7 +1010,7 @@ class clickMenu {
                $editOnClick='';
                $loc = 'top.content.list_frame';
                if($GLOBALS['BE_USER']->jsConfirmation(2)) {
-               $conf=$loc." && confirm(".$GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess.'.($elInfo[2]=='copy'?'copy':'move').'_into'),$elInfo[0],$elInfo[1])).")";
+               $conf=$loc." && confirm(".$GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:mess.'.($elInfo[2]=='copy'?'copy':'move').'_into'), $elInfo[0], $elInfo[1])).")";
                } else {
                        $conf=$loc;
                }
@@ -1184,7 +1184,7 @@ class clickMenu {
                                                        <!-- Items: -->
                                                <td class="c-item">'.
                                                        implode('</td>
-                                               <td><img'.t3lib_iconWorks::skinImg($this->PH_backPath, 'gfx/acm_spacer2.gif','width="8" height="12"').' alt="" /></td>
+                                               <td><img'.t3lib_iconWorks::skinImg($this->PH_backPath, 'gfx/acm_spacer2.gif', 'width="8" height="12"').' alt="" /></td>
                                                <td class="c-item">',$this->menuItemsForTopFrame($menuItems)).
                                                '</td>
 
@@ -1297,9 +1297,9 @@ class clickMenu {
                                        </tr>';
                        } else {        // Just make normal element:
                                $onClick=$i[3];
-                               $onClick=preg_replace('/return[[:space:]]+hideCM\(\)[[:space:]]*;/i','', $onClick);
-                               $onClick=preg_replace('/return[[:space:]]+false[[:space:]]*;/i','', $onClick);
-                               $onClick=preg_replace('/hideCM\(\);/i','', $onClick);
+                               $onClick=preg_replace('/return[[:space:]]+hideCM\(\)[[:space:]]*;/i', '', $onClick);
+                               $onClick=preg_replace('/return[[:space:]]+false[[:space:]]*;/i', '', $onClick);
+                               $onClick=preg_replace('/hideCM\(\);/i', '', $onClick);
                                if (!$i[5])     $onClick.='Clickmenu.hideAll();';
 
                                $CSM = ' oncontextmenu="'.htmlspecialchars($onClick).';return false;"';
@@ -1329,8 +1329,8 @@ class clickMenu {
 
                                $posArr = t3lib_div::trimExplode(',', $position, 1);
                                foreach($posArr as $pos) {
-                                       list($place,$menuEntry) = t3lib_div::trimExplode(':', $pos, 1);
-                                       list($place,$placeExtra) = t3lib_div::trimExplode('-', $place, 1);
+                                       list($place, $menuEntry) = t3lib_div::trimExplode(':', $pos, 1);
+                                       list($place, $placeExtra) = t3lib_div::trimExplode('-', $place, 1);
 
                                                // bottom
                                        $pointer = count($menuItems);
@@ -1428,7 +1428,7 @@ class clickMenu {
         * @return      string          The icon-image tag prefixed with space char IF the icon should be printed at all due to user settings
         */
        function excludeIcon($iconCode) {
-               return ($GLOBALS['BE_USER']->uc['noMenuMode'] && strcmp($GLOBALS['BE_USER']->uc['noMenuMode'],'icons')) ? '' : ' '.$iconCode;
+               return ($GLOBALS['BE_USER']->uc['noMenuMode'] && strcmp($GLOBALS['BE_USER']->uc['noMenuMode'], 'icons')) ? '' : ' '.$iconCode;
        }
 
        /**
index 7725d43..a463f9f 100644 (file)
@@ -194,7 +194,7 @@ class SC_alt_db_navframe {
                                '</a>           <br />' .
                                $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_core.xml:labels.path', 1) . ': <span title="' .
                                htmlspecialchars($this->active_tempMountPoint['_thePathFull']) . '">' .
-                               htmlspecialchars(t3lib_div::fixed_lgd_cs($this->active_tempMountPoint['_thePath'],-50)).
+                               htmlspecialchars(t3lib_div::fixed_lgd_cs($this->active_tempMountPoint['_thePath'], -50)).
                                '</span>
                        ';
 
@@ -276,7 +276,7 @@ class SC_alt_db_navframe {
                        '</a>';
 
                        // CSH
-               $buttons['csh'] = str_replace('typo3-csh-inline','typo3-csh-inline show-right',t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'pagetree', $GLOBALS['BACK_PATH'], '', TRUE));
+               $buttons['csh'] = str_replace('typo3-csh-inline', 'typo3-csh-inline show-right', t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'pagetree', $GLOBALS['BACK_PATH'], '', TRUE));
 
                        // Filter
                if ($this->hasFilterBox) {
@@ -330,7 +330,7 @@ class SC_alt_db_navframe {
 
                        // Set/Cancel Temporary DB Mount:
                if (strlen($this->setTempDBmount)) {
-                       $set = t3lib_utility_Math::forceIntegerInRange($this->setTempDBmount,0);
+                       $set = t3lib_utility_Math::forceIntegerInRange($this->setTempDBmount, 0);
                        if ($set > 0 && $GLOBALS['BE_USER']->isInWebMount($set)){
                                        // Setting...:
                                $this->settingTemporaryMountPoint($set);
@@ -362,7 +362,7 @@ class SC_alt_db_navframe {
         * @return      void
         */
        function settingTemporaryMountPoint($pageId) {
-               $GLOBALS['BE_USER']->setAndSaveSessionData('pageTree_temporaryMountPoint',intval($pageId));
+               $GLOBALS['BE_USER']->setAndSaveSessionData('pageTree_temporaryMountPoint', intval($pageId));
        }
 
 
index f426292..ecfbf10 100644 (file)
@@ -753,7 +753,7 @@ class SC_alt_doc {
                                                                $thePrevUid = $rec['uid'];
                                                        } else {
                                                                $this->errorC++;
-                                                               $editForm .= $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.noEditPermission',1) . '<br /><br />' .
+                                                               $editForm .= $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.noEditPermission', 1) . '<br /><br />' .
                                                                        ($deniedAccessReason ? 'Reason: ' . htmlspecialchars($deniedAccessReason) . '<br /><br />' : '');
                                                        }
                                                }
@@ -825,7 +825,7 @@ class SC_alt_doc {
 
                                        // Delete:
                                if ($this->firstEl['deleteAccess'] && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly'] && !$this->getNewIconMode($this->firstEl['table'],'disableDelete')) {
-                                       $aOnClick = 'return deleteRecord(\''.$this->firstEl['table'].'\',\''.$this->firstEl['uid'].'\',unescape(\''.rawurlencode($this->retUrl).'\'));';
+                                       $aOnClick = 'return deleteRecord(\''.$this->firstEl['table'].'\',\''.$this->firstEl['uid'].'\', unescape(\''.rawurlencode($this->retUrl).'\'));';
                                        $buttons['delete'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '" title="' . $GLOBALS['LANG']->getLL('deleteItem', TRUE) . '">' .
                                                        t3lib_iconWorks::getSpriteIcon('actions-edit-delete') .
                                                        '</a>';
@@ -1109,7 +1109,7 @@ class SC_alt_doc {
                                                // If any languages are left, make selector:
                                        if (count($langSelItems)>1) {
                                                $onChange = 'if(this.options[this.selectedIndex].value){window.location.href=(this.options[this.selectedIndex].value);}';
-                                               $content = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.language',1).' <select name="_langSelector" onchange="'.htmlspecialchars($onChange).'">
+                                               $content = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.language', 1).' <select name="_langSelector" onchange="'.htmlspecialchars($onChange).'">
                                                        '.implode('', $langSelItems).'
                                                        </select>';
                                        }
@@ -1127,7 +1127,7 @@ class SC_alt_doc {
         * @return      void
         */
        function localizationRedirect($justLocalized) {
-               list($table,$orig_uid,$language) = explode(':', $justLocalized);
+               list($table, $orig_uid, $language) = explode(':', $justLocalized);
 
                if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']) {
                        $localizedRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
index cbf6649..f65dc03 100644 (file)
@@ -126,12 +126,12 @@ class SC_alt_doc_nodoc {
                        // Finding module images: PAGE
                $imgFile = $GLOBALS['LANG']->moduleLabels['tabs_images']['web_layout_tab'];
                $imgInfo = @getimagesize($imgFile);
-               $img_web_layout = is_array($imgInfo) ? '<img src="../'.substr($imgFile,strlen(PATH_site)).'" '.$imgInfo[3].' alt="" />' : '';
+               $img_web_layout = is_array($imgInfo) ? '<img src="../'.substr($imgFile, strlen(PATH_site)).'" '.$imgInfo[3].' alt="" />' : '';
 
                        // Finding module images: LIST
                $imgFile = $GLOBALS['LANG']->moduleLabels['tabs_images']['web_list_tab'];
                $imgInfo = @getimagesize($imgFile);
-               $img_web_list = is_array($imgInfo) ? '<img src="../'.substr($imgFile,strlen(PATH_site)).'" '.$imgInfo[3].' alt="" />' : '';
+               $img_web_list = is_array($imgInfo) ? '<img src="../'.substr($imgFile, strlen(PATH_site)).'" '.$imgInfo[3].' alt="" />' : '';
 
 
                        // If either the Web>List OR Web>Page module are active, show the little message with links to those modules:
index 2f9e794..3d9caf8 100644 (file)
@@ -254,7 +254,7 @@ class SC_alt_file_navframe {
                '</a>';
 
                        // CSH
-               $buttons['csh'] = str_replace('typo3-csh-inline','typo3-csh-inline show-right',t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filetree', $GLOBALS['BACK_PATH']));
+               $buttons['csh'] = str_replace('typo3-csh-inline', 'typo3-csh-inline show-right', t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filetree', $GLOBALS['BACK_PATH']));
 
                return $buttons;
        }
index 33b9e95..590cc2b 100644 (file)
@@ -138,12 +138,12 @@ 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 (preg_match('/\&edit\[(.*)\]\[(.*)\]=edit/', $url, $matches)) {
                                        // Edit record
                                $description = '';      // TODO: Set something useful
                        } else {
                                        // Page listing
-                               $pageRow = t3lib_BEfunc::getRecord('pages',$page_id);
+                               $pageRow = t3lib_BEfunc::getRecord('pages', $page_id);
                                if (count($pageRow)) {
                                                // If $page_id is an integer, set the description to the title of that page
                                        $description = $pageRow['title'];
@@ -174,7 +174,7 @@ class SC_alt_shortcut {
                $addUSERWhere = (!$GLOBALS['BE_USER']->isAdmin() ? ' AND userid=' . intval($GLOBALS['BE_USER']->user['uid']) : '');
 
                        // Deleting shortcuts:
-               if (strcmp($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);
                        }
@@ -269,7 +269,7 @@ 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)) {
+                               if (strcmp('', $v) && strcmp('0', $v)) {
                                        $this->groupLabels[$k] = (string)$v;
                                } elseif ($GLOBALS['BE_USER']->isAdmin()) {
                                        unset($this->groupLabels[$k]);
@@ -280,8 +280,8 @@ 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)) {
-                       $globalGroups .= ','.implode(',',array_keys($this->groupLabels));
-                       $globalGroups = str_replace(',',',-',$globalGroups);    // Ugly hack to make the UIDs negative - is there any better solution?
+                       $globalGroups .= ','.implode(',', array_keys($this->groupLabels));
+                       $globalGroups = str_replace(',', ',-', $globalGroups);  // Ugly hack to make the UIDs negative - is there any better solution?
                }
 
                        // Fetching shortcuts to display for this user:
@@ -296,15 +296,15 @@ class SC_alt_shortcut {
 
                        // Traverse shortcuts
                while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                       $mParts = explode('|',$row['module_name']);
+                       $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']);
+                       $mParts = explode('_', $row['M_module_name']?$row['M_module_name']:$row['module_name']);
                        $qParts = parse_url($row['url']);
 
                        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 :-)
+                               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;
                                }
 
@@ -314,7 +314,7 @@ class SC_alt_shortcut {
                                        if (!$GLOBALS['BE_USER']->isInWebMount($page_id)) continue;
 
                                                // Check for record access
-                                       $pageRow = t3lib_BEfunc::getRecord('pages',$page_id);
+                                       $pageRow = t3lib_BEfunc::getRecord('pages', $page_id);
                                        if (!$GLOBALS['BE_USER']->doesUserHaveAccess($pageRow, $perms = 1)) {
                                                continue;
                                        }
@@ -326,20 +326,20 @@ class SC_alt_shortcut {
                        }
 
                        $sc_group = $row['sc_group'];
-                       if ($sc_group && strcmp($formerGr,$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 ($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
+                                               $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) {
                                                $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>';
+                                               $this->linesPre[]='<td>&nbsp;</td><td class="bgColor5"><a href="#" onclick="'.htmlspecialchars($onC).'" title="'.$GLOBALS['LANG']->getLL('bookmark_delAllInCat', 1).'">'.$label.'</a></td>';
                                        } else {
-                                               $label = $GLOBALS['LANG']->getLL('bookmark_global',1).': '.($label ? $label : abs($sc_group));  // Fallback label
+                                               $label = $GLOBALS['LANG']->getLL('bookmark_global', 1).': '.($label ? $label : abs($sc_group)); // Fallback label
                                                $this->lines[]='<td>&nbsp;</td><td class="bgColor5">'.$label.'</td>';
                                        }
                                        unset($label);
@@ -351,12 +351,12 @@ class SC_alt_shortcut {
                        if ($row['description'] && ($row['uid']!=$this->editSC)) {
                                $label = $row['description'];
                        } else {
-                               $label = t3lib_div::fixed_lgd_cs(rawurldecode($qParts['query']),150);
+                               $label = t3lib_div::fixed_lgd_cs(rawurldecode($qParts['query']), 150);
                        }
-                       $titleA = $this->itemLabel($label,$row['module_name'],$row['M_module_name']);
+                       $titleA = $this->itemLabel($label, $row['module_name'], $row['M_module_name']);
 
                        $editSH = ($row['sc_group']>=0 || $GLOBALS['BE_USER']->isAdmin()) ? 'editSh('.intval($row['uid']).');' : "alert('".$GLOBALS['LANG']->getLL('bookmark_onlyAdmin')."')";
-                       $jumpSC = 'jump(unescape(\''.rawurlencode($row['url']).'\'),\''.implode('_',$mParts).'\',\''.$mParts[0].'\');';
+                       $jumpSC = 'jump(unescape(\''.rawurlencode($row['url']).'\'),\''.implode('_', $mParts).'\',\''.$mParts[0].'\');';
                        $onC = 'if (document.shForm.editShortcut_check && document.shForm.editShortcut_check.checked){'.$editSH.'}else{'.$jumpSC.'}return false;';
                        if ($sc_group>=0)       {       // user defined groups show up first
                                $this->linesPre[]='<td class="'.$bgColorClass.'"><a href="#" onclick="'.htmlspecialchars($onC).'"><img src="'.$this->getIcon($row['module_name']).'" title="'.htmlspecialchars($titleA).'" alt="" /></a></td>';
@@ -364,27 +364,27 @@ class SC_alt_shortcut {
                                $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'])) {
-                               $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>';
+                               $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>';
                        }
                        $formerGr=$row['sc_group'];
                }
                ksort($this->selOpt);
-               array_unshift($this->selOpt,'<option>['.$GLOBALS['LANG']->getLL('bookmark_selSC',1).']</option>');
+               array_unshift($this->selOpt, '<option>['.$GLOBALS['LANG']->getLL('bookmark_selSC', 1).']</option>');
 
                $this->editLoadedFunc();
                $this->editPageIdFunc();
 
                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);" />'.
+                               $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).')':'').
-                                       ($this->searchFor?'&nbsp;'.$GLOBALS['LANG']->getLL('bookmark_searchFor',1).' <strong>\''.htmlspecialchars($this->searchFor).'\'</strong>':'').
+                                       (is_array($this->theEditRec)?'&nbsp;<strong>'.$GLOBALS['LANG']->getLL('bookmark_loadEdit', 1).' \''.t3lib_BEfunc::getRecordTitle('pages', $this->theEditRec,TRUE).'\'</strong> ('.htmlspecialchars($this->editPath).')':'').
+                                       ($this->searchFor?'&nbsp;'.$GLOBALS['LANG']->getLL('bookmark_searchFor', 1).' <strong>\''.htmlspecialchars($this->searchFor).'\'</strong>':'').
                                        '</td>';
                } else $editIdCode = '';
 
                        // Adding CSH:
-               $editIdCode.= '<td>&nbsp;'.t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'bookmarks', $GLOBALS['BACK_PATH'],'',TRUE).'</td>';
+               $editIdCode.= '<td>&nbsp;'.t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'bookmarks', $GLOBALS['BACK_PATH'], '', TRUE).'</td>';
 
                        // Compile it all:
                $this->content.='
@@ -409,7 +409,7 @@ class SC_alt_shortcut {
                                        <td align="right">';
                if ($this->hasWorkspaceAccess()) {
                        $this->content .= $this->workspaceSelector() .
-                                                               t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'workspaceSelector', $GLOBALS['BACK_PATH'],'',TRUE);
+                                                               t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'workspaceSelector', $GLOBALS['BACK_PATH'], '', TRUE);
                }
                $this->content .= '
                                        </td>
@@ -425,7 +425,7 @@ class SC_alt_shortcut {
 
                        // 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])) {
-                       $JSaction = t3lib_BEfunc::editOnClick('&edit['.$this->alternativeTableUid[0].']['.$this->alternativeTableUid[1].']=edit','','dummy.php');
+                       $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();');
                }
 
@@ -455,28 +455,28 @@ class SC_alt_shortcut {
                        $opt[]='<option value="0"></option>';
 
                        foreach($this->groupLabels as $k=>$v) {
-                               if ($v && strcmp('1',$v)) {
+                               if ($v && strcmp('1', $v)) {
                                        $label = $v;
                                } else {
-                                       $label = $GLOBALS['LANG']->getLL('bookmark_group_'.$k,1);
-                                       if (!$label)    $label = $GLOBALS['LANG']->getLL('bookmark_group',1).' '.$k;    // Fallback label
+                                       $label = $GLOBALS['LANG']->getLL('bookmark_group_'.$k, 1);
+                                       if (!$label)    $label = $GLOBALS['LANG']->getLL('bookmark_group', 1).' '.$k;   // Fallback label
                                }
-                               $opt[]='<option value="'.$k.'"'.(!strcmp($this->editSC_rec['sc_group'],$k)?' selected="selected"':'').'>'.$label.'</option>';
+                               $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 ($v && strcmp('1', $v)) {
                                                $label = $v;
                                        } else {
-                                               $label = $GLOBALS['LANG']->getLL('bookmark_group_'.$k,1);
-                                               if (!$label)    $label = $GLOBALS['LANG']->getLL('bookmark_group',1).' '.$k;    // Fallback label
+                                               $label = $GLOBALS['LANG']->getLL('bookmark_group_'.$k, 1);
+                                               if (!$label)    $label = $GLOBALS['LANG']->getLL('bookmark_group', 1).' '.$k;   // Fallback label
                                        }
-                                       $label = $GLOBALS['LANG']->getLL('bookmark_global',1).': '.$label;      // Add a prefix for global groups
+                                       $label = $GLOBALS['LANG']->getLL('bookmark_global', 1).': '.$label;     // Add a prefix for global groups
 
-                                       $opt[]='<option value="-'.$k.'"'.(!strcmp($this->editSC_rec['sc_group'],'-'.$k)?' selected="selected"':'').'>'.$label.'</option>';
+                                       $opt[]='<option value="-'.$k.'"'.(!strcmp($this->editSC_rec['sc_group'], '-'.$k)?' selected="selected"':'').'>'.$label.'</option>';
                                }
-                               $opt[]='<option value="-100"'.(!strcmp($this->editSC_rec['sc_group'],'-100')?' selected="selected"':'').'>'.$GLOBALS['LANG']->getLL('bookmark_global',1).': '.$GLOBALS['LANG']->getLL('bookmark_all',1).'</option>';
+                               $opt[]='<option value="-100"'.(!strcmp($this->editSC_rec['sc_group'], '-100')?' selected="selected"':'').'>'.$GLOBALS['LANG']->getLL('bookmark_global', 1).': '.$GLOBALS['LANG']->getLL('bookmark_all', 1).'</option>';
                        }
 
                                // border="0" hspace="2" width="21" height="16" - not XHTML compliant in <input type="image" ...>
@@ -488,12 +488,12 @@ class SC_alt_shortcut {
                                <table border="0" cellpadding="0" cellspacing="0" id="typo3-shortcuts-editing">
                                        <tr>
                                                <td>&nbsp;&nbsp;</td>
-                                               <td><input type="image" class="c-inputButton" name="_savedok"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/savedok.gif','').' title="'.$GLOBALS['LANG']->getLL('shortcut_save',1).'" /></td>
-                                               <td><input type="image" class="c-inputButton" name="_saveclosedok"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/saveandclosedok.gif','').' title="'.$GLOBALS['LANG']->getLL('bookmark_saveClose',1).'" /></td>
-                                               <td><input type="image" class="c-inputButton" name="_closedok"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/closedok.gif','').' title="'.$GLOBALS['LANG']->getLL('bookmark_close',1).'" /></td>
-                                               <td><input type="image" class="c-inputButton" name="_deletedok"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/deletedok.gif','').' title="'.$GLOBALS['LANG']->getLL('bookmark_delete',1).'" /></td>
+                                               <td><input type="image" class="c-inputButton" name="_savedok"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/savedok.gif', '').' title="'.$GLOBALS['LANG']->getLL('shortcut_save', 1).'" /></td>
+                                               <td><input type="image" class="c-inputButton" name="_saveclosedok"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/saveandclosedok.gif', '').' title="'.$GLOBALS['LANG']->getLL('bookmark_saveClose', 1).'" /></td>
+                                               <td><input type="image" class="c-inputButton" name="_closedok"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/closedok.gif', '').' title="'.$GLOBALS['LANG']->getLL('bookmark_close', 1).'" /></td>
+                                               <td><input type="image" class="c-inputButton" name="_deletedok"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/deletedok.gif', '').' title="'.$GLOBALS['LANG']->getLL('bookmark_delete', 1).'" /></td>
                                                <td><input name="editName" type="text" value="'.htmlspecialchars($this->editSC_rec['description']).'"'.$this->doc->formWidth(15).' /></td>
-                                               <td><select name="editGroup">'.implode('',$opt).'</select></td>
+                                               <td><select name="editGroup">'.implode('', $opt).'</select></td>
                                        </tr>
                                </table>
                                <input type="hidden" name="whichItem" value="'.$this->editSC_rec['uid'].'" />
@@ -503,11 +503,11 @@ class SC_alt_shortcut {
 
                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>';
+                       $this->lines[]='<td><select name="_selSC" onchange="eval(this.options[this.selectedIndex].value);this.selectedIndex=0;">'.implode('', $this->selOpt).'</select></td>';
                }
 
                        // $this->linesPre contains elements with sc_group>=0
-               $this->lines = array_merge($this->linesPre,$this->lines);
+               $this->lines = array_merge($this->linesPre, $this->lines);
 
                if (count($this->lines)) {
                        if (!$GLOBALS['BE_USER']->getTSConfigVal('options.mayNotCreateEditBookmarks')) {
@@ -531,24 +531,24 @@ class SC_alt_shortcut {
                if (!t3lib_extMgm::isLoaded('cms'))     return;
 
                        // EDIT page:
-               $this->editPage = trim($GLOBALS['LANG']->csConvObj->conv_case($GLOBALS['LANG']->charSet,$this->editPage,'toLower'));
+               $this->editPage = trim($GLOBALS['LANG']->csConvObj->conv_case($GLOBALS['LANG']->charSet, $this->editPage, 'toLower'));
                $this->editError = '';
                $this->theEditRec = '';
                $this->searchFor = '';
                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);
+                       $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)) {
-                                       $this->theEditRec = t3lib_BEfunc::getRecordWSOL('pages',$this->editPage,'*',$where);
+                                       $this->theEditRec = t3lib_BEfunc::getRecordWSOL('pages', $this->editPage, '*', $where);
                                } else {
-                                       $records = t3lib_BEfunc::getRecordsByField('pages','alias',$this->editPage,$where);
+                                       $records = t3lib_BEfunc::getRecordsByField('pages', 'alias', $this->editPage, $where);
                                        if (is_array($records)) {
                                                $this->theEditRec = reset($records);
-                                               t3lib_BEfunc::workspaceOL('pages',$this->theEditRec);
+                                               t3lib_BEfunc::workspaceOL('pages', $this->theEditRec);
                                        }
                                }
                                if (!is_array($this->theEditRec)) {
@@ -663,7 +663,7 @@ class SC_alt_shortcut {
 
                        // 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');
+                       $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)) {
@@ -680,7 +680,7 @@ class SC_alt_shortcut {
                                $options[$value] = '<option value="'.htmlspecialchars($value).'"'.$selected.'>'.htmlspecialchars($label).'</option>';
                        }
                } else {
-                       $options[] = '<option value="-99">'.$GLOBALS['LANG']->getLL('bookmark_noWSfound',1).'</option>';
+                       $options[] = '<option value="-99">'.$GLOBALS['LANG']->getLL('bookmark_noWSfound', 1).'</option>';
                }
 
                $selector = '';
@@ -693,7 +693,7 @@ class SC_alt_shortcut {
                                        t3lib_iconWorks::getSpriteIconForRecord('sys_workspace', array()).
                                        '</a>';
                if (count($options) > 1) {
-                       $selector .= '<select name="_workspaceSelector" onchange="changeWorkspace(this.options[this.selectedIndex].value);">'.implode('',$options).'</select>';
+                       $selector .= '<select name="_workspaceSelector" onchange="changeWorkspace(this.options[this.selectedIndex].value);">'.implode('', $options).'</select>';
                }
 
                return $selector;
@@ -718,12 +718,12 @@ 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)) {
-                       $Ifilename = '../'.substr($Ifilename,strlen(PATH_site));
+                       $Ifilename = '../'.substr($Ifilename, strlen(PATH_site));
                }
                return $backPath.$Ifilename;
        }
@@ -736,7 +736,7 @@ class SC_alt_shortcut {
         */
        function getIcon($modName) {
                if ($GLOBALS['LANG']->moduleLabels['tabs_images'][$modName.'_tab']) {
-                       $icon = $this->mIconFilename($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';
                } elseif ($modName=='xMOD_file_edit.php') {
@@ -757,11 +757,11 @@ 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_') {
-                       $label=substr($modName,5);
+       function itemLabel($inlabel, $modName, $M_modName='') {
+               if (substr($modName, 0, 5)=='xMOD_') {
+                       $label=substr($modName, 5);
                } else {
-                       $split = explode('_',$modName);
+                       $split = explode('_', $modName);
                        $label = $GLOBALS['LANG']->moduleLabels['tabs'][$split[0].'_tab'];
                        if (count($split)>1) {
                                $label.='>'.$GLOBALS['LANG']->moduleLabels['tabs'][$modName.'_tab'];
index da8e15a..cc34a71 100644 (file)
  *
  *   71: class fileListTree extends t3lib_browseTree
  *   81:     function webPageTree()
- *   92:     function wrapIcon($icon,&$row)
- *  130:     function wrapStop($str,$row)
- *  146:     function wrapTitle($title,$row,$bank=0)
+ *   92:     function wrapIcon($icon, &$row)
+ *  130:     function wrapStop($str, $row)
+ *  146:     function wrapTitle($title, $row, $bank=0)
  *  165:     function printTree($treeItems = '')
- *  271:     function PMicon($row,$a,$c,$nextCount,$exp)
+ *  271:     function PMicon($row, $a, $c, $nextCount, $exp)
  *  292:     function PMiconATagWrap($icon, $cmd, $isExpand = TRUE)
  *  309:     function getBrowsableTree()
- *  377:     function getTree($uid, $depth=999, $depthData='',$blankLineCode='',$subCSSclass='')
+ *  377:     function getTree($uid, $depth=999, $depthData='', $blankLineCode='', $subCSSclass='')
  *
  *
  * TOTAL FUNCTIONS: 9
index 01283aa..0d7eae5 100644 (file)
  *
  *   71: class webPageTree extends t3lib_browseTree
  *   81:     function webPageTree()
- *   92:     function wrapIcon($icon,&$row)
- *  130:     function wrapStop($str,$row)
- *  146:     function wrapTitle($title,$row,$bank=0)
+ *   92:     function wrapIcon($icon, &$row)
+ *  130:     function wrapStop($str, $row)
+ *  146:     function wrapTitle($title, $row, $bank=0)
  *  165:     function printTree($treeArr = '')
- *  271:     function PMicon($row,$a,$c,$nextCount,$exp)
+ *  271:     function PMicon($row, $a, $c, $nextCount, $exp)
  *  292:     function PMiconATagWrap($icon, $cmd, $isExpand = TRUE)
  *  309:     function getBrowsableTree()
- *  377:     function getTree($uid, $depth=999, $depthData='',$blankLineCode='',$subCSSclass='')
+ *  377:     function getTree($uid, $depth=999, $depthData='', $blankLineCode='', $subCSSclass='')
  *
  *
  * TOTAL FUNCTIONS: 9
@@ -92,17 +92,17 @@ class webPageTree extends t3lib_browseTree {
         */
        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']))).
+                               t3lib_iconWorks::getSpriteIcon('status-warning-in-use', array('title'=>htmlspecialchars($lockInfo['msg']))).
                                '</a>';
                } else $lockIcon = '';
 
                        // Wrap icon in click-menu link.
                if (!$this->ext_IconMode) {
-                       $thePageIcon = $GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon($thePageIcon,'pages',$row['uid'],0,'&bank='.$this->bank);
-               } elseif (!strcmp($this->ext_IconMode,'titlelink')) {
+                       $thePageIcon = $GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon($thePageIcon, 'pages', $row['uid'], 0, '&bank='.$this->bank);
+               } elseif (!strcmp($this->ext_IconMode, 'titlelink')) {
                        $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->treeName.'\');';
                        $thePageIcon='<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$thePageIcon.'</a>';
                }
@@ -119,9 +119,9 @@ class webPageTree extends t3lib_browseTree {
                        // Call stats information hook
                $stat = '';
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'])) {
-                       $_params = array('pages',$row['uid']);
+                       $_params = array('pages', $row['uid']);
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'] as $_funcRef) {
-                               $stat.=t3lib_div::callUserFunction($_funcRef,$_params,$this);
+                               $stat.=t3lib_div::callUserFunction($_funcRef, $_params, $this);
                        }
                }
 
@@ -136,7 +136,7 @@ class webPageTree extends t3lib_browseTree {
         * @return      string          Modified string
         * @access private
         */
-       function wrapStop($str,$row) {
+       function wrapStop($str, $row) {
                if ($row['php_tree_stop']) {
                        $str.='<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('setTempDBmount' => $row['uid']))).'" class="typo3-red">+</a> ';
                }
@@ -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);
@@ -163,7 +163,7 @@ class webPageTree extends t3lib_browseTree {
                }
 
                $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->domIdPrefix.$this->getId($row).'\','.$bank.');';
-               $CSM = ' oncontextmenu="'.htmlspecialchars($GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon('','pages',$row['uid'],0,'&bank='.$this->bank,'',TRUE)).';"';
+               $CSM = ' oncontextmenu="'.htmlspecialchars($GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon('', 'pages', $row['uid'], 0, '&bank='.$this->bank, '', TRUE)).';"';
                $thePageTitle='<a href="#" onclick="'.htmlspecialchars($aOnClick).'"'.$CSM.'>'.$title.'</a>';
 
                        // Wrap title in a drag/drop span.
@@ -228,7 +228,7 @@ class webPageTree extends t3lib_browseTree {
                        $itemHTML .='
                                <li id="'.$idAttr.'"'.($classAttr ? ' class="'.$classAttr.'"' : '').'><div class="treeLinkItem">'.
                                        $v['HTML'].
-                                       $this->wrapTitle($this->getTitleStr($v['row'],$titleLen),$v['row'],$v['bank'])."</div>\n";
+                                       $this->wrapTitle($this->getTitleStr($v['row'], $titleLen), $v['row'], $v['bank'])."</div>\n";
 
 
                        if(!$v['hasSub']) { $itemHTML .= '</li>'; }
@@ -292,14 +292,14 @@ 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="" />';
+               $icon = '<img'.t3lib_iconWorks::skinImg($this->backPath, 'gfx/ol/'.$PM.$BTM.'.gif', 'width="18" height="16"').' alt="" />';
 
                if ($nextCount) {
                        $cmd = $this->bank.'_'.($exp?'0_':'1_').$row['uid'].'_'.$this->treeName;
-                       $icon = $this->PMiconATagWrap($icon,$cmd,!$exp);
+                       $icon = $this->PMiconATagWrap($icon, $cmd, !$exp);
                }
                return $icon;
        }
@@ -383,7 +383,7 @@ class webPageTree extends t3lib_browseTree {
                                        $this->getTree($uid, 999, '', $rootRec['_SUBCSSCLASS']);
                                }
                                        // Add tree:
-                               $treeArr=array_merge($treeArr,$this->tree);
+                               $treeArr=array_merge($treeArr, $this->tree);
                        }
                }
                return $this->printTree($treeArr);
@@ -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:
@@ -443,7 +443,7 @@ class webPageTree extends t3lib_browseTree {
 
                                // Merge:
                        $outOfMenuPages_alphabetic[0]['_FIRST_NOT_IN_MENU']=TRUE;
-                       $allRows = array_merge($inMenuPages,$outOfMenuPages_alphabetic);
+                       $allRows = array_merge($inMenuPages, $outOfMenuPages_alphabetic);
                } else {
                        $allRows = $inMenuPages;
                }
@@ -483,13 +483,13 @@ class webPageTree extends t3lib_browseTree {
                                // Set HTML-icons, if any:
                        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>';
+                                       $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 = '';
                                }
 
-                               $HTML.= $this->PMicon($row,$a,$c,$nextCount,$exp);
-                               $HTML.= $this->wrapStop($this->getIcon($row),$row);
+                               $HTML.= $this->PMicon($row, $a, $c, $nextCount, $exp);
+                               $HTML.= $this->wrapStop($this->getIcon($row), $row);
                        }
 
                                // Finally, add the row/HTML content to the ->tree array in the reserved key.
index 3bdb4c9..b58db65 100644 (file)
@@ -683,7 +683,7 @@ class ShortcutMenu implements backend_toolbarItem {
                                        }
 
                                        if(is_array($GLOBALS['TCA'][$table]['ctrl']['enablecolumns'])) {
-                                               $selectFields = array_merge($selectFields,$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']);
+                                               $selectFields = array_merge($selectFields, $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']);
                                        }
 
                                        if($GLOBALS['TCA'][$table]['ctrl']['type']) {
index 2696987..8d6b74e 100644 (file)
@@ -61,8 +61,8 @@ class localPageTree extends t3lib_pageTree {
         * @param       array           Item row
         * @return      string          Wrapping icon image.
         */
-       function wrapIcon($icon,$row) {
-               return $this->addTagAttributes($icon,' title="id='.htmlspecialchars($row['uid']).'"');
+       function wrapIcon($icon, $row) {
+               return $this->addTagAttributes($icon, ' title="id='.htmlspecialchars($row['uid']).'"');
        }
 
        /**
@@ -165,14 +165,14 @@ class SC_db_new {
 
                        // Id a positive id is supplied, ask for the page record with permission information contained:
                if ($this->id > 0) {
-                       $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
+                       $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']) {
                                // Get record of parent page
 
-                       $this->pidInfo=t3lib_BEfunc::getRecord('pages',$this->pageinfo['pid']);
+                       $this->pidInfo=t3lib_BEfunc::getRecord('pages', $this->pageinfo['pid']);
                                // Checking the permissions for the user with regard to the parent page: Can he create new pages, new content record, new page after?
                        if ($GLOBALS['BE_USER']->doesUserHaveAccess($this->pageinfo, 8)) {
                                $this->newPagesInto=1;
@@ -207,14 +207,14 @@ class SC_db_new {
                        // If there was a page - or if the user is admin (admins has access to the root) we proceed:
                if ($this->pageinfo['uid'] || $GLOBALS['BE_USER']->isAdmin()) {
                                // Acquiring TSconfig for this module/current page:
-                       $this->web_list_modTSconfig = t3lib_BEfunc::getModTSconfig($this->pageinfo['uid'],'mod.web_list');
-                       $this->allowedNewTables = t3lib_div::trimExplode(',',$this->web_list_modTSconfig['properties']['allowedNewTables'],1);
-                       $this->deniedNewTables = t3lib_div::trimExplode(',',$this->web_list_modTSconfig['properties']['deniedNewTables'],1);
+                       $this->web_list_modTSconfig = t3lib_BEfunc::getModTSconfig($this->pageinfo['uid'], 'mod.web_list');
+                       $this->allowedNewTables = t3lib_div::trimExplode(',', $this->web_list_modTSconfig['properties']['allowedNewTables'], 1);
+                       $this->deniedNewTables = t3lib_div::trimExplode(',', $this->web_list_modTSconfig['properties']['deniedNewTables'], 1);
 
                                // Acquiring TSconfig for this module/parent page:
-                       $this->web_list_modTSconfig_pid = t3lib_BEfunc::getModTSconfig($this->pageinfo['pid'],'mod.web_list');
-                       $this->allowedNewTables_pid = t3lib_div::trimExplode(',',$this->web_list_modTSconfig_pid['properties']['allowedNewTables'],1);
-                       $this->deniedNewTables_pid = t3lib_div::trimExplode(',',$this->web_list_modTSconfig_pid['properties']['deniedNewTables'],1);
+                       $this->web_list_modTSconfig_pid = t3lib_BEfunc::getModTSconfig($this->pageinfo['pid'], 'mod.web_list');
+                       $this->allowedNewTables_pid = t3lib_div::trimExplode(',', $this->web_list_modTSconfig_pid['properties']['allowedNewTables'], 1);
+                       $this->deniedNewTables_pid = t3lib_div::trimExplode(',', $this->web_list_modTSconfig_pid['properties']['deniedNewTables'], 1);
 
                                // More init:
                        if (!$this->showNewRecLink('pages')) {
@@ -246,7 +246,7 @@ class SC_db_new {
                        }
 
                                // Add all the content to an output section
-                       $this->content.=$this->doc->section('',$this->code);
+                       $this->content.=$this->doc->section('', $this->code);
 
                                                        // Setting up the buttons and markers for docheader
                        $docHeaderButtons = $this->getButtons();
@@ -357,11 +357,11 @@ class SC_db_new {
                $this->tRows = array();
 
                        // tree images
-               $halfLine = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/ol/halfline.gif', 'width="18" height="8"') . ' alt="" />';
-               $firstLevel = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/ol/join.gif', 'width="18" height="16"') . ' alt="" />';
-               $secondLevel = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/ol/line.gif', 'width="18" height="16"') . ' alt="" />
-                                               <img' . t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/ol/join.gif', 'width="18" height="16"') . ' alt="" />';
-               $secondLevelLast = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/ol/line.gif', 'width="18" height="16"') . ' alt="" />
+               $halfLine = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/halfline.gif', 'width="18" height="8"') . ' alt="" />';
+               $firstLevel = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/join.gif', 'width="18" height="16"') . ' alt="" />';
+               $secondLevel = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/line.gif', 'width="18" height="16"') . ' alt="" />
+                                               <img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/join.gif', 'width="18" height="16"') . ' alt="" />';
+               $secondLevelLast = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/line.gif', 'width="18" height="16"') . ' alt="" />
                                                <img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/joinbottom.gif', 'width="18" height="16"') . ' alt="" />';
 
                        // Get TSconfig for current page
@@ -382,7 +382,7 @@ class SC_db_new {
                        // New Page
                $table = 'pages';
                $v = $GLOBALS['TCA'][$table];
-               $pageIcon = t3lib_iconWorks::getSpriteIconForRecord($table,array());
+               $pageIcon = t3lib_iconWorks::getSpriteIconForRecord($table, array());
 
                $newPageIcon = t3lib_iconWorks::getSpriteIcon('actions-page-new');
                $rowContent = '';
@@ -391,7 +391,7 @@ class SC_db_new {
                $newPageLinks = array();
                if ($this->newPagesInto
                        && $this->isTableAllowedForThisPage($this->pageinfo, 'pages')
-                       && $GLOBALS['BE_USER']->check('tables_modify','pages')
+                       && $GLOBALS['BE_USER']->check('tables_modify', 'pages')
                        && $GLOBALS['BE_USER']->workspaceCreateNewRecord($this->pageinfo['_ORIG_uid']?$this->pageinfo['_ORIG_uid']:$this->id, 'pages')
                        ) {
 
@@ -413,7 +413,7 @@ class SC_db_new {
 
                                $newPageLinks[] = $this->linkWrap(
                                        $pageIcon .
-                                               $GLOBALS['LANG']->sL($v['ctrl']['title'], 1) . ' (' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:db_new.php.after',1) . ')',
+                                               $GLOBALS['LANG']->sL($v['ctrl']['title'], 1) . ' (' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:db_new.php.after', 1) . ')',
                                        'pages',
                                        -$this->id
                                );
@@ -480,7 +480,7 @@ class SC_db_new {
 
                                                        // Create new link for record:
                                                $newLink = $this->linkWrap(
-                                                       $newRecordIcon . $GLOBALS['LANG']->sL($v['ctrl']['title'],1)
+                                                       $newRecordIcon . $GLOBALS['LANG']->sL($v['ctrl']['title'], 1)
                                                        ,$table
                                                        ,$this->id);
 
@@ -597,7 +597,7 @@ class SC_db_new {
                        // end of tree
                $finalRows[]='
                        <tr>
-                               <td><img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/stopper.gif','width="18" height="16"') . ' alt="" /></td>
+                               <td><img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/stopper.gif', 'width="18" height="16"') . ' alt="" /></td>
                                <td></td>
                        </tr>
                ';
@@ -701,7 +701,7 @@ class SC_db_new {
                if (!$allowedTableList = $GLOBALS['PAGES_TYPES'][$doktype]['allowedTables']) {
                        $allowedTableList = $GLOBALS['PAGES_TYPES']['default']['allowedTables'];
                }
-               if (strstr($allowedTableList,'*') || t3lib_div::inList($allowedTableList,$checkTable))  {               // If all tables or the table is listed as a allowed type, return TRUE
+               if (strstr($allowedTableList, '*') || t3lib_div::inList($allowedTableList, $checkTable))        {               // If all tables or the table is listed as a allowed type, return TRUE
                        return TRUE;
                }
        }
index 3f6b0a3..2857213 100644 (file)
@@ -150,7 +150,7 @@ class SC_file_edit {
                                // Edit textarea:
                        $code.='
                                <div id="c-edit">
-                                       <textarea rows="30" name="file[editfile][0][data]" wrap="off"'.$this->doc->formWidthText(48,'width:98%;height:80%','off').' class="fixed-font enable-tab">'.
+                                       <textarea rows="30" name="file[editfile][0][data]" wrap="off"'.$this->doc->formWidthText(48, 'width:98%;height:80%', 'off').' class="fixed-font enable-tab">'.
                                        t3lib_div::formatForTextarea($fileContent).
                                        '</textarea>
                                        <input type="hidden" name="file[editfile][0][target]" value="' . $this->fileObject->getUid() . '" />
@@ -161,7 +161,7 @@ class SC_file_edit {
                                // Make shortcut:
                        if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
                                $this->MCONF['name']='xMOD_file_edit.php';
-                               $docHeaderButtons['shortcut'] = $this->doc->makeShortcutIcon('target','',$this->MCONF['name'],1);
+                               $docHeaderButtons['shortcut'] = $this->doc->makeShortcutIcon('target', '', $this->MCONF['name'], 1);
                        } else {
                                $docHeaderButtons['shortcut'] = '';
                        }
index c98fd6e..ffebb42 100644 (file)
@@ -146,7 +146,7 @@ class SC_file_newfolder {
 
                $code = '<form action="tce_file.php" method="post" name="editform">';
                        // Making the selector box for the number of concurrent folder-creations
-               $this->number = t3lib_utility_Math::forceIntegerInRange($this->number,1,10);
+               $this->number = t3lib_utility_Math::forceIntegerInRange($this->number, 1, 10);
                $code .= '
                        <div id="c-select">
                                <label for="number-of-new-folders">' .
index a07a6a7..00f9fdd 100644 (file)
@@ -277,7 +277,7 @@ class SC_index {
                if ($GLOBALS['TBE_STYLES']['logo_login']) {
                        $logo = '<img src="'.htmlspecialchars($GLOBALS['BACK_PATH'] . $GLOBALS['TBE_STYLES']['logo_login']) . '" alt="" />';
                } else {
-                       $logo = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/typo3logo.gif','width="123" height="34"').' alt="" />';
+                       $logo = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/typo3logo.gif', 'width="123" height="34"').' alt="" />';
                }
 
                $browserWarning = t3lib_div::makeInstance(
@@ -407,7 +407,7 @@ class SC_index {
 
                        // If interfaces are defined AND no input redirect URL in GET vars:
                if ($GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces'] && ($this->isLoginInProgress() || !$this->redirect_url)) {
-                       $parts = t3lib_div::trimExplode(',',$GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces']);
+                       $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:
 
                                        // Initialize:
@@ -497,7 +497,7 @@ class SC_index {
                        if ($dir && @is_dir($dir)) {
 
                                        // Get files for rotation into array:
-                               $files = t3lib_div::getFilesInDir($dir,'png,jpg,gif');
+                               $files = t3lib_div::getFilesInDir($dir, 'png,jpg,gif');
 
                                        // Pick random file:
                                $randImg = array_rand($files, 1);
@@ -514,14 +514,14 @@ class SC_index {
                        }
                } else {        // If no rotation folder configured, print default image:
 
-                       if (strstr(TYPO3_version,'-dev'))       {       // development version
+                       if (strstr(TYPO3_version, '-dev'))      {       // development version
                                $loginImage = 'loginbox_image_dev.png';
                                $imagecopy = 'You are running a development version of TYPO3 '.TYPO3_branch;
                        } else {
                                $loginImage = 'loginbox_image.jpg';
                                $imagecopy = 'Photo by J.C. Franca (www.digitalphoto.com.br)';
                        }
-                       $loginboxImage = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/'.$loginImage,'width="200" height="133"').' id="loginbox-image" alt="'.$imagecopy.'" title="'.$imagecopy.'" />';
+                       $loginboxImage = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/'.$loginImage, 'width="200" height="133"').' id="loginbox-image" alt="'.$imagecopy.'" title="'.$imagecopy.'" />';
                }
 
                        // Return image tag:
index ae42f8c..3748172 100644 (file)
@@ -63,7 +63,7 @@ ob_start();
 // *******************************
 // Define constants
 // *******************************
-define('TYPO3_MODE','BE');
+define('TYPO3_MODE', 'BE');
 
        // We use require instead of require_once here so we get a fatal error if Bootstrap.php is accidentally included twice
        // (which would indicate a clear bug).
index b189939..b0e7482 100644 (file)
@@ -67,8 +67,8 @@ class localPageTree extends t3lib_pageTree {
         * @param       array           Item row
         * @return      string          Wrapping icon image.
         */
-       function wrapIcon($icon,$row) {
-               return $this->addTagAttributes($icon,' title="id='.htmlspecialchars($row['uid']).'"');
+       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,8 +114,8 @@ class ext_posMap_pages extends t3lib_positionMap {
         * @param       array           Page record (?)
         * @return      string          Wrapped title.
         */
-       function linkPageTitle($str,$rec) {
-               $url = t3lib_div::linkThisScript(array('uid'=>intval($rec['uid']),'moveUid'=>$GLOBALS['SOBE']->moveUid));
+       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,8 +127,8 @@ class ext_posMap_pages extends t3lib_positionMap {
         * @param       integer         The current id.
         * @return      string          The title string.
         */
-       function boldTitle($t_code,$dat,$id) {
-               return parent::boldTitle($t_code,$dat,$GLOBALS['SOBE']->moveUid);
+       function boldTitle($t_code, $dat, $id) {
+               return parent::boldTitle($t_code, $dat, $GLOBALS['SOBE']->moveUid);
        }
 }
 
@@ -160,8 +160,8 @@ class ext_posMap_tt_content extends t3lib_positionMap {
         * @param       array           Page record (?)
         * @return      string          Wrapped title.
         */
-       function linkPageTitle($str,$rec) {
-               $url = t3lib_div::linkThisScript(array('uid'=>intval($rec['uid']),'moveUid'=>$GLOBALS['SOBE']->moveUid));
+       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,9 +172,9 @@ 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);
+               return parent::wrapRecordTitle($str, $row);
        }
 }
 
@@ -255,11 +255,11 @@ class SC_move_el {
                if ($this->page_id) {
 
                                // Get record for element:
-                       $elRow = t3lib_BEfunc::getRecordWSOL($this->table,$this->moveUid);
+                       $elRow = t3lib_BEfunc::getRecordWSOL($this->table, $this->moveUid);
 
                                // Headerline: Icon, record title:
-                       $hline = t3lib_iconWorks::getSpriteIconForRecord($this->table, $elRow, array('id' => "c-recIcon", 'title' => htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($elRow,$this->table))));
-                       $hline.= t3lib_BEfunc::getRecordTitle($this->table,$elRow,TRUE);
+                       $hline = t3lib_iconWorks::getSpriteIconForRecord($this->table, $elRow, array('id' => "c-recIcon", 'title' => htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($elRow, $this->table))));
+                       $hline.= t3lib_BEfunc::getRecordTitle($this->table, $elRow, TRUE);
 
                                // Make-copy checkbox (clicking this will reload the page with the GET var makeCopy set differently):
                        $hline .= $this->doc->spacer(5);
@@ -281,8 +281,8 @@ class SC_move_el {
                                // IF the table is "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)) {
+                               $pageinfo = t3lib_BEfunc::readPageAccess($this->page_id, $this->perms_clause);
+                               if (is_array($pageinfo) && $GLOBALS['BE_USER']->isInWebMount($pageinfo['pid'], $this->perms_clause)) {
 
                                                // Initialize the position map:
                                        $posMap = t3lib_div::makeInstance('ext_posMap_pages');
@@ -290,23 +290,23 @@ 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).
                                        if ($pageinfo['pid']) {
-                                               $pidPageInfo = t3lib_BEfunc::readPageAccess($pageinfo['pid'],$this->perms_clause);
+                                               $pidPageInfo = t3lib_BEfunc::readPageAccess($pageinfo['pid'], $this->perms_clause);
                                                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))).'">'.
+                                                       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') .
-                                                                       t3lib_BEfunc::getRecordTitle('pages',$pidPageInfo,TRUE).
+                                                                       t3lib_BEfunc::getRecordTitle('pages', $pidPageInfo, TRUE).
                                                                        '</a><br />';
                                                        } else {
                                                                $code.= t3lib_iconWorks::getSpriteIconForRecord('pages', $pidPageInfo) .
-                                                                       t3lib_BEfunc::getRecordTitle('pages',$pidPageInfo,TRUE).
+                                                                       t3lib_BEfunc::getRecordTitle('pages', $pidPageInfo, TRUE).
                                                                        '<br />';
                                                        }
                                                }
                                        }
 
                                                // Create the position tree:
-                                       $code.= $posMap->positionTree($this->page_id,$pageinfo,$this->perms_clause,$this->R_URI);
+                                       $code.= $posMap->positionTree($this->page_id, $pageinfo, $this->perms_clause, $this->R_URI);
                                }
                        }
 
@@ -314,14 +314,14 @@ class SC_move_el {
                        if ((string)$this->table=='tt_content') {
 
                                        // First, get the record:
-                               $tt_content_rec = t3lib_BEfunc::getRecord('tt_content',$this->moveUid);
+                               $tt_content_rec = t3lib_BEfunc::getRecord('tt_content', $this->moveUid);
 
                                        // ?
                                if (!$this->input_moveUid)      $this->page_id = $tt_content_rec['pid'];
 
                                        // Checking if the parent page is readable:
-                               $pageinfo = t3lib_BEfunc::readPageAccess($this->page_id,$this->perms_clause);
-                               if (is_array($pageinfo) && $GLOBALS['BE_USER']->isInWebMount($pageinfo['pid'],$this->perms_clause)) {
+                               $pageinfo = t3lib_BEfunc::readPageAccess($this->page_id, $this->perms_clause);
+                               if (is_array($pageinfo) && $GLOBALS['BE_USER']->isInWebMount($pageinfo['pid'], $this->perms_clause)) {
 
                                                // Initialize the position map:
                                        $posMap = t3lib_div::makeInstance('ext_posMap_tt_content');
@@ -333,7 +333,7 @@ class SC_move_el {
                                        $hline .= t3lib_BEfunc::getRecordTitle('pages', $pageinfo, TRUE);
 
                                                // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable:
-                                       $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->page_id,'mod.SHARED');                // SHARED page-TSconfig settings.
+                                       $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->page_id, 'mod.SHARED');               // SHARED page-TSconfig settings.
                                        $colPosArray = t3lib_div::callUserFunction('EXT:cms/classes/class.tx_cms_backendlayout.php:tx_cms_BackendLayout->getColPosListItemsParsed', $this->page_id, $this);
                                        foreach ($colPosArray as $colPos) {
                                                $colPosList .= $colPosList != '' ? ',' . $colPos[1] : $colPos[1];
index 90f7779..181e98f 100644 (file)
@@ -165,15 +165,15 @@ class SC_show_item {
                        $this->uid = intval($this->uid);
 
                                // Check permissions and uid value:
-                       if ($this->uid && $GLOBALS['BE_USER']->check('tables_select',$this->table)) {
+                       if ($this->uid && $GLOBALS['BE_USER']->check('tables_select', $this->table)) {
                                if ((string)$this->table == 'pages') {
-                                       $this->pageinfo = t3lib_BEfunc::readPageAccess($this->uid,$this->perms_clause);
+                                       $this->pageinfo = t3lib_BEfunc::readPageAccess($this->uid, $this->perms_clause);
                                        $this->access = is_array($this->pageinfo) ? 1 : 0;
                                        $this->row = $this->pageinfo;
                                } else {
                                        $this->row = t3lib_BEfunc::getRecordWSOL($this->table, $this->uid);
                                        if ($this->row) {
-                                               $this->pageinfo = t3lib_BEfunc::readPageAccess($this->row['pid'],$this->perms_clause);
+                                               $this->pageinfo = t3lib_BEfunc::readPageAccess($this->row['pid'], $this->perms_clause);
                                                $this->access = is_array($this->pageinfo) ? 1 : 0;
                                        }
                                }
@@ -258,9 +258,9 @@ class SC_show_item {
 
                                // If return Url is set, output link to go back:
                        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('', $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>');
+                               $this->content .= $this->doc->section('', '<br />'.$returnLinkTag.'<strong>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.goBack', 1).'</strong></a>');
                        }
                }
        }
@@ -273,8 +273,8 @@ class SC_show_item {
        function renderDBInfo() {
 
                        // Print header, path etc:
-               $code = $this->doc->getHeader($this->table,$this->row,$this->pageinfo['_thePath'],1).'<br />';
-               $this->content.= $this->doc->section('',$code);
+               $code = $this->doc->getHeader($this->table, $this->row, $this->pageinfo['_thePath'], 1).'<br />';
+               $this->content.= $this->doc->section('', $code);
 
                        // Initialize variables:
                $tableRows = Array();
@@ -299,9 +299,9 @@ class SC_show_item {
                        // Create table from the information:
                $tableCode = '
                                        <table border="0" cellpadding="0" cellspacing="0" id="typo3-showitem" class="t3-table-info">
-                                               '.implode('',$tableRows).'
+                                               '.implode('', $tableRows).'
                                        </table>';
-               $this->content.=$this->doc->section('',$tableCode);
+               $this->content.=$this->doc->section('', $tableCode);
 
                        // Add path and table information in the bottom:
                $code = '';
@@ -310,10 +310,10 @@ class SC_show_item {
                $this->content.= $this->doc->section('', $code);
 
                        // References:
-               $this->content.= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesToThisItem'),$this->makeRef($this->table,$this->row['uid']));
+               $this->content.= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesToThisItem'), $this->makeRef($this->table, $this->row['uid']));
 
                        // References:
-               $this->content.= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesFromThisItem'),$this->makeRefFrom($this->table,$this->row['uid']));
+               $this->content.= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesFromThisItem'), $this->makeRefFrom($this->table, $this->row['uid']));
        }
 
        /**
@@ -448,7 +448,7 @@ class SC_show_item {
                        $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                                '*',
                                'sys_refindex',
-                               'ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table,'sys_refindex') . ' AND ref_uid=' . intval($ref) .
+                               'ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_refindex') . ' AND ref_uid=' . intval($ref) .
                                        ' AND deleted=0'
                        );
                }
index 6908d5a..052a1f3 100644 (file)
@@ -151,7 +151,7 @@ class SC_tce_db {
                        $clipObj->initializeClipboard();
                        if ($this->CB['paste']) {
                                $clipObj->setCurrentPad($this->CB['pad']);
-                               $this->cmd = $clipObj->makePasteCmdArray($this->CB['paste'],$this->cmd);
+                               $this->cmd = $clipObj->makePasteCmdArray($this->CB['paste'], $this->cmd);
                        }
                        if ($this->CB['delete']) {
                                $clipObj->setCurrentPad($this->CB['pad']);
@@ -168,14 +168,14 @@ class SC_tce_db {
        function main() {
 
                        // LOAD TCEmain with data and cmd arrays:
-               $this->tce->start($this->data,$this->cmd);
+               $this->tce->start($this->data, $this->cmd);
                if (is_array($this->mirror))    {$this->tce->setMirror($this->mirror);}
 
                        // Checking referer / executing
                $refInfo=parse_url(t3lib_div::getIndpEnv('HTTP_REFERER'));
                $httpHost = t3lib_div::getIndpEnv('TYPO3_HOST_ONLY');
                if ($httpHost != $refInfo['host'] && $this->vC != $GLOBALS['BE_USER']->veriCode() && !$GLOBALS['TYPO3_CONF_VARS']['SYS']['doNotCheckReferer']) {
-                       $this->tce->log('',0,0,0,1,'Referer host "%s" and server host "%s" did not match and veriCode was not valid either!',1,array($refInfo['host'],$httpHost));
+                       $this->tce->log('', 0, 0, 0, 1, 'Referer host "%s" and server host "%s" did not match and veriCode was not valid either!', 1, array($refInfo['host'], $httpHost));
                } else {
                                // Register uploaded files
                        $this->tce->process_uploads($_FILES);
index 3f34c28..84a2d27 100644 (file)
@@ -178,16 +178,16 @@ 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) {
-                       $this->scriptID = 'typo3/'.substr($this->scriptID,strlen(TYPO3_mainDir));       // This fixes if TYPO3_mainDir has been changed so the script ids are STILL "typo3/..."
+               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);
+               $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])) {
                        $ovr = $GLOBALS['TBE_STYLES']['scriptIDindex'][$this->scriptID];                // Make copy
-                       $GLOBALS['TBE_STYLES'] = t3lib_div::array_merge_recursive_overrule($GLOBALS['TBE_STYLES'],$ovr);                // merge styles.
+                       $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!
                }
 
@@ -312,8 +312,8 @@ class template {
                );
 
                        // Make link to view page
-               $str.= '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($id,$backPath,t3lib_BEfunc::BEgetRootLine($id))).'">'.
-                               '<img'.t3lib_iconWorks::skinImg($backPath,'gfx/zoom.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage',1).'"'.($addParams?' '.trim($addParams):"").' hspace="3" alt="" />'.
+               $str.= '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($id, $backPath, t3lib_BEfunc::BEgetRootLine($id))).'">'.
+                               '<img'.t3lib_iconWorks::skinImg($backPath,'gfx/zoom.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1).'"'.($addParams?' '.trim($addParams):"").' hspace="3" alt="" />'.
                                '</a>';
                return $str;
        }
@@ -369,7 +369,7 @@ class template {
                if (is_array($row) && $row['uid']) {
                        $iconImgTag = t3lib_iconWorks::getSpriteIconForRecord($table, $row, array('title' => htmlspecialchars($path)));
                        $title = strip_tags(t3lib_BEfunc::getRecordTitle($table, $row));
-                       $viewPage = $noViewPageIcon ? '' : $this->viewPageIcon($row['uid'],$this->backPath,'');
+                       $viewPage = $noViewPageIcon ? '' : $this->viewPageIcon($row['uid'], $this->backPath, '');
                        if ($table == 'pages')
                                $path .= ' - ' . t3lib_BEfunc::titleAttribForPages($row, '', 0);
                } else {
@@ -395,8 +395,8 @@ class template {
         */
        function getFileheader($title, $path, $iconfile) {
                $fileInfo = t3lib_div::split_fileref($title);
-               $title = htmlspecialchars(t3lib_div::fixed_lgd_cs($fileInfo['path'],-35)).'<strong>'.htmlspecialchars($fileInfo['file']).'</strong>';
-               return '<span class="typo3-moduleHeader"><img'.t3lib_iconWorks::skinImg($this->backPath,$iconfile,'width="18" height="16"').' title="'.htmlspecialchars($path).'" alt="" />'.$title.'</span>';
+               $title = htmlspecialchars(t3lib_div::fixed_lgd_cs($fileInfo['path'], -35)).'<strong>'.htmlspecialchars($fileInfo['file']).'</strong>';
+               return '<span class="typo3-moduleHeader"><img'.t3lib_iconWorks::skinImg($this->backPath, $iconfile, 'width="18" height="16"').' title="'.htmlspecialchars($path).'" alt="" />'.$title.'</span>';
        }
 
        /**
@@ -410,7 +410,7 @@ class template {
         */
        function makeShortcutIcon($gvList, $setList, $modName, $motherModName = '') {
                $backPath=$this->backPath;
-               $storeUrl=$this->makeShortcutUrl($gvList,$setList);
+               $storeUrl=$this->makeShortcutUrl($gvList, $setList);
                $pathInfo = parse_url(t3lib_div::getIndpEnv('REQUEST_URI'));
 
                        // Add the module identifier automatically if typo3/mod.php is used:
@@ -418,7 +418,7 @@ class template {
                        $storeUrl = '&M='.$modName.$storeUrl;
                }
 
-               if (!strcmp($motherModName,'1')) {
+               if (!strcmp($motherModName, '1')) {
                        $mMN="&motherModName='+top.currentModuleLoaded+'";
                } elseif ($motherModName) {
                        $mMN='&motherModName='.rawurlencode($motherModName);
@@ -449,10 +449,10 @@ class template {
        function makeShortcutUrl($gvList, $setList) {
                $GET = t3lib_div::_GET();
                $storeArray = array_merge(
-                       t3lib_div::compileSelectedGetVarsFromArray($gvList,$GET),
+                       t3lib_div::compileSelectedGetVarsFromArray($gvList, $GET),
                        array('SET'=>t3lib_div::compileSelectedGetVarsFromArray($setList, (array)$GLOBALS['SOBE']->MOD_SETTINGS))
                );
-               $storeUrl = t3lib_div::implodeArrayForUrl('',$storeArray);
+               $storeUrl = t3lib_div::implodeArrayForUrl('', $storeArray);
                return $storeUrl;
        }
 
@@ -481,9 +481,9 @@ class template {
        /**
         * This function is dedicated to textareas, which has the wrapping on/off option to observe.
         * EXAMPLE:
-        *              <textarea rows="10" wrap="off" '.$GLOBALS["TBE_TEMPLATE"]->formWidthText(48,"","off").'>
+        *              <textarea rows="10" wrap="off" '.$GLOBALS["TBE_TEMPLATE"]->formWidthText(48, "", "off").'>
         *   or
-        *              <textarea rows="10" wrap="virtual" '.$GLOBALS["TBE_TEMPLATE"]->formWidthText(48,"","virtual").'>
+        *              <textarea rows="10" wrap="virtual" '.$GLOBALS["TBE_TEMPLATE"]->formWidthText(48, "", "virtual").'>
         *
         * @param integer $size A relative number which multiplied with approx. 10 will lead to the width in pixels
         * @param string $styleOverride A string which will be returned as attribute-value for style="" instead of the calculated width (if CSS is enabled)
@@ -492,7 +492,7 @@ class template {
         * @see formWidth()
         */
        function formWidthText($size = 48, $styleOverride = '', $wrap = '') {
-               $wTags = $this->formWidth($size,1,$styleOverride);
+               $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) {
                        $wTags.=' cols="'.$size.'"';
@@ -518,8 +518,8 @@ class template {
                ));
 
                $out ="
-       var T3_RETURN_URL = '".str_replace('%20','',rawurlencode(t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'))))."';
-       var T3_THIS_LOCATION = '".str_replace('%20','',rawurlencode($thisLocation))."';
+       var T3_RETURN_URL = '".str_replace('%20', '', rawurlencode(t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'))))."';
+       var T3_THIS_LOCATION = '".str_replace('%20', '', rawurlencode($thisLocation))."';
                ";
                return $out;
        }
@@ -535,9 +535,9 @@ class template {
        function formatTime($tstamp, $type) {
                $dateStr = '';
                switch($type) {
-                       case 1: $dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'],$tstamp);
+                       case 1: $dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $tstamp);
                        break;
-                       case 10: $dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'],$tstamp);
+                       case 10: $dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $tstamp);
                        break;
                }
                return $dateStr;
@@ -1087,11 +1087,11 @@ class template {
                        // insert accumulated CSS
                $this->inDocStylesArray[] = $this->inDocStyles;
                $styles = LF.implode(LF, $this->inDocStylesArray);
-               $content = str_replace('/*###POSTCSSMARKER###*/',$styles,$content);
+               $content = str_replace('/*###POSTCSSMARKER###*/', $styles, $content);
 
                        // insert accumulated JS
                $jscode = $this->JScode.LF.$this->wrapScriptTags(implode(LF, $this->JScodeArray));
-               $content = str_replace('<!--###POSTJSMARKER###-->',$jscode,$content);
+               $content = str_replace('<!--###POSTJSMARKER###-->', $jscode, $content);
 
                return $content;
        }
@@ -1287,8 +1287,8 @@ class template {
                        $string = preg_replace ('/^\n+/', '', $string);
                                // re-ident to one tab using the first line as reference
                        $match = array();
-                       if(preg_match('/^(\t+)/',$string,$match)) {
-                               $string = str_replace($match[1],TAB, $string);
+                       if(preg_match('/^(\t+)/', $string, $match)) {
+                               $string = str_replace($match[1], TAB, $string);
                        }
                        $string = $cr.'<script type="text/javascript">
 /*<![CDATA[*/
@@ -1303,7 +1303,7 @@ class template {
                // You can override these values from outside if you like.
        var $tableLayout = array(
                'defRow' => array(
-                       'defCol' => array('<td valign="top">','</td>')
+                       'defCol' => array('<td valign="top">', '</td>')
                )
        );
        var $table_TR = '<tr>';
@@ -1361,8 +1361,8 @@ class template {
         * @param array $arr3 Third-level items
         * @return string HTML content, <table>...</table>
         */
-       function menuTable($arr1,$arr2 = array(), $arr3 = array()) {
-               $rows = max(array(count($arr1),count($arr2),count($arr3)));
+       function menuTable($arr1, $arr2 = array(), $arr3 = array()) {
+               $rows = max(array(count($arr1), count($arr2), count($arr3)));
 
                $menu='
                <table border="0" cellpadding="0" cellspacing="0" id="typo3-tablemenu">';
@@ -1377,7 +1377,7 @@ class template {
                                        $cls[]='<td valign="'.$valign.'">'.$arr3[$a][0].'</td><td>'.$arr3[$a][1].'</td>';
                                }
                        }
-                       $menu.=implode($cls,'<td>&nbsp;&nbsp;</td>');
+                       $menu.=implode($cls, '<td>&nbsp;&nbsp;</td>');
                        $menu.='</tr>';
                }
                $menu.='
@@ -1483,13 +1483,13 @@ class template {
                        if (!is_array($mainParams)) {
                                $mainParams = array('id' => $mainParams);
                        }
-                       $mainParams = t3lib_div::implodeArrayForUrl('',$mainParams);
+                       $mainParams = t3lib_div::implodeArrayForUrl('', $mainParams);
 
                        if (!$script) {$script=basename(PATH_thisScript);}
 
                        $menuDef = array();
                        foreach($menuItems as $value => $label) {
-                               $menuDef[$value]['isActive'] = !strcmp($currentValue,$value);
+                               $menuDef[$value]['isActive'] = !strcmp($currentValue, $value);
                                $menuDef[$value]['label'] = t3lib_div::deHSCentities(htmlspecialchars($label));
                                $menuDef[$value]['url'] = $script . '?' . $mainParams . $addparams . '&' . $elementName . '=' . $value;
                        }
@@ -1516,10 +1516,10 @@ class template {
                        $widthLeft = 1;
                        $addToAct = 5;
 
-                       $widthRight = max (1,floor(30-pow($count,1.72)));
+                       $widthRight = max (1, floor(30-pow($count, 1.72)));
                        $widthTabs = 100 - $widthRight - $widthLeft;
                        $widthNo = floor(($widthTabs - $addToAct)/$count);
-                       $addToAct = max ($addToAct,$widthTabs-($widthNo*$count));
+                       $addToAct = max ($addToAct, $widthTabs-($widthNo*$count));
                        $widthAct = $widthNo + $addToAct;
                        $widthRight = 100 - ($widthLeft + ($count*$widthNo) + $addToAct);
 
@@ -1604,7 +1604,7 @@ class template {
                                        $onclick = 'this.blur(); DTM_activate("'.$id.'","'.$index.'", '.($toggle<0?1:0).'); return false;';
                                }
 
-                               $isEmpty = !(strcmp(trim($def['content']),'') || strcmp(trim($def['icon']),''));
+                               $isEmpty = !(strcmp(trim($def['content']), '') || strcmp(trim($def['icon']), ''));
 
                                        // "Removes" empty tabs
                                if ($isEmpty && $dividers2tabs == 1) {
@@ -1622,7 +1622,7 @@ class template {
                                                        $def['icon'].
                                                        ($def['label'] ? htmlspecialchars($def['label']) : '&nbsp;').
                                                        $requiredIcon.
-                                                       $this->icons($def['stateIcon'],'margin-left: 10px;').
+                                                       $this->icons($def['stateIcon'], 'margin-left: 10px;').
                                                        ($isEmpty ? '' : '</a>').
                                                        '</td>';
                                        $titleLenCount+= strlen($def['label']);
@@ -1670,7 +1670,7 @@ class template {
                                        <!-- Tab menu -->
                                        <table cellpadding="0" cellspacing="0" border="0"'.($fullWidth ? ' width="100%"' : '').' class="typo3-dyntabmenu">
                                                <tr>
-                                                               '.implode('',$options[$a]).'
+                                                               '.implode('', $options[$a]).'
                                                </tr>
                                        </table>';
                                        }
@@ -1681,14 +1681,14 @@ class template {
                                $content.= '
                                <!-- Div layers for tab menu: -->
                                <div class="typo3-dyntabmenu-divs'.($foldout?'-foldout':'').'">
-                               '.implode('',$divs).'</div>';
+                               '.implode('', $divs).'</div>';
 
                                        // Java Script section added:
                                $content.= '
                                <!-- Initialization JavaScript for the menu -->
                                <script type="text/javascript">
                                        DTM_array["'.$id.'"] = new Array();
-                                       '.implode('',$JSinit).'
+                                       '.implode('', $JSinit).'
                                        '.($toggle<=0 ? 'DTM_activate("'.$id.'", top.DTM_currentTabs["'.$id.'"]?top.DTM_currentTabs["'.$id.'"]:'.intval($defaultTabIndex).', 0);' : '').'
                                </script>
 
index 272be3e..28be01d 100644 (file)
@@ -57,7 +57,7 @@ class local_t3lib_parsehtml extends t3lib_parsehtml {
         * @return      string          The processed value.
         * @access private
         */
-       function processContent($value,$dir,$conf) {
+       function processContent($value, $dir, $conf) {
                $value = $this->pObj->substituteGlossaryWords_htmlcleaner_callback($value);
 
                return $value;
@@ -156,7 +156,7 @@ class SC_view_help {
                }
 
                        // limitAccess is checked if the $this->table really IS a table (and if the user is NOT a translator who should see all!)
-               $showAllToUser = t3lib_BEfunc::isModuleSetInTBE_MODULES('txllxmltranslateM1') && $GLOBALS['BE_USER']->check('modules','txllxmltranslateM1');
+               $showAllToUser = t3lib_BEfunc::isModuleSetInTBE_MODULES('txllxmltranslateM1') && $GLOBALS['BE_USER']->check('modules', 'txllxmltranslateM1');
                $this->limitAccess = isset($GLOBALS['TCA'][$this->table]) ? !$showAllToUser : FALSE;
        }
 
@@ -260,7 +260,7 @@ class SC_view_help {
                foreach($TCAkeys as $table) {
                                // Load descriptions for table $table
                        $GLOBALS['LANG']->loadSingleTableDescription($table);
-                       if (is_array($GLOBALS['TCA_DESCR'][$table]['columns']) && $GLOBALS['BE_USER']->check('tables_select',$table)) {
+                       if (is_array($GLOBALS['TCA_DESCR'][$table]['columns']) && $GLOBALS['BE_USER']->check('tables_select', $table)) {
                                $this->render_TOC_el($table, 'tables', $outputSections, $tocArray, $CSHkeys);
                        }
                }
@@ -294,28 +294,28 @@ class SC_view_help {
                $output = '';
                $output.= '
 
-                       <h1>'.$GLOBALS['LANG']->getLL('manual_title',1).'</h1>';
+                       <h1>'.$GLOBALS['LANG']->getLL('manual_title', 1).'</h1>';
 
                $output.= '
 
-                       <h2>'.$GLOBALS['LANG']->getLL('introduction',1).'</h2>
-                       <p>'.$GLOBALS['LANG']->getLL('description',1).'</p>';
+                       <h2>'.$GLOBALS['LANG']->getLL('introduction', 1).'</h2>
+                       <p>'.$GLOBALS['LANG']->getLL('description',  1).'</p>';
 
                $output.= '
 
-                       <h2>'.$GLOBALS['LANG']->getLL('TOC',1).'</h2>'.
+                       <h2>'.$GLOBALS['LANG']->getLL('TOC', 1).'</h2>'.
                        $this->render_TOC_makeTocList($tocArray);
 
                if (!$this->renderALL) {
                        $output.= '
                                <br/>
-                               <p class="c-nav"><a href="view_help.php?renderALL=1">'.$GLOBALS['LANG']->getLL('full_manual',1).'</a></p>';
+                               <p class="c-nav"><a href="view_help.php?renderALL=1">'.$GLOBALS['LANG']->getLL('full_manual', 1).'</a></p>';
                }
 
                if ($this->renderALL) {
                        $output.= '
 
-                               <h2>'.$GLOBALS['LANG']->getLL('full_manual_chapters',1).'</h2>'.
+                               <h2>'.$GLOBALS['LANG']->getLL('full_manual_chapters', 1).'</h2>'.
                                implode('
 
 
@@ -346,7 +346,7 @@ class SC_view_help {
                                $outputSections[$table] = '
 
                <!-- New CSHkey/Table: '.$table.' -->
-               <p class="c-nav"><a name="ANCHOR_'.$table.'" href="#">'.$GLOBALS['LANG']->getLL('to_top',1).'</a></p>
+               <p class="c-nav"><a name="ANCHOR_'.$table.'" href="#">'.$GLOBALS['LANG']->getLL('to_top', 1).'</a></p>
                <h2>'.$this->getTableFieldLabel($table).'</h2>
 
                '.$outputSections[$table];
@@ -377,7 +377,7 @@ class SC_view_help {
                foreach($keys as $tocKey) {
                        if (is_array($tocArray[$tocKey])) {
                                $output.='
-                                       <li>'.$GLOBALS['LANG']->getLL('TOC_'.$tocKey,1).'
+                                       <li>'.$GLOBALS['LANG']->getLL('TOC_'.$tocKey, 1).'
                                                <ul>
                                                        <li>'.implode('</li>
                                                        <li>',$tocArray[$tocKey]).'</li>
@@ -512,33 +512,33 @@ class SC_view_help {
                foreach($items as $val) {
                        $val = trim($val);
                        if ($val) {
-                               $iP = explode(':',$val);
-                               $iPUrl = t3lib_div::trimExplode('|',$val);
+                               $iP = explode(':', $val);
+                               $iPUrl = t3lib_div::trimExplode('|', $val);
                                        // URL reference:
-                               if (substr($iPUrl[1],0,4)=='http') {
+                               if (substr($iPUrl[1], 0, 4)=='http') {
                                        $lines[] = '<a href="'.htmlspecialchars($iPUrl[1]).'" target="_blank"><em>'.htmlspecialchars($iPUrl[0]).'</em></a>';
-                               } elseif (substr($iPUrl[1],0,5)=='FILE:') {
-                                       $fileName = t3lib_div::getFileAbsFileName(substr($iPUrl[1],5),1,1);
+                               } elseif (substr($iPUrl[1], 0, 5)=='FILE:') {
+                                       $fileName = t3lib_div::getFileAbsFileName(substr($iPUrl[1], 5), 1, 1);
                                        if ($fileName && @is_file($fileName)) {
-                                               $fileName = '../'.substr($fileName,strlen(PATH_site));
+                                               $fileName = '../'.substr($fileName, strlen(PATH_site));
                                                $lines[] = '<a href="'.htmlspecialchars($fileName).'" target="_blank"><em>'.htmlspecialchars($iPUrl[0]).'</em></a>';
                                        }
                                } else {
                                        // "table" reference
                                        t3lib_div::loadTCA($iP[0]);
 
-                                       if (!isset($GLOBALS['TCA'][$iP[0]]) || ((!$iP[1] || is_array($GLOBALS['TCA'][$iP[0]]['columns'][$iP[1]])) && (!$this->limitAccess || ($GLOBALS['BE_USER']->check('tables_select',$iP[0]) && (!$iP[1] || !$GLOBALS['TCA'][$iP[0]]['columns'][$iP[1]]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields',$iP[0].':'.$iP[1]))))))       {       // Checking read access:
+                                       if (!isset($GLOBALS['TCA'][$iP[0]]) || ((!$iP[1] || is_array($GLOBALS['TCA'][$iP[0]]['columns'][$iP[1]])) && (!$this->limitAccess || ($GLOBALS['BE_USER']->check('tables_select', $iP[0]) && (!$iP[1] || !$GLOBALS['TCA'][$iP[0]]['columns'][$iP[1]]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields', $iP[0].':'.$iP[1]))))))     {       // Checking read access:
                                                if (isset($GLOBALS['TCA_DESCR'][$iP[0]])) {
                                                                // Make see-also link:
-                                                       $href = ($this->renderALL || ($anchorTable && $iP[0]==$anchorTable) ? '#'.implode('.',$iP) : 'view_help.php?tfID='.rawurlencode(implode('.',$iP)).'&back='.$this->tfID);
-                                                       $label = $this->getTableFieldLabel($iP[0],$iP[1],' / ');
+                                                       $href = ($this->renderALL || ($anchorTable && $iP[0]==$anchorTable) ? '#'.implode('.', $iP) : 'view_help.php?tfID='.rawurlencode(implode('.', $iP)).'&back='.$this->tfID);
+                                                       $label = $this->getTableFieldLabel($iP[0], $iP[1], ' / ');
                                                        $lines[] = '<a href="'.htmlspecialchars($href).'">'.htmlspecialchars($label).'</a>';
                                                }
                                        }
                                }
                        }
                }
-               return implode('<br />',$lines);
+               return implode('<br />', $lines);
        }
 
        /**
@@ -548,19 +548,19 @@ class SC_view_help {
         * @param       string          Description string (divided for each image by line break)
         * @return      string          Image HTML codes
         */
-       function printImage($images,$descr) {
+       function printImage($images, $descr) {
                $code = '';
                        // Splitting:
                $imgArray = t3lib_div::trimExplode(',', $images, 1);
                if (count($imgArray)) {
-                       $descrArray = explode(LF,$descr,count($imgArray));
+                       $descrArray = explode(LF, $descr, count($imgArray));
 
                        foreach($imgArray as $k => $image) {
                                $descr = $descrArray[$k];
 
-                               $absImagePath = t3lib_div::getFileAbsFileName($image,1,1);
+                               $absImagePath = t3lib_div::getFileAbsFileName($image, 1, 1);
                                if ($absImagePath && @is_file($absImagePath)) {
-                                       $imgFile = substr($absImagePath,strlen(PATH_site));
+                                       $imgFile = substr($absImagePath, strlen(PATH_site));
                                        $imgInfo = @getimagesize($absImagePath);
                                        if (is_array($imgInfo)) {
                                                $imgFile = '../'.$imgFile;
@@ -583,7 +583,7 @@ class SC_view_help {
         * @param       string          Header type (1, 0)
         * @return      string          The HTML for the header.
         */
-       function headerLine($str,$type=0) {
+       function headerLine($str, $type=0) {
                switch($type) {
                        case 1:
                                $str = '<h2 class="t3-row-header">' . htmlspecialchars($str) . '</h2>
@@ -605,7 +605,7 @@ class SC_view_help {
         * @return      string          Formatted content.
         */
        function prepareContent($str) {
-               return '<p>'.nl2br(trim(strip_tags($str,$this->allowedHTML))).'</p>
+               return '<p>'.nl2br(trim(strip_tags($str, $this->allowedHTML))).'</p>
                ';
        }
 
@@ -634,7 +634,7 @@ class SC_view_help {
                                        $this->prepareContent($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['description']) .
                                        ($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['details'] ? $this->headerLine($GLOBALS['LANG']->getLL('details').':').$this->prepareContent($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['details']) : '') .
                                        ($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['syntax'] ? $this->headerLine($GLOBALS['LANG']->getLL('syntax').':').$this->prepareContent($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['syntax']) : '') .
-                                       ($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['image'] ? $this->printImage($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['image'],$GLOBALS['TCA_DESCR'][$key]['columns'][$field]['image_descr']) : '') .
+                                       ($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['image'] ? $this->printImage($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['image'], $GLOBALS['TCA_DESCR'][$key]['columns'][$field]['image_descr']) : '') .
                                        ($GLOBALS['TCA_DESCR'][$key]['columns'][$field]['seeAlso'] && $seeAlsoRes ? $this->headerLine($GLOBALS['LANG']->getLL('seeAlso').':').'<p>'.$seeAlsoRes.'</p>' : '') .
                                        ($this->back ? '<br /><p><a href="' . htmlspecialchars('view_help.php?tfID=' . rawurlencode($this->back)) . '" class="typo3-goBack">' . htmlspecialchars($GLOBALS['LANG']->getLL('goBack')) . '</a></p>' : '') .
                                        '<br />';
@@ -724,7 +724,7 @@ class SC_view_help {
        function createGlossaryIndex() {
                        // Create hash string and try to retrieve glossary array:
                $hash = md5('typo3/view_help.php:glossary');
-               list($this->glossaryWords,$this->substWords) = unserialize(t3lib_BEfunc::getHash($hash));
+               list($this->glossaryWords, $this->substWords) = unserialize(t3lib_BEfunc::getHash($hash));
 
                        // Generate glossary words if not found:
                if (!is_array($this->glossaryWords)) {
@@ -746,7 +746,7 @@ class SC_view_help {
                                                        if ($field) {
                                                                $this->glossaryWords[$cshKey.'.'.$field] = array(
                                                                        'title' => trim($data['alttitle'] ? $data['alttitle'] : $cshKey),
-                                                                       'description' =>  str_replace('%22','%23%23%23', rawurlencode($data['description'])),
+                                                                       'description' =>  str_replace('%22', '%23%23%23', rawurlencode($data['description'])),
                                                                );
                                                        }
                                                }
@@ -766,7 +766,7 @@ class SC_view_help {
 
                        krsort($this->substWords);
 
-                       t3lib_BEfunc::storeHash($hash,serialize(array($this->glossaryWords,$this->substWords)),'Glossary');
+                       t3lib_BEfunc::storeHash($hash, serialize(array($this->glossaryWords, $this->substWords)), 'Glossary');
                }
        }
 
@@ -801,16 +801,16 @@ class SC_view_help {
                                        // quoteMeta used so special chars (which should not occur though) in words will not break the regex. Seemed to work (- kasper)
                                $parts = preg_split('/( |[\(])('.quoteMeta($wordSet['title']).')([\.\!\)\?\:\,]+| )/i', ' '.$code.' ', 2, PREG_SPLIT_DELIM_CAPTURE);
                                if (count($parts) == 5) {
-                                       $parts[2] = '<a class="glossary-term" href="'.htmlspecialchars('view_help.php?tfID='.rawurlencode($wordSet['key']).'&back='.$this->tfID).'" title="'.rawurlencode(htmlspecialchars(t3lib_div::fixed_lgd_cs(rawurldecode($wordSet['description']),80))).'">'.
+                                       $parts[2] = '<a class="glossary-term" href="'.htmlspecialchars('view_help.php?tfID='.rawurlencode($wordSet['key']).'&back='.$this->tfID).'" title="'.rawurlencode(htmlspecialchars(t3lib_div::fixed_lgd_cs(rawurldecode($wordSet['description']), 80))).'">'.
                                                                htmlspecialchars($parts[2]).
                                                                '</a>';
-                                       $code = substr(implode('',$parts),1,-1);
+                                       $code = substr(implode('', $parts), 1, -1);
 
                                                // Disable entry so it doesn't get used next time:
                                        unset($this->substWords[$wordKey]);
                                }
                        }
-                       $code = str_replace('###', '&quot;',rawurldecode($code));
+                       $code = str_replace('###', '&quot;', rawurldecode($code));
                }
 
                return $code;
index 3743f60..96b14aa 100644 (file)
@@ -93,21 +93,21 @@ class SC_wizard_add {
                $this->returnEditConf = t3lib_div::_GP('returnEditConf');
 
                        // Get this record
-               $origRow = t3lib_BEfunc::getRecord($this->P['table'],$this->P['uid']);
+               $origRow = t3lib_BEfunc::getRecord($this->P['table'], $this->P['uid']);
 
                        // Set table:
                $this->table = $this->P['params']['table'];
 
                        // Get TSconfig for it.
-               $TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig($this->P['table'],is_array($origRow)?$origRow:array('pid'=>$this->P['pid']));
+               $TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig($this->P['table'], is_array($origRow)?$origRow:array('pid'=>$this->P['pid']));
 
                        // Set [params][pid]
-               if (substr($this->P['params']['pid'],0,3)=='###' && substr($this->P['params']['pid'],-3)=='###') {
-                       $this->pid = intval($TSconfig['_'.substr($this->P['params']['pid'],3,-3)]);
+               if (substr($this->P['params']['pid'], 0, 3)=='###' && substr($this->P['params']['pid'], -3)=='###') {
+                       $this->pid = intval($TSconfig['_'.substr($this->P['params']['pid'], 3, -3)]);
                } else $this->pid = intval($this->P['params']['pid']);
 
                        // Return if new record as parent (not possibly/allowed)
-               if (!strcmp($this->pid,'')) {
+               if (!strcmp($this->pid, '')) {
                        t3lib_utility_Http::redirect(t3lib_div::sanitizeLocalUrl($this->P['returnUrl']));
                }
 
@@ -149,7 +149,7 @@ class SC_wizard_add {
 
                                        // Preparing the data of the parent record...:
                                $trData = t3lib_div::makeInstance('t3lib_transferData');
-                               $trData->fetchRecord($this->P['table'],$this->P['uid'],'');     // 'new'
+                               $trData->fetchRecord($this->P['table'], $this->P['uid'], '');   // 'new'
                                $current = reset($trData->regTableItems_data);
 
                                        // If that record was found (should absolutely be...), then init TCEmain and set, prepend or append the record
@@ -178,10 +178,10 @@ class SC_wizard_add {
                                                                $insertValue = $addEl.','.$curValueOfFlexform;
                                                        break;
                                                }
-                                               $insertValue = implode(',',t3lib_div::trimExplode(',',$insertValue,1));
+                                               $insertValue = implode(',', t3lib_div::trimExplode(',', $insertValue, 1));
 
                                                $data[$this->P['table']][$this->P['uid']][$this->P['field']] = array();
-                                               $flexToolObj->setArrayValueByPath($this->P['flexFormPath'],$data[$this->P['table']][$this->P['uid']][$this->P['field']],$insertValue);
+                                               $flexToolObj->setArrayValueByPath($this->P['flexFormPath'], $data[$this->P['table']][$this->P['uid']][$this->P['field']], $insertValue);
                                        } else {
                                                switch((string)$this->P['params']['setValue']) {
                                                        case 'set':
@@ -194,11 +194,11 @@ class SC_wizard_add {
                                                                $data[$this->P['table']][$this->P['uid']][$this->P['field']] = $addEl.','.$current[$this->P['field']];
                                                        break;
                                                }
-                                               $data[$this->P['table']][$this->P['uid']][$this->P['field']] = implode(',',t3lib_div::trimExplode(',',$data[$this->P['table']][$this->P['uid']][$this->P['field']],1));
+                                               $data[$this->P['table']][$this->P['uid']][$this->P['field']] = implode(',', t3lib_div::trimExplode(',', $data[$this->P['table']][$this->P['uid']][$this->P['field']], 1));
                                        }
 
                                                // Submit the data:
-                                       $tce->start($data,array());
+                                       $tce->start($data, array());
                                        $tce->process_datamap();
                                }
                        }
index 9033792..8520ffe 100644 (file)
@@ -86,7 +86,7 @@ class SC_wizard_colorpicker {
         */
        function init() {
                        // Setting GET vars (used in frameset script):
-               $this->P = t3lib_div::_GP('P',1);
+               $this->P = t3lib_div::_GP('P', 1);
 
                        // Setting GET vars (used in colorpicker script):
                $this->colorValue = t3lib_div::_GP('colorValue');
@@ -101,7 +101,7 @@ class SC_wizard_colorpicker {
                        // Resolving image (checking existence etc.)
                $this->imageError = '';
                if ($this->exampleImg) {
-                       $this->pickerImage = t3lib_div::getFileAbsFileName($this->exampleImg,1,1);
+                       $this->pickerImage = t3lib_div::getFileAbsFileName($this->exampleImg, 1, 1);
                        if (!$this->pickerImage || !@is_file($this->pickerImage)) {
                                $this->imageError = 'ERROR: The image, "'.$this->exampleImg.'", could not be found!';
                        }
@@ -174,12 +174,12 @@ class SC_wizard_colorpicker {
                                        '.$this->colorImage().'
 
                                                <!-- Value box: -->
-                                       <p class="c-head">'.$GLOBALS['LANG']->getLL('colorpicker_colorValue',1).'</p>
+                                       <p class="c-head">'.$GLOBALS['LANG']->getLL('colorpicker_colorValue', 1).'</p>
                                        <table border="0" cellpadding="0" cellspacing="3">
                                                <tr>
                                                        <td><input type="text" '.$this->doc->formWidth(7).' maxlength="10" name="colorValue" value="'.htmlspecialchars($this->colorValue).'" /></td>
-                                                       <td style="background-color:'.htmlspecialchars($this->colorValue).'; border: 1px solid black;">&nbsp;<span style="color: black;">'.$GLOBALS['LANG']->getLL('colorpicker_black',1).'</span>&nbsp;<span style="color: white;">'.$GLOBALS['LANG']->getLL('colorpicker_white',1).'</span>&nbsp;</td>
-                                                       <td><input type="submit" name="save_close" value="'.$GLOBALS['LANG']->getLL('colorpicker_setClose',1).'" /></td>
+                                                       <td style="background-color:'.htmlspecialchars($this->colorValue).'; border: 1px solid black;">&nbsp;<span style="color: black;">'.$GLOBALS['LANG']->getLL('colorpicker_black', 1).'</span>&nbsp;<span style="color: white;">'.$GLOBALS['LANG']->getLL('colorpicker_white', 1).'</span>&nbsp;</td>
+                                                       <td><input type="submit" name="save_close" value="'.$GLOBALS['LANG']->getLL('colorpicker_setClose', 1).'" /></td>
                                                </tr>
                                        </table>
 
@@ -202,7 +202,7 @@ class SC_wizard_colorpicker {
                        }
 
                                // Output:
-                       $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('colorpicker_title'), $content, 0,1);
+                       $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('colorpicker_title'), $content, 0, 1);
                }
        }
 
@@ -292,9 +292,9 @@ class SC_wizard_colorpicker {
                        for($gg=0;$gg<256;$gg+=$steps) {
                                for($bb=0;$bb<256;$bb+=$steps) {
                                        $color[] = '#'.
-                                               substr('0'.dechex($rr),-2).
-                                               substr('0'.dechex($gg),-2).
-                                               substr('0'.dechex($bb),-2);
+                                               substr('0'.dechex($rr), -2).
+                                               substr('0'.dechex($gg), -2).
+                                               substr('0'.dechex($bb), -2);
                                }
                        }
                }
@@ -311,14 +311,14 @@ class SC_wizard_colorpicker {
                                        <td bgcolor="'.$color[$columns*$rows+$i].'" onclick="document.colorform.colorValue.value = \''.$color[$columns*$rows+$i].'\'; document.colorform.submit();" title="'.$color[$columns*$rows+$i].'">&nbsp;&nbsp;</td>';
                        }
                        $tRows[] = '
-                               <tr>'.implode('',$tCells).'
+                               <tr>'.implode('', $tCells).'
                                </tr>';
                        $rows++;
                }
 
                $table = '
-                       <p class="c-head">'.$GLOBALS['LANG']->getLL('colorpicker_fromMatrix',1).'</p>
-                       <table border="0" cellpadding="1" cellspacing="1" style="width:100%; border: 1px solid black; cursor:crosshair;">'.implode('',$tRows).'
+                       <p class="c-head">'.$GLOBALS['LANG']->getLL('colorpicker_fromMatrix', 1).'</p>
+                       <table border="0" cellpadding="1" cellspacing="1" style="width:100%; border: 1px solid black; cursor:crosshair;">'.implode('', $tRows).'
                        </table>';
 
                return $table;
@@ -331,7 +331,7 @@ class SC_wizard_colorpicker {
         */
        function colorList() {
                        // Initialize variables:
-               $colors = explode(',',$this->HTMLcolorList);
+               $colors = explode(',', $this->HTMLcolorList);
                $currentValue = strtolower($this->colorValue);
                $opt = array();
                $opt[] = '<option value=""></option>';
@@ -343,7 +343,7 @@ class SC_wizard_colorpicker {
 
                        // Compile selector box and return result:
                $output = '
-                       <p class="c-head">'.$GLOBALS['LANG']->getLL('colorpicker_fromList',1).'</p>
+                       <p class="c-head">'.$GLOBALS['LANG']->getLL('colorpicker_fromList', 1).'</p>
                        <select onchange="document.colorform.colorValue.value = this.options[this.selectedIndex].value; document.colorform.submit(); return false;">
                                '.implode('
                                ',$opt).'
@@ -362,11 +362,11 @@ class SC_wizard_colorpicker {
                if (!$this->imageError) {
                        if ($this->pickerImage) {
                                if(t3lib_div::_POST('coords_x')) {
-                                       $this->colorValue = '#'.$this->getIndex(t3lib_stdgraphic::imageCreateFromFile($this->pickerImage),t3lib_div::_POST('coords_x'),t3lib_div::_POST('coords_y'));
+                                       $this->colorValue = '#'.$this->getIndex(t3lib_stdgraphic::imageCreateFromFile($this->pickerImage), t3lib_div::_POST('coords_x'), t3lib_div::_POST('coords_y'));
                                }
                                $pickerFormImage = '
-                               <p class="c-head">'.$GLOBALS['LANG']->getLL('colorpicker_fromImage',1).'</p>
-                               <input type="image" src="../'.substr($this->pickerImage,strlen(PATH_site)).'" name="coords" style="cursor:crosshair;" /><br />';
+                               <p class="c-head">'.$GLOBALS['LANG']->getLL('colorpicker_fromImage', 1).'</p>
+                               <input type="image" src="../'.substr($this->pickerImage, strlen(PATH_site)).'" name="coords" style="cursor:crosshair;" /><br />';
                        } else {
                                $pickerFormImage = '';
                        }
@@ -388,9 +388,9 @@ class SC_wizard_colorpicker {
         * @return      string          HEX RGB value for color
         * @see colorImage()
         */
-       function getIndex($im,$x,$y) {
+       function getIndex($im, $x,$y) {
                $rgb = ImageColorAt($im, $x, $y);
-               $colorrgb = imagecolorsforindex($im,$rgb);
+               $colorrgb = imagecolorsforindex($im, $rgb);
                $index['r'] = dechex($colorrgb['red']);
                $index['g'] = dechex($colorrgb['green']);
                $index['b'] = dechex($colorrgb['blue']);
@@ -401,7 +401,7 @@ class SC_wizard_colorpicker {
                                $hexvalue[] = strtoupper($value);
                        }
                }
-               $hex = implode('',$hexvalue);
+               $hex = implode('', $hexvalue);
                return $hex;
        }
 
index feb16ce..f40350e 100644 (file)
@@ -97,12 +97,12 @@ class SC_wizard_edit {
 
                                        // Selecting selected values into an array:
                                $dbAnalysis = t3lib_div::makeInstance('t3lib_loadDBGroup');
-                               $dbAnalysis->start($this->P['currentSelectedValues'],$allowedTables);
+                               $dbAnalysis->start($this->P['currentSelectedValues'], $allowedTables);
                                $value = $dbAnalysis->getValueArray($prependName);
 
                                        // Traverse that array and make parameters for alt_doc.php:
                                foreach($value as $rec) {
-                                       $recTableUidParts = t3lib_div::revExplode('_',$rec,2);
+                                       $recTableUidParts = t3lib_div::revExplode('_', $rec, 2);
                                        $params.='&edit['.$recTableUidParts[0].']['.$recTableUidParts[1].']=edit';
                                }
 
index f4b99af..694651e 100644 (file)
@@ -529,18 +529,18 @@ class SC_wizard_forms {
 // FIXME $inputStyle undefined
                                        $brTag=$inputStyle?'':'<br />';
                                        if ($k!=0) {
-                                               $ctrl.='<input type="image" name="FORMCFG[row_up]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/pil2up.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_up', 1).'" />'.$brTag;
+                                               $ctrl.='<input type="image" name="FORMCFG[row_up]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/pil2up.gif', '').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_up', 1).'" />'.$brTag;
                                        } else {
-                                               $ctrl.='<input type="image" name="FORMCFG[row_bottom]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/turn_up.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_bottom', 1).'" />'.$brTag;
+                                               $ctrl.='<input type="image" name="FORMCFG[row_bottom]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/turn_up.gif', '').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_bottom', 1).'" />'.$brTag;
                                        }
-                                       $ctrl.='<input type="image" name="FORMCFG[row_remove]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/garbage.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_removeRow', 1).'" />'.$brTag;
+                                       $ctrl.='<input type="image" name="FORMCFG[row_remove]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/garbage.gif', '').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_removeRow', 1).'" />'.$brTag;
 // FIXME $tLines undefined
                                        if (($k+1)!=count($tLines)) {
-                                               $ctrl.='<input type="image" name="FORMCFG[row_down]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/pil2down.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_down', 1).'" />'.$brTag;
+                                               $ctrl.='<input type="image" name="FORMCFG[row_down]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/pil2down.gif', '').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_down', 1).'" />'.$brTag;
                                        } else {
-                                               $ctrl.='<input type="image" name="FORMCFG[row_top]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/turn_down.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_top', 1).'" />'.$brTag;
+                                               $ctrl.='<input type="image" name="FORMCFG[row_top]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/turn_down.gif', '').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_top', 1).'" />'.$brTag;
                                        }
-                                       $ctrl.='<input type="image" name="FORMCFG[row_add]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/add.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_addRow', 1).'" />'.$brTag;
+                                       $ctrl.='<input type="image" name="FORMCFG[row_add]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/add.gif', '').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_addRow', 1).'" />'.$brTag;
 
                                        $ctrl='<span class="c-wizButtonsV">'.$ctrl.'</span>';
 
@@ -842,7 +842,7 @@ class SC_wizard_forms {
                                        switch((string)$confData['type']) {
                                                case 'select':
                                                case 'radio':
-                                                       $confData['default'] = implode(LF,t3lib_div::trimExplode(',', $parts[2]));
+                                                       $confData['default'] = implode(LF, t3lib_div::trimExplode(',', $parts[2]));
                                                break;
                                                default:
                                                        $confData['default'] = trim($parts[2]);
index 79a78d0..e0aedb3 100644 (file)
@@ -91,18 +91,18 @@ class SC_wizard_list {
        function main() {
 
                        // Get this record
-               $origRow = t3lib_BEfunc::getRecord($this->P['table'],$this->P['uid']);
+               $origRow = t3lib_BEfunc::getRecord($this->P['table'], $this->P['uid']);
 
                        // Get TSconfig for it.
-               $TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig($this->table,is_array($origRow)?$origRow:array('pid'=>$this->P['pid']));
+               $TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig($this->table, is_array($origRow)?$origRow:array('pid'=>$this->P['pid']));
 
                        // Set [params][pid]
-               if (substr($this->P['params']['pid'],0,3)=='###' && substr($this->P['params']['pid'],-3)=='###') {
-                       $this->pid = intval($TSconfig['_'.substr($this->P['params']['pid'],3,-3)]);
+               if (substr($this->P['params']['pid'],0,3)=='###' && substr($this->P['params']['pid'], -3)=='###') {
+                       $this->pid = intval($TSconfig['_'.substr($this->P['params']['pid'], 3, -3)]);
                } else $this->pid = intval($this->P['params']['pid']);
 
                        // Make redirect:
-               if (!strcmp($this->pid,'') || strcmp($this->id,''))     {       // If pid is blank OR if id is set, then return...
+               if (!strcmp($this->pid, '') || strcmp($this->id, ''))   {       // If pid is blank OR if id is set, then return...
                        $redirectUrl = t3lib_div::sanitizeLocalUrl($this->P['returnUrl']);
                } else {        // Otherwise, show the list:
                        $urlParameters = array();
index cc229f2..b9c393c 100644 (file)
@@ -112,10 +112,10 @@ class SC_wizard_rte {
                }
 
                        // If all parameters are available:
-               if ($this->P['table'] && $this->P['field'] && $this->P['uid'] && $this->checkEditAccess($this->P['table'],$this->P['uid'])) {
+               if ($this->P['table'] && $this->P['field'] && $this->P['uid'] && $this->checkEditAccess($this->P['table'], $this->P['uid'])) {
 
                                // Getting the raw record (we need only the pid-value from here...)
-                       $rawRec = t3lib_BEfunc::getRecord($this->P['table'],$this->P['uid']);
+                       $rawRec = t3lib_BEfunc::getRecord($this->P['table'], $this->P['uid']);
                        t3lib_BEfunc::fixVersioningPid($this->P['table'], $rawRec);
 
                                // Setting JavaScript, including the pid value for viewing:
@@ -129,7 +129,7 @@ class SC_wizard_rte {
                                                        }
                                                } else window.location.href = URL;
                                        }
-                               '.($this->popView ? t3lib_BEfunc::viewOnClick($rawRec['pid'],'',t3lib_BEfunc::BEgetRootLine($rawRec['pid'])) : '').'
+                               '.($this->popView ? t3lib_BEfunc::viewOnClick($rawRec['pid'], '', t3lib_BEfunc::BEgetRootLine($rawRec['pid'])) : '').'
                        ');
 
                                // Initialize TCeforms - for rendering the field:
@@ -147,7 +147,7 @@ class SC_wizard_rte {
                                // Fetching content of record:
                        $trData = t3lib_div::makeInstance('t3lib_transferData');
                        $trData->lockRecords=1;
-                       $trData->fetchRecord($this->P['table'],$this->P['uid'],'');
+                       $trData->fetchRecord($this->P['table'], $this->P['uid'], '');
 
                                // Getting the processed record content out:
                        $rec = reset($trData->regTableItems_data);
@@ -155,15 +155,15 @@ class SC_wizard_rte {
                        $rec['pid'] = $rawRec['pid'];
 
                                // TSconfig, setting width:
-                       $fieldTSConfig = $tceforms->setTSconfig($this->P['table'],$rec,$this->P['field']);
-                       if (strcmp($fieldTSConfig['RTEfullScreenWidth'],'')) {
+                       $fieldTSConfig = $tceforms->setTSconfig($this->P['table'], $rec, $this->P['field']);
+                       if (strcmp($fieldTSConfig['RTEfullScreenWidth'], '')) {
                                $width=$fieldTSConfig['RTEfullScreenWidth'];
                        } else {
                                $width='100%';
                        }
 
                                // Get the form field and wrap it in the table with the buttons:
-                       $formContent = $tceforms->getSoloField($this->P['table'],$rec,$this->P['field']);
+                       $formContent = $tceforms->getSoloField($this->P['table'], $rec, $this->P['field']);
                        $formContent = '
 
 
@@ -190,7 +190,7 @@ class SC_wizard_rte {
                                $tceforms->printNeededJSFunctions();
                } else {
                                // ERROR:
-                       $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('forms_title'),'<span class="typo3-red">'.$GLOBALS['LANG']->getLL('table_noData',1).'</span>',0,1);
+                       $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('forms_title'), '<span class="typo3-red">'.$GLOBALS['LANG']->getLL('table_noData',1).'</span>', 0, 1);
                }
 
                // Setting up the buttons and markers for docheader
@@ -231,7 +231,7 @@ class SC_wizard_rte {
                        'undo' => '',
                );
 
-               if ($this->P['table'] && $this->P['field'] && $this->P['uid'] && $this->checkEditAccess($this->P['table'],$this->P['uid'])) {
+               if ($this->P['table'] && $this->P['field'] && $this->P['uid'] && $this->checkEditAccess($this->P['table'], $this->P['uid'])) {
                        $closeUrl = t3lib_div::sanitizeLocalUrl($this->P['returnUrl']);
 
                        // Getting settings for the undo button:
@@ -284,16 +284,16 @@ class SC_wizard_rte {
         * @param       integer         Record uid
         * @return      void
         */
-       function checkEditAccess($table,$uid) {
-               $calcPRec = t3lib_BEfunc::getRecord($table,$uid);
-               t3lib_BEfunc::fixVersioningPid($table,$calcPRec);
+       function checkEditAccess($table, $uid) {
+               $calcPRec = t3lib_BEfunc::getRecord($table, $uid);
+               t3lib_BEfunc::fixVersioningPid($table, $calcPRec);
                if (is_array($calcPRec)) {
                        if ($table=='pages')    {       // If pages:
                                $CALC_PERMS = $GLOBALS['BE_USER']->calcPerms($calcPRec);
                                $hasAccess = $CALC_PERMS&2 ? TRUE : FALSE;
                        } else {
                                        // Fetching pid-record first.
-                               $CALC_PERMS = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::getRecord('pages',$calcPRec['pid']));
+                               $CALC_PERMS = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::getRecord('pages', $calcPRec['pid']));
                                $hasAccess = $CALC_PERMS&16 ? TRUE : FALSE;
                        }
 
index 7352f00..efb820b 100644 (file)
@@ -102,7 +102,7 @@ class SC_wizard_table {
 
                        // Setting options:
                $this->xmlStorage = $this->P['params']['xmlOutput'];
-               $this->numNewRows = t3lib_utility_Math::forceIntegerInRange($this->P['params']['numNewRows'],1,50,5);
+               $this->numNewRows = t3lib_utility_Math::forceIntegerInRange($this->P['params']['numNewRows'], 1, 50, 5);
 
                        // Textareas or input fields:
                $this->inputStyle=isset($this->TABLECFG['textFields']) ? $this->TABLECFG['textFields'] : 1;
@@ -118,7 +118,7 @@ class SC_wizard_table {
                ');
 
                        // Setting form tag:
-               list($rUri) = explode('#',t3lib_div::getIndpEnv('REQUEST_URI'));
+               list($rUri) = explode('#', t3lib_div::getIndpEnv('REQUEST_URI'));
                $this->doc->form ='<form action="'.htmlspecialchars($rUri).'" method="post" name="wizardForm">';
 
                        // If save command found, include tcemain:
@@ -211,7 +211,7 @@ class SC_wizard_table {
        function tableWizard() {
 
                        // First, check the references by selecting the record:
-               $row = t3lib_BEfunc::getRecord($this->P['table'],$this->P['uid']);
+               $row = t3lib_BEfunc::getRecord($this->P['table'], $this->P['uid']);
                if (!is_array($row)) {
                        throw new RuntimeException('Wizard Error: No reference to record', 1294587125);
                }
@@ -220,7 +220,7 @@ class SC_wizard_table {
                $tableCfgArray = $this->getConfigCode($row);
 
                        // Generation of the Table Wizards HTML code:
-               $content = $this->getTableHTML($tableCfgArray,$row);
+               $content = $this->getTableHTML($tableCfgArray, $row);
 
                        // Return content:
                return $content;
@@ -266,7 +266,7 @@ class SC_wizard_table {
                                // Convert to string (either line based or XML):
                        if ($this->xmlStorage) {
                                        // Convert the input array to XML:
-                               $bodyText = t3lib_div::array2xml_cs($this->TABLECFG['c'],'T3TableWizard');
+                               $bodyText = t3lib_div::array2xml_cs($this->TABLECFG['c'], 'T3TableWizard');
 
                                        // Setting cfgArr directly from the input:
                                $cfgArr = $this->TABLECFG['c'];
@@ -275,7 +275,7 @@ class SC_wizard_table {
                                $bodyText = $this->cfgArray2CfgString($this->TABLECFG['c']);
 
                                        // Create cfgArr from the string based configuration - that way it is cleaned up and any incompatibilities will be removed!
-                               $cfgArr = $this->cfgString2CfgArray($bodyText,$row[$this->colsFieldName]);
+                               $cfgArr = $this->cfgString2CfgArray($bodyText, $row[$this->colsFieldName]);
                        }
 
                                // If a save button has been pressed, then save the new field content:
@@ -290,7 +290,7 @@ class SC_wizard_table {
                                $data[$this->P['table']][$this->P['uid']][$this->P['field']]=$bodyText;
 
                                        // Perform the update:
-                               $tce->start($data,array());
+                               $tce->start($data, array());
                                $tce->process_datamap();
 
                                        // If the save/close button was pressed, then redirect the screen:
@@ -302,7 +302,7 @@ class SC_wizard_table {
                        if ($this->xmlStorage) {
                                $cfgArr = t3lib_div::xml2array($row[$this->P['field']]);
                        } else {        // Regular linebased table configuration:
-                               $cfgArr = $this->cfgString2CfgArray($row[$this->P['field']],$row[$this->colsFieldName]);
+                               $cfgArr = $this->cfgString2CfgArray($row[$this->P['field']], $row[$this->colsFieldName]);
                        }
                        $cfgArr = is_array($cfgArr) ? $cfgArr : array();
                }
@@ -318,7 +318,7 @@ class SC_wizard_table {
         * @return      string          HTML for the table wizard
         * @access private
         */
-       function getTableHTML($cfgArr,$row) {
+       function getTableHTML($cfgArr, $row) {
                        // Traverse the rows:
                $tRows=array();
                $k=0;
@@ -333,7 +333,7 @@ class SC_wizard_table {
                                        if ($this->inputStyle) {
                                                $cells[]='<input type="text"'.$this->doc->formWidth(20).' name="TABLE[c]['.(($k+1)*2).']['.(($a+1)*2).']" value="'.htmlspecialchars($cellContent).'" />';
                                        } else {
-                                               $cellContent=preg_replace('/<br[ ]?[\/]?>/i',LF,$cellContent);
+                                               $cellContent=preg_replace('/<br[ ]?[\/]?>/i', LF, $cellContent);
                                                $cells[]='<textarea '.$this->doc->formWidth(20).' rows="5" name="TABLE[c]['.(($k+1)*2).']['.(($a+1)*2).']">'.t3lib_div::formatForTextarea($cellContent).'</textarea>';
                                        }
 
@@ -348,19 +348,19 @@ class SC_wizard_table {
 
                                $brTag=$this->inputStyle?'':'<br />';
                                if ($k!=0) {
-                                       $ctrl.='<input type="image" name="TABLE[row_up]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2up.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_up',1).'" />'.$brTag;
+                                       $ctrl.='<input type="image" name="TABLE[row_up]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/pil2up.gif', '').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_up', 1).'" />'.$brTag;
                                } else {
-                                       $ctrl.='<input type="image" name="TABLE[row_bottom]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_up.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_bottom',1).'" />'.$brTag;
+                                       $ctrl.='<input type="image" name="TABLE[row_bottom]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/turn_up.gif', '').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_bottom', 1).'" />'.$brTag;
                                }
-                               $ctrl.='<input type="image" name="TABLE[row_remove]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/garbage.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_removeRow',1).'" />'.$brTag;
+                               $ctrl.='<input type="image" name="TABLE[row_remove]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/garbage.gif', '').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_removeRow', 1).'" />'.$brTag;
 
 // FIXME what is $tLines? See wizard_forms.php for the same.
                                if (($k+1)!=count($tLines)) {
-                                       $ctrl.='<input type="image" name="TABLE[row_down]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2down.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_down',1).'" />'.$brTag;
+                                       $ctrl.='<input type="image" name="TABLE[row_down]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/pil2down.gif', '').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_down', 1).'" />'.$brTag;
                                } else {
-                                       $ctrl.='<input type="image" name="TABLE[row_top]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_down.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_top',1).'" />'.$brTag;
+                                       $ctrl.='<input type="image" name="TABLE[row_top]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/turn_down.gif', '').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_top', 1).'" />'.$brTag;
                                }
-                               $ctrl.='<input type="image" name="TABLE[row_add]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/add.gif','').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_addRow',1).'" />'.$brTag;
+                               $ctrl.='<input type="image" name="TABLE[row_add]['.(($k+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/add.gif', '').$onClick.' title="'.$GLOBALS['LANG']->getLL('table_addRow', 1).'" />'.$brTag;
 
                                $tRows[]='
                                        <tr class="bgColor4">
@@ -389,17 +389,17 @@ class SC_wizard_table {
                        foreach($firstRow as $temp) {
                                $ctrl='';
                                if ($a!=0) {
-                                       $ctrl.='<input type="image" name="TABLE[col_left]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2left.gif','').' title="'.$GLOBALS['LANG']->getLL('table_left',1).'" />';
+                                       $ctrl.='<input type="image" name="TABLE[col_left]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/pil2left.gif', '').' title="'.$GLOBALS['LANG']->getLL('table_left', 1).'" />';
                                } else {
-                                       $ctrl.='<input type="image" name="TABLE[col_end]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_left.gif','').' title="'.$GLOBALS['LANG']->getLL('table_end',1).'" />';
+                                       $ctrl.='<input type="image" name="TABLE[col_end]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/turn_left.gif', '').' title="'.$GLOBALS['LANG']->getLL('table_end', 1).'" />';
                                }
-                               $ctrl.='<input type="image" name="TABLE[col_remove]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/garbage.gif','').' title="'.$GLOBALS['LANG']->getLL('table_removeColumn',1).'" />';
+                               $ctrl.='<input type="image" name="TABLE[col_remove]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/garbage.gif', '').' title="'.$GLOBALS['LANG']->getLL('table_removeColumn', 1).'" />';
                                if (($a+1)!=$cols) {
-                                       $ctrl.='<input type="image" name="TABLE[col_right]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/pil2right.gif','').' title="'.$GLOBALS['LANG']->getLL('table_right',1).'" />';
+                                       $ctrl.='<input type="image" name="TABLE[col_right]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/pil2right.gif', '').' title="'.$GLOBALS['LANG']->getLL('table_right', 1).'" />';
                                } else {
-                                       $ctrl.='<input type="image" name="TABLE[col_start]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/turn_right.gif','').' title="'.$GLOBALS['LANG']->getLL('table_start',1).'" />';
+                                       $ctrl.='<input type="image" name="TABLE[col_start]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/turn_right.gif', '').' title="'.$GLOBALS['LANG']->getLL('table_start', 1).'" />';
                                }
-                               $ctrl.='<input type="image" name="TABLE[col_add]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/add.gif','').' title="'.$GLOBALS['LANG']->getLL('table_addColumn',1).'" />';
+                               $ctrl.='<input type="image" name="TABLE[col_add]['.(($a+1)*2).']"'.t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/add.gif', '').' title="'.$GLOBALS['LANG']->getLL('table_addColumn', 1).'" />';
                                $cells[]='<span class="c-wizButtonsH">'.$ctrl.'</span>';
 
                                        // Incr. counter:
@@ -422,7 +422,7 @@ class SC_wizard_table {
                                Table wizard
                        -->
                        <table border="0" cellpadding="0" cellspacing="1" id="typo3-tablewizard">
-                               '.implode('',$tRows).'
+                               '.implode('', $tRows).'
                        </table>';
 
                        // Input type checkbox:
@@ -491,7 +491,7 @@ class SC_wizard_table {
                }
 
                if ($cmd && t3lib_utility_Math::canBeInterpretedAsInteger($kk)) {
-                       if (substr($cmd,0,4)=='row_') {
+                       if (substr($cmd, 0, 4)=='row_') {
                                switch($cmd) {
                                        case 'row_remove':
                                                unset($this->TABLECFG['c'][$kk]);
@@ -524,7 +524,7 @@ class SC_wizard_table {
                                }
                                ksort($this->TABLECFG['c']);
                        }
-                       if (substr($cmd,0,4)=='col_') {
+                       if (substr($cmd, 0, 4)=='col_') {
                                foreach ($this->TABLECFG['c'] as $cAK => $value) {
                                        switch($cmd) {
                                                case 'col_remove':
@@ -558,7 +558,7 @@ class SC_wizard_table {
                // Convert line breaks to <br /> tags:
                foreach ($this->TABLECFG['c'] as $a => $value) {
                        foreach ($this->TABLECFG['c'][$a] as $b => $value2) {
-                               $this->TABLECFG['c'][$a][$b] = str_replace(LF,'<br />',str_replace(CR,'',$this->TABLECFG['c'][$a][$b]));
+                               $this->TABLECFG['c'][$a][$b] = str_replace(LF, '<br />', str_replace(CR, '', $this->TABLECFG['c'][$a][$b]));
                        }
                }
        }
@@ -579,13 +579,13 @@ class SC_wizard_table {
                foreach ($this->TABLECFG['c'] as $a => $value) {
                        $thisLine=array();
                        foreach ($this->TABLECFG['c'][$a] as $b => $value) {
-                               $thisLine[]=$this->tableParsing_quote.str_replace($this->tableParsing_delimiter,'',$this->TABLECFG['c'][$a][$b]).$this->tableParsing_quote;
+                               $thisLine[]=$this->tableParsing_quote.str_replace($this->tableParsing_delimiter, '', $this->TABLECFG['c'][$a][$b]).$this->tableParsing_quote;
                        }
-                       $inLines[]=implode($this->tableParsing_delimiter,$thisLine);
+                       $inLines[]=implode($this->tableParsing_delimiter, $thisLine);
                }
 
                        // Finally, implode the lines into a string:
-               $bodyText = implode(LF,$inLines);
+               $bodyText = implode(LF, $inLines);
 
                        // Return the configuration code:
                return $bodyText;
@@ -599,14 +599,14 @@ class SC_wizard_table {
         * @return      array           Configuration array
         * @see cfgArray2CfgString()
         */
-       function cfgString2CfgArray($cfgStr,$cols) {
+       function cfgString2CfgArray($cfgStr, $cols) {
 
                        // Explode lines in the configuration code - each line is a table row.
-               $tLines=explode(LF,$cfgStr);
+               $tLines=explode(LF, $cfgStr);
 
                        // Setting number of columns
                if (!$cols && trim($tLines[0])) {       // auto...
-                       $cols = count(explode($this->tableParsing_delimiter,$tLines[0]));
+                       $cols = count(explode($this->tableParsing_delimiter, $tLines[0]));
                }
                $cols=$cols?$cols:4;
 
@@ -615,12 +615,12 @@ class SC_wizard_table {
                foreach($tLines as $k => $v) {
 
                                // Initialize:
-                       $vParts = explode($this->tableParsing_delimiter,$v);
+                       $vParts = explode($this->tableParsing_delimiter, $v);
 
                                // Traverse columns:
                        for ($a=0;$a<$cols;$a++) {
-                               if ($this->tableParsing_quote && substr($vParts[$a],0,1) == $this->tableParsing_quote && substr($vParts[$a],-1,1) == $this->tableParsing_quote) {
-                                       $vParts[$a] = substr(trim($vParts[$a]),1,-1);
+                               if ($this->tableParsing_quote && substr($vParts[$a], 0, 1) == $this->tableParsing_quote && substr($vParts[$a], -1, 1) == $this->tableParsing_quote) {
+                                       $vParts[$a] = substr(trim($vParts[$a]), 1, -1);
                                }
                                $cfgArr[$k][$a]=$vParts[$a];
                        }
index 38c4ae9..75a9876 100644 (file)
@@ -111,7 +111,7 @@ class SC_wizard_tsconfig {
         */
        function init() {
                        // Check if the tsconfig_help extension is loaded - which is mandatory for this wizard to work.
-               t3lib_extMgm::isLoaded('tsconfig_help',1);
+               t3lib_extMgm::isLoaded('tsconfig_help', 1);
 
                        // Init GPvars:
                $this->P = t3lib_div::_GP('P');
@@ -231,7 +231,7 @@ class SC_wizard_tsconfig {
                                while (pos!=-1) {
                                        output+=""+input.substr(pointer, pos-pointer)+replace;
                                        pointer=pos+matchStr.length;
-                                       pos = input.indexOf(match,pos+1);
+                                       pos = input.indexOf(match, pos+1);
                                }
                                output+=""+input.substr(pointer);
                                return output;
@@ -243,8 +243,8 @@ class SC_wizard_tsconfig {
         * @param       [type]          $show,objString: ...
         * @return      [type]          ...
         */
-                       function jump(show,objString) {
-                               window.location.href = "'.t3lib_div::linkThisScript(array('show'=>'','objString'=>'')).'&show="+show+"&objString="+objString;
+                       function jump(show, objString) {
+                               window.location.href = "'.t3lib_div::linkThisScript(array('show'=>'', 'objString'=>'')).'&show="+show+"&objString="+objString;
                        }
                ');
 
@@ -260,18 +260,18 @@ class SC_wizard_tsconfig {
         */
        function main() {
                        // Adding module content:
-               $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('tsprop'),$this->browseTSprop($this->mode,$this->show),0,1);
+               $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('tsprop'), $this->browseTSprop($this->mode, $this->show), 0, 1);
 
                        // Adding link to TSref:
                if ($this->mode=='tsref') {
                        $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('tsprop_TSref'),'
-                       <a href="'. TYPO3_URL_DOCUMENTATION_TSREF.'" target="_blank">'.$GLOBALS['LANG']->getLL('tsprop_TSref',1).'</a>
+                       <a href="'. TYPO3_URL_DOCUMENTATION_TSREF.'" target="_blank">'.$GLOBALS['LANG']->getLL('tsprop_TSref', 1).'</a>
                        ',0,1);
                }
                        // Adding link to admin guides etc:
                if ($this->mode=='page' || $this->mode=='beuser') {
                        $this->content.=$this->doc->section($GLOBALS['LANG']->getLL('tsprop_tsconfig'),'
-                       <a href="' . TYPO3_URL_DOCUMENTATION_TSCONFIG . '" target="_blank">' . $GLOBALS['LANG']->getLL('tsprop_tsconfig',1) . '</a>
+                       <a href="' . TYPO3_URL_DOCUMENTATION_TSCONFIG . '" target="_blank">' . $GLOBALS['LANG']->getLL('tsprop_tsconfig', 1) . '</a>
                        ',0,1);
                }
        }
@@ -294,7 +294,7 @@ class SC_wizard_tsconfig {
         * @param       integer         Pointing to an entry in static_tsconfig_help to show.
         * @return      string          HTML
         */
-       function browseTSprop($mode,$show) {
+       function browseTSprop($mode, $show) {
                        // Get object tree:
                $objTree = $this->getObjTree();
 
@@ -305,7 +305,7 @@ class SC_wizard_tsconfig {
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'static_tsconfig_help', 'uid='.intval($show));
                        $rec = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                        $table = unserialize($rec['appdata']);
-                       $obj_string = strtr($this->objString,'()','[]');        // Title:
+                       $obj_string = strtr($this->objString, '()', '[]');      // Title:
 
                                // Title and description:
                        $out.='<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('show'=>''))).'" class="typo3-goBack">'.
@@ -322,12 +322,12 @@ class SC_wizard_tsconfig {
                                // Printing the "mixer-field":
                        if (!$this->onlyProperty) {
                                $links=array();
-                               $links[]='<a href="#" onclick="mixerField(\'Indent\');return false;">'.$GLOBALS['LANG']->getLL('tsprop_mixer_indent',1).'</a>';
-                               $links[]='<a href="#" onclick="mixerField(\'Outdent\');return false;">'.$GLOBALS['LANG']->getLL('tsprop_mixer_outdent',1).'</a>';
-                               $links[]='<a href="#" onclick="mixerField(\'Wrap\',unescape(\''.rawurlencode($obj_string).'\'));return false;">'.$GLOBALS['LANG']->getLL('tsprop_mixer_wrap',1).'</a>';
-                               $links[]='<a href="#" onclick="mixerField(\'Transfer\');return false;">'.$GLOBALS['LANG']->getLL('tsprop_mixer_transfer',1).'</a>';
-                               $out.='<textarea rows="5" name="mixer" wrap="off"'.$this->doc->formWidthText(48,'','off').' class="fixed-font enable-tab"></textarea>';
-                               $out.='<br /><strong>'.implode('&nbsp; | &nbsp;',$links).'</strong>';
+                               $links[]='<a href="#" onclick="mixerField(\'Indent\');return false;">'.$GLOBALS['LANG']->getLL('tsprop_mixer_indent', 1).'</a>';
+                               $links[]='<a href="#" onclick="mixerField(\'Outdent\');return false;">'.$GLOBALS['LANG']->getLL('tsprop_mixer_outdent', 1).'</a>';
+                               $links[]='<a href="#" onclick="mixerField(\'Wrap\',unescape(\''.rawurlencode($obj_string).'\'));return false;">'.$GLOBALS['LANG']->getLL('tsprop_mixer_wrap', 1).'</a>';
+                               $links[]='<a href="#" onclick="mixerField(\'Transfer\');return false;">'.$GLOBALS['LANG']->getLL('tsprop_mixer_transfer', 1).'</a>';
+                               $out.='<textarea rows="5" name="mixer" wrap="off"'.$this->doc->formWidthText(48, '', 'off').' class="fixed-font enable-tab"></textarea>';
+                               $out.='<br /><strong>'.implode('&nbsp; | &nbsp;', $links).'</strong>';
                                $out.='<hr />';
                        }
                }
@@ -353,7 +353,7 @@ class SC_wizard_tsconfig {
                                <table border="0" cellpadding="0" cellspacing="0" class="t3-tree t3-tree-config" id="typo3-objtree">
                                        <tr class="t3-row-header"><td>TSref</td></tr>
                                        <tr>
-                                               <td nowrap="nowrap">'.$tmpl->ext_getObjTree($this->removePointerObjects($objTree[$mode.'.']),'','','','','1').'</td>
+                                               <td nowrap="nowrap">'.$tmpl->ext_getObjTree($this->removePointerObjects($objTree[$mode.'.']), '', '', '', '', '1').'</td>
                                        </tr>
                                </table>';
                }
@@ -385,12 +385,12 @@ class SC_wizard_tsconfig {
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,obj_string,title', 'static_tsconfig_help', '');
                while($rec = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                        $rec['obj_string'] = $this->revertFromSpecialChars($rec['obj_string']);
-                       $p = explode(';',$rec['obj_string']);
+                       $p = explode(';', $rec['obj_string']);
                        foreach ($p as $v) {
-                               $p2 = t3lib_div::trimExplode(':',$v,1);
-                               $subp=t3lib_div::trimExplode('/',$p2[1],1);
+                               $p2 = t3lib_div::trimExplode(':', $v, 1);
+                               $subp=t3lib_div::trimExplode('/', $p2[1], 1);
                                foreach ($subp as $v2) {
-                                       $this->setObj($objTree,explode('.',$p2[0].'.'.$v2),array($rec,$v2));
+                                       $this->setObj($objTree, explode('.', $p2[0].'.'.$v2), array($rec, $v2));
                                }
                        }
                }
@@ -414,7 +414,7 @@ class SC_wizard_tsconfig {
                if (count($strArr)>1) {
                        array_shift($strArr);
                        if (!isset($objTree[$key.'.'])) $objTree[$key.'.']=array();
-                       $this->setObj($objTree[$key.'.'],$strArr,$params);
+                       $this->setObj($objTree[$key.'.'], $strArr, $params);
                } else {
                        $objTree[$key]=$params;
                        $objTree[$key]['_LINK']=$this->doLink($params);
@@ -429,8 +429,8 @@ class SC_wizard_tsconfig {
         * @access private
         */
        function revertFromSpecialChars($str) {
-               $str = str_replace('&gt;','>',$str);
-               $str = str_replace('&lt;','<',$str);
+               $str = str_replace('&gt;', '>', $str);
+               $str = str_replace('&lt;', '<', $str);
                return $str;
        }
 
@@ -443,7 +443,7 @@ class SC_wizard_tsconfig {
         */
        function doLink($params) {
                $title = trim($params[0]['title'])?trim($params[0]['title']):'[GO]';
-               $str = $this->linkToObj($title,$params[0]['uid'],$params[1]);
+               $str = $this->linkToObj($title, $params[0]['uid'], $params[1]);
                return $str;
        }
 
@@ -456,8 +456,8 @@ class SC_wizard_tsconfig {
         */
        function removePointerObjects($objArray) {
                foreach ($objArray as $k => $value) {
-                       if (substr(trim($k),0,2)=="->" && trim($k)!='->.') {
-                               $objArray['->.'][substr(trim($k),2)]=$objArray[$k];
+                       if (substr(trim($k), 0, 2)=="->" && trim($k)!='->.') {
+                               $objArray['->.'][substr(trim($k), 2)]=$objArray[$k];
                                unset($objArray[$k]);
                        }
                }
@@ -472,7 +472,7 @@ class SC_wizard_tsconfig {
         * @param       string          Title string for that record!
         * @return      string          Linked string
         */
-       function linkToObj($str,$uid,$objString='') {
+       function linkToObj($str, $uid, $objString='') {
                $aOnClick='jump(\''.rawurlencode($uid).'\',\''.rawurlencode($objString).'\');return false;';
                return '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.htmlspecialchars($str).'</a>';
        }
@@ -485,7 +485,7 @@ class SC_wizard_tsconfig {
         * @param       array           Object tree
         * @return      string          HTML content.
         */
-       function printTable($table,$objString,$objTree) {
+       function printTable($table, $objString, $objTree) {
                if (is_array($table['rows'])) {
 
                                // Initialize:
@@ -504,27 +504,27 @@ class SC_wizard_tsconfig {
                        foreach($table['rows'] as $i => $row) {
 
                                        // Linking:
-                               $lP=t3lib_div::trimExplode(LF,$row['property'],1);
+                               $lP=t3lib_div::trimExplode(LF, $row['property'], 1);
                                $lP2=array();
                                foreach ($lP as $k => $lStr) {
-                                       $lP2[$k] = $this->linkProperty($lStr,$lStr,$objString,$row['datatype']);
+                                       $lP2[$k] = $this->linkProperty($lStr, $lStr, $objString, $row['datatype']);
                                }
-                               $linkedProperties=implode('<hr />',$lP2);
+                               $linkedProperties=implode('<hr />', $lP2);
 
                                        // Data type:
                                $dataType = $row['datatype'];
 
                                        // Generally "->[something]"
                                $reg=array();
-                               preg_match('/->[[:alnum:]_]*/',$dataType,$reg);
+                               preg_match('/->[[:alnum:]_]*/', $dataType, $reg);
                                if ($reg[0] && is_array($objTree[$reg[0]])) {
-                                       $dataType = str_replace($reg[0],'<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('show'=>$objTree[$reg[0]][0]['uid'],'objString'=>$objString.'.'.$lP[0]))).'">'.htmlspecialchars($reg[0]).'</a>',$dataType);
+                                       $dataType = str_replace($reg[0],'<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('show'=>$objTree[$reg[0]][0]['uid'], 'objString'=>$objString.'.'.$lP[0]))).'">'.htmlspecialchars($reg[0]).'</a>', $dataType);
                                }
 
                                        // stdWrap
-                               if (!strstr($dataType,'->stdWrap') && strstr(strip_tags($dataType),'stdWrap')) {
+                               if (!strstr($dataType, '->stdWrap') && strstr(strip_tags($dataType), 'stdWrap')) {
                                                // Potential problem can be that "stdWrap" is substituted inside another A-tag. So maybe we should even check if there is already a <A>-tag present and if so, not make a substitution?
-                                       $dataType = str_replace('stdWrap','<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('show'=>$objTree['->stdWrap'][0]['uid'],'objString'=>$objString.'.'.$lP[0]))).'">stdWrap</a>',$dataType);
+                                       $dataType = str_replace('stdWrap', '<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('show'=>$objTree['->stdWrap'][0]['uid'], 'objString'=>$objString.'.'.$lP[0]))).'">stdWrap</a>', $dataType);
                                }
 
 
@@ -545,7 +545,7 @@ class SC_wizard_tsconfig {
                                TSconfig, attribute selector:
                        -->
                                <table border="0" cellpadding="0" cellspacing="1" width="98%" class="t3-table" id="typo3-attributes">
-                                       '.implode('',$lines).'
+                                       '.implode('', $lines).'
                                </table>';
                }
        }
@@ -559,11 +559,11 @@ class SC_wizard_tsconfig {
         * @param       string          Data type
         * @return      string          Linked $str
         */
-       function linkProperty($str,$propertyName,$prefix,$datatype) {
+       function linkProperty($str, $propertyName, $prefix, $datatype) {
                $out='';
 
                        // Setting preset value:
-               if (strstr($datatype,'boolean')) {
+               if (strstr($datatype, 'boolean')) {
                        $propertyVal='1';       // preset "1" to boolean values.
                }
 
@@ -577,7 +577,7 @@ class SC_wizard_tsconfig {
                }
 
                        // Wrap string:
-               $aOnClick = 'setValue(unescape(\''.rawurlencode($propertyName).'\'),unescape(\''.rawurlencode($propertyVal).'\')); return false;';
+               $aOnClick = 'setValue(unescape(\''.rawurlencode($propertyName).'\'), unescape(\''.rawurlencode($propertyVal).'\')); return false;';
                $out.= '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$str.'</a>';
 
                        // Return link: