Corrected wrong parameter order for some implode function calls.
authorMichael Stucki <michael.stucki@typo3.org>
Sun, 15 Aug 2004 15:31:13 +0000 (15:31 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Sun, 15 Aug 2004 15:31:13 +0000 (15:31 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@429 709f56b5-9817-0410-a4d7-c38de5d9e867

19 files changed:
ChangeLog
t3lib/class.t3lib_admin.php
t3lib/class.t3lib_div.php
t3lib/class.t3lib_install.php
t3lib/class.t3lib_loaddbgroup.php
t3lib/class.t3lib_stdgraphic.php
t3lib/class.t3lib_tcemain.php
t3lib/class.t3lib_treeview.php
t3lib/class.t3lib_tstemplate.php
t3lib/class.t3lib_userauthgroup.php
typo3/class.db_list.inc
typo3/sysext/cms/layout/class.tx_cms_layout.php
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_feuserauth.php
typo3/sysext/cms/tslib/class.tslib_gifbuilder.php
typo3/sysext/cms/tslib/class.tslib_menu.php
typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc
typo3/sysext/sv/class.tx_sv_auth.php

index ab629b9..5dab139 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-08-15  Michael Stucki  <mundaun@gmx.ch>
+
+       * Corrected wrong parameter order for some implode function calls.
+
 2004-08-07  Kasper Skårhøj,,,  <kasper@typo3.com>
 
        * Added three new permission modes for backend users: 1) Localization access control, 2) Access control on value level (for instance allow/deny individual selectorbox values), 3) API for custom permission options.
index 7040b32..74365e8 100644 (file)
@@ -171,7 +171,7 @@ class t3lib_admin {
                                        $lostIdList[]=$row['uid'];
                                }
                                if ($table=='pages')    {
-                                       $this->lostPagesList=implode($lostIdList,',');
+                                       $this->lostPagesList=implode(',',$lostIdList);
                                }
                        }
                }
@@ -451,7 +451,7 @@ class t3lib_admin {
                                while(list($id,)=each($dbArr))  {
                                        $idlist[]=$id;
                                }
-                               $theList = implode($idlist,',');
+                               $theList = implode(',',$idlist);
                                if ($theList)   {
                                        $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $table, 'uid IN ('.$theList.')'.t3lib_BEfunc::deleteClause($table));
                                        while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres))      {
index 5fda441..ea93c2d 100755 (executable)
@@ -683,7 +683,7 @@ class t3lib_div {
                while(list($k,$v)=each($items)) {
                        if ($v==$element)       {unset($items[$k]);}
                }
-               return implode($items,',');
+               return implode(',',$items);
        }
 
        /**
@@ -771,7 +771,7 @@ class t3lib_div {
                        }
                        $listArray = array_merge($listArray,$in_list);
                }
-               return implode(t3lib_div::uniqueArray($listArray),',');
+               return implode(',',t3lib_div::uniqueArray($listArray));
        }
 
        /**
index a81ed1a..f17215e 100755 (executable)
@@ -197,9 +197,9 @@ class t3lib_install {
                        array_push($inlines,$writeToLocalconf_dat['endLine']);
 
                        if ($this->setLocalconf)        {
-                               t3lib_div::writeFile($writeToLocalconf_dat['file'],implode($inlines,chr(10)));
+                               t3lib_div::writeFile($writeToLocalconf_dat['file'],implode(chr(10),$inlines));
 
-                               if (strcmp(t3lib_div::getUrl($writeToLocalconf_dat['file']), implode($inlines,chr(10))))        {
+                               if (strcmp(t3lib_div::getUrl($writeToLocalconf_dat['file']), implode(chr(10),$inlines)))        {
                                        die('typo3temp/localconf.php was NOT updated properly (written content didn\'t match file content) - maybe write access problem?');
                                }
 
@@ -376,7 +376,7 @@ class t3lib_install {
                        foreach($tempKeys as $table => $keyInf) {
                                foreach($keyInf as $kName => $index) {
                                        ksort($index);
-                                       $total[$table]['keys'][$kName] = $tempKeysPrefix[$table][$kName].' ('.implode($index,',').')';
+                                       $total[$table]['keys'][$kName] = $tempKeysPrefix[$table][$kName].' ('.implode(',',$index).')';
                                }
                        }
                }
@@ -517,7 +517,7 @@ class t3lib_install {
                                                        list($count) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
                                                        $statements['tables_count'][md5($statement)] = $count?'Records in table: '.$count:'';
                                                } else {
-                                                       $statement = 'CREATE TABLE '.$table." (\n".implode($whole_table,",\n")."\n) TYPE=MyISAM;";
+                                                       $statement = 'CREATE TABLE '.$table." (\n".implode(",\n",$whole_table)."\n) TYPE=MyISAM;";
                                                        $statements['create_table'][md5($statement)]=$statement;
                                                }
                                        }
@@ -552,7 +552,7 @@ class t3lib_install {
                if ($row['Extra'])      {
                        $field[] = $row['Extra'];
                }
-               return implode($field,' ');
+               return implode(' ',$field);
        }
 
        /**
index eb1fbc0..f5f53f5 100755 (executable)
@@ -302,7 +302,7 @@ class t3lib_loadDBGroup     {
                        // Traverses the tables listed:
                foreach($this->tableArray as $key => $val)      {
                        if (is_array($val))     {
-                               $itemList = implode($val,',');
+                               $itemList = implode(',',$val);
                                if ($itemList)  {
                                        $from = '*';
                                        if ($this->fromTC)      {
index 64a1715..5d8948b 100644 (file)
@@ -770,7 +770,7 @@ class t3lib_stdGraphic      {
 
                $this->map.='<area'.
                                ' shape="poly"'.
-                               ' coords="'.implode($cords,',').'"'.
+                               ' coords="'.implode(',',$cords).'"'.
                                ' href="'.htmlspecialchars($conf['url']).'"'.
                                ($conf['target'] ? ' target="'.htmlspecialchars($conf['target']).'"' : '').
                                $JS.
@@ -975,7 +975,7 @@ class t3lib_stdGraphic      {
                $newOffset = t3lib_div::intExplode(',',$conf['offset']);
                $newOffset[0]*=-1;
                $newOffset[1]*=-1;
-               $conf['offset']=implode($newOffset,',');
+               $conf['offset']=implode(',',$newOffset);
                $conf['color']=$conf['lowColor'];
                $this->makeShadow($im,$conf,$workArea,$txtConf);
        }
index 89e6ab7..44e25c2 100755 (executable)
@@ -1917,7 +1917,7 @@ class t3lib_TCEmain       {
 
                $dbAnalysis = t3lib_div::makeInstance('t3lib_loadDBGroup');
                $dbAnalysis->registerNonTableValues=$tcaFieldConf['allowNonIdValues'] ? 1 : 0;
-               $dbAnalysis->start(implode($valueArray,','),$tables);
+               $dbAnalysis->start(implode(',',$valueArray),$tables);
 
                if ($tcaFieldConf['MM'])        {
                        if ($status=='update')  {
@@ -3770,7 +3770,7 @@ class t3lib_TCEmain       {
                                }
                        }
                }
-               return implode($tableList,',');
+               return implode(',',$tableList);
        }
 
        /**
index 868d35e..c014328 100755 (executable)
@@ -892,7 +892,7 @@ class t3lib_treeView {
                        return $parentId;
                } else {
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
-                                               implode($this->fieldArray,','),
+                                               implode(',',$this->fieldArray),
                                                $this->table,
                                                $this->parentField.'="'.$GLOBALS['TYPO3_DB']->quoteStr($parentId, $this->table).'"'.
                                                        t3lib_BEfunc::deleteClause($this->table).
index 12204c1..864fc72 100755 (executable)
@@ -767,7 +767,7 @@ class t3lib_TStemplate      {
                                $constLen=t3lib_div::intInRange(strcspn($constVal,'}'),0,50);
                                $theConstList[]='{$'.substr($constVal,0,$constLen+1);
                        }
-                       if ($this->tt_track)    $GLOBALS['TT']->setTSlogMessage(implode($theConstList,',').': Constants may remain un-substituted!!',2);
+                       if ($this->tt_track)    $GLOBALS['TT']->setTSlogMessage(implode(',',$theConstList).': Constants may remain un-substituted!!',2);
                }
 
                        // Logging the textual size of the TypoScript Setup field text with all constants substituted:
@@ -889,7 +889,7 @@ class t3lib_TStemplate      {
                }
                        // Parsing the user TS (or getting from cache)
                $TSdataArray = t3lib_TSparser::checkIncludeLines_array($TSdataArray);
-               $userTS = implode($TSdataArray,chr(10).'[GLOBAL]'.chr(10));
+               $userTS = implode(chr(10).'[GLOBAL]'.chr(10),$TSdataArray);
 
                $parseObj = t3lib_div::makeInstance('t3lib_TSparser');
                $parseObj->parse($userTS);
@@ -1083,7 +1083,7 @@ class t3lib_TStemplate    {
                                if ($OK)        {
                                        $this->fileCache[$hash]=$outFile;
                                        return $outFile;
-                               } elseif ($this->tt_track) $GLOBALS['TT']->setTSlogMessage('"'.$file.'" was not located in the allowed paths: ('.implode($this->allowedPaths,',').')',3);
+                               } elseif ($this->tt_track) $GLOBALS['TT']->setTSlogMessage('"'.$file.'" was not located in the allowed paths: ('.implode(',',$this->allowedPaths).')',3);
                        } elseif ($this->tt_track) $GLOBALS['TT']->setTSlogMessage('"'.$this->getFileName_backPath.$file.'" is not a file (non-uploads/.. resource, did not exist).',3);
                } else {                // Here it is uploaded media:
                        $outFile = $this->extractFromResources($this->setup['resources'],$file);
index b070014..dd60a97 100755 (executable)
@@ -741,7 +741,7 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
                        $this->TSdataArray = t3lib_TSparser::checkIncludeLines_array($this->TSdataArray);
 
                                // Parsing the user TSconfig (or getting from cache)
-                       $this->userTS_text = implode($this->TSdataArray,chr(10).'[GLOBAL]'.chr(10));    // Imploding with "[global]" will make sure that non-ended confinements with braces are ignored.
+                       $this->userTS_text = implode(chr(10).'[GLOBAL]'.chr(10),$this->TSdataArray);    // Imploding with "[global]" will make sure that non-ended confinements with braces are ignored.
                        $hash = md5('userTS:'.$this->userTS_text);
                        $cachedContent = t3lib_BEfunc::getHash($hash,0);
                        if (isset($cachedContent) && !$this->userTS_dontGetCached)      {
@@ -820,7 +820,7 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
 
                                        // Include sub groups
                                if (trim($row['subgroup']))     {
-                                       $theList = implode(t3lib_div::intExplode(',',$row['subgroup']),',');    // Make integer list
+                                       $theList = implode(',',t3lib_div::intExplode(',',$row['subgroup']));    // Make integer list
                                        $this->fetchGroups($theList, $idList.','.$uid);         // Call recursively, pass along list of already processed groups so they are not recursed again.
                                }
                                        // Add the group uid, current list, TSconfig to the internal arrays.
index e22a6c2..262729a 100755 (executable)
@@ -172,7 +172,7 @@ class recordList extends t3lib_recordList {
                $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
                if ($sL>0)      {
                        $tree = $this->getTreeObject($id,$sL,$this->perms_clause);
-                       $this->pidSelect = 'pid IN ('.implode($tree->ids,',').')';
+                       $this->pidSelect = 'pid IN ('.implode(',',$tree->ids).')';
                } else {
                        $this->pidSelect = 'pid='.intval($id);
                }
index 402bb71..9717b3d 100755 (executable)
@@ -720,7 +720,7 @@ class tx_cms_layout extends recordList {
                $out='';
                if (count($tree->ids))          {
                        $delClause = t3lib_BEfunc::deleteClause('sys_note');
-                       $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_note', 'pid IN ('.implode($tree->ids,',').') AND (!personal OR cruser='.intval($GLOBALS['BE_USER']->user['uid']).')'.$delClause);
+                       $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_note', 'pid IN ('.implode(',',$tree->ids).') AND (!personal OR cruser='.intval($GLOBALS['BE_USER']->user['uid']).')'.$delClause);
                        $dbCount = $GLOBALS['TYPO3_DB']->sql_num_rows($result);
 
                                // If sys_notes were found, render them:
@@ -758,7 +758,7 @@ class tx_cms_layout extends recordList {
                                                $info = Array();;
                                                $theData = Array();
                                                $this->getProcessedValue('sys_note','subject,category,author,email,personal',$row,$info);
-                                               $cont=implode($info,'<br />');
+                                               $cont=implode('<br />',$info);
                                                $head = '<b>Page:</b> '.t3lib_BEfunc::getRecordPath($row['pid'],$perms_clause,10).'<br />';
 
                                                $theData['__cmds__']= $this->getIcon('sys_note',$row);
@@ -1531,7 +1531,7 @@ class tx_cms_layout extends recordList {
                        if (count($info))       {
                                $out.= '
                                        <tr>
-                                               <td class="bgColor4-20">'.implode($info,'<br />').'</td>
+                                               <td class="bgColor4-20">'.implode('<br />',$info).'</td>
                                        </tr>';
                        }
                }
index f1c9895..65fab78 100755 (executable)
@@ -1891,7 +1891,7 @@ class tslib_cObj {
                        // Formname;
                $formname = $GLOBALS['TSFE']->uniqueHash();
                if ($conf['REQ'])       {
-                       $validateForm=' onsubmit="return validateForm(\''.$formname.'\',\''.implode($fieldlist,',').'\',\''.rawurlencode($conf['goodMess']).'\',\''.rawurlencode($conf['badMess']).'\',\''.rawurlencode($conf['emailMess']).'\')"';
+                       $validateForm=' onsubmit="return validateForm(\''.$formname.'\',\''.implode(',',$fieldlist).'\',\''.rawurlencode($conf['goodMess']).'\',\''.rawurlencode($conf['badMess']).'\',\''.rawurlencode($conf['emailMess']).'\')"';
                        $GLOBALS['TSFE']->additionalHeaderData['JSFormValidate'] = '<script type="text/javascript" src="'.$GLOBALS['TSFE']->absRefPrefix.'t3lib/jsfunc.validateform.js"></script>';
                } else $validateForm='';
 
@@ -2327,9 +2327,9 @@ class tslib_cObj {
                                        unset($parArray['src']);
                                        $parArray['code'] = 'code="'.htmlspecialchars($fileinfo['file']).'"';
                                        $parArray['codebase'] = 'codebase="'.htmlspecialchars($fileinfo['path']).'"';
-                                       $content='<applet '.implode($parArray,' ').'></applet>';
+                                       $content='<applet '.implode(' ',$parArray).'></applet>';
                                } else {
-                                       $content='<embed '.implode($parArray,' ').'></embed>';
+                                       $content='<embed '.implode(' ',$parArray).'></embed>';
                                }
                        }
                }
@@ -3275,7 +3275,7 @@ class tslib_cObj {
                                        while(list($key,)=each($items['sorting']))      {
                                                $list_arr[]=  $fullPath ? $path.'/'.$items['files'][$key] : $items['files'][$key];
                                        }
-                                       return implode($list_arr,',');
+                                       return implode(',',$list_arr);
                                }
                        }
                }
@@ -3570,7 +3570,7 @@ class tslib_cObj {
                        $tableTagArray[] = $conf['params'];
                }
 
-               $tableWrap = implode($tableTagArray,' ').'> | </table>';
+               $tableWrap = implode(' ',$tableTagArray).'> | </table>';
                $theValue=$this->wrap($theValue, $tableWrap);
                        // return
                return $theValue;
@@ -5310,7 +5310,7 @@ class tslib_cObj {
                while(list($k,$v)=each($listArr))       {
                        $listArr[$k]=trim($v);
                }
-               return implode($listArr,',');
+               return implode(',',$listArr);
        }
 
        /**
@@ -5423,7 +5423,7 @@ class tslib_cObj {
                if ($email_from)        {$headers[]='From: '.$email_fromName.' <'.$email_from.'>';}
                if ($replyTo)           {$headers[]='Reply-To: '.$replyTo;}
 
-               $recipients=implode(t3lib_div::trimExplode(',',$recipients,1),',');
+               $recipients=implode(',',t3lib_div::trimExplode(',',$recipients,1));
 
                $emailContent = trim($msg);
                if ($emailContent)      {
@@ -5431,8 +5431,8 @@ class tslib_cObj {
                        $subject=trim($parts[0]);
                        $plain_message=trim($parts[1]);
 
-                       if ($recipients)        $GLOBALS['TSFE']->plainMailEncoded($recipients, $subject, $plain_message, implode($headers,chr(10)));
-                       if ($cc)        $GLOBALS['TSFE']->plainMailEncoded($cc, $subject, $plain_message, implode($headers,chr(10)));
+                       if ($recipients)        $GLOBALS['TSFE']->plainMailEncoded($recipients, $subject, $plain_message, implode(chr(10),$headers));
+                       if ($cc)        $GLOBALS['TSFE']->plainMailEncoded($cc, $subject, $plain_message, implode(chr(10),$headers));
                        return true;
                }
        }
@@ -5730,7 +5730,7 @@ class tslib_cObj {
                $uid=intval($uid);
 
                if ($uid)       {
-                       $fieldList = implode(t3lib_div::trimExplode(',',$fieldList,1),',');
+                       $fieldList = implode(',',t3lib_div::trimExplode(',',$fieldList,1));
                        $updateFields=array();
 
                        foreach($dataArr as $f => $v)   {
@@ -5777,7 +5777,7 @@ class tslib_cObj {
 
                unset($dataArr['uid']); // uid can never be set
                if ($pid>=0)    { $dataArr['pid'] = $pid; }             // Set pid < 0 and the dataarr-pid will be used!
-               $fieldList = implode(t3lib_div::trimExplode(',',$fieldList.','.$extraList,1),',');
+               $fieldList = implode(',',t3lib_div::trimExplode(',',$fieldList.','.$extraList,1));
 
                $insertFields = array();
                foreach($dataArr as $f => $v)   {
@@ -5805,7 +5805,7 @@ class tslib_cObj {
         * @see user_feAdmin
         */
        function DBmayFEUserEdit($table,$row, $feUserRow, $allowedGroups='',$feEditSelf=0)      {
-               $groupList = $allowedGroups ? implode(array_intersect(t3lib_div::trimExplode(',',$feUserRow['usergroup'],1),t3lib_div::trimExplode(',',$allowedGroups,1)),',') : $feUserRow['usergroup'];
+               $groupList = $allowedGroups ? implode(',',array_intersect(t3lib_div::trimExplode(',',$feUserRow['usergroup'],1),t3lib_div::trimExplode(',',$allowedGroups,1))) : $feUserRow['usergroup'];
                $ok=0;
                        // points to the field that allows further editing from frontend if not set. If set the record is locked.
                if (!$GLOBALS['TCA'][$table]['ctrl']['fe_admin_lock'] || !$row[$GLOBALS['TCA'][$table]['ctrl']['fe_admin_lock']])       {
@@ -5846,7 +5846,7 @@ class tslib_cObj {
         */
        function DBmayFEUserEditSelect($table,$feUserRow,$allowedGroups='',$feEditSelf=0)       {
                        // Returns where-definition that selects user-editable records.
-               $groupList = $allowedGroups ? implode(array_intersect(t3lib_div::trimExplode(',',$feUserRow['usergroup'],1),t3lib_div::trimExplode(',',$allowedGroups,1)),',') : $feUserRow['usergroup'];
+               $groupList = $allowedGroups ? implode(',',array_intersect(t3lib_div::trimExplode(',',$feUserRow['usergroup'],1),t3lib_div::trimExplode(',',$allowedGroups,1))) : $feUserRow['usergroup'];
                $OR_arr=array();
                        // points to the field (integer) that holds the fe_users-id of the creator fe_user
                if ($GLOBALS['TCA'][$table]['ctrl']['fe_cruser_id'])    {
@@ -5866,7 +5866,7 @@ class tslib_cObj {
 
                $whereDef=' AND 1=0';
                if (count($OR_arr))     {
-                       $whereDef=' AND ('.implode($OR_arr,' OR ').')';
+                       $whereDef=' AND ('.implode(' OR ',$OR_arr).')';
                        if ($GLOBALS['TCA'][$table]['ctrl']['fe_admin_lock'])   {
                                $whereDef.=' AND NOT '.$GLOBALS['TCA'][$table]['ctrl']['fe_admin_lock'];
                        }
@@ -6088,7 +6088,7 @@ class tslib_cObj {
                                        }
                                }
                                if (count($where_p))    {
-                                       $where.=' AND ('.implode($where_p,' OR ').')';
+                                       $where.=' AND ('.implode(' OR ',$where_p).')';
                                }
                        }
                }
@@ -6290,7 +6290,7 @@ class tslib_cObj {
        function checkPidArray($listArr)        {
                $outArr = Array();
                if (is_array($listArr) && count($listArr))      {
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'uid IN ('.implode($listArr,',').')'.$this->enableFields('pages').' AND doktype NOT IN ('.$this->checkPid_badDoktypeList.')');
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'uid IN ('.implode(',',$listArr).')'.$this->enableFields('pages').' AND doktype NOT IN ('.$this->checkPid_badDoktypeList.')');
                        if ($error = $GLOBALS['TYPO3_DB']->sql_error()) {
                                $GLOBALS['TT']->setTSlogMessage($error.': '.$query,3);
                        } else {
index 35e1f3b..8a56c5e 100755 (executable)
 #debug(array($cHash_calc,$this->cHash,$pA));
                        if ($cHash_calc!=$this->cHash)  {
                                $this->set_no_cache();
-                               $GLOBALS['TT']->setTSlogMessage('The incoming cHash "'.$this->cHash.'" and calculated cHash "'.$cHash_calc.'" did not match, so caching was disabled. The fieldlist used was "'.implode(array_keys($pA),',').'"',2);
+                               $GLOBALS['TT']->setTSlogMessage('The incoming cHash "'.$this->cHash.'" and calculated cHash "'.$cHash_calc.'" did not match, so caching was disabled. The fieldlist used was "'.implode(',',array_keys($pA)).'"',2);
                        }
                }
        }
                }
                $GLOBALS['TT']->push('Substitute header section');
                $this->INTincScript_loadJSCode();
-               $this->content = str_replace('<!--HD_'.$this->config['INTincScript_ext']['divKey'].'-->', implode($this->additionalHeaderData,chr(10)), $this->content);
+               $this->content = str_replace('<!--HD_'.$this->config['INTincScript_ext']['divKey'].'-->', implode(chr(10),$this->additionalHeaderData), $this->content);
                $this->content = str_replace('<!--TDS_'.$this->config['INTincScript_ext']['divKey'].'-->', $this->divSection, $this->content);
                $this->setAbsRefPrefix();
                $GLOBALS['TT']->pull();
@@ -2201,7 +2201,7 @@ if (version == "n3") {
 <script type="text/javascript">
        /*<![CDATA[*/
 <!--
-'.implode($this->additionalJavaScript,chr(10)).'
+'.implode(chr(10),$this->additionalJavaScript).'
 '.trim($this->JSCode).'
 // -->
        /*]]>*/
@@ -2212,7 +2212,7 @@ if (version == "n3") {
 <style type="text/css">
        /*<![CDATA[*/
 <!--
-'.implode($this->additionalCSS,chr(10)).'
+'.implode(chr(10),$this->additionalCSS).'
 // -->
        /*]]>*/
 </style>';
@@ -2791,7 +2791,7 @@ if (version == "n3") {
 
                        exec ($this->TYPO3_CONF_VARS['FE']['tidy_path'].' '.$fname, $output);                   // run the $content through 'tidy', which formats the HTML to nice code.
                        @unlink ($fname);       // Delete the tempfile again
-                       $content = implode($output,chr(10));
+                       $content = implode(chr(10),$output);
                        if (!trim($content))    {
                                $content = $oldContent; // Restore old content due empty return value.
                                $GLOBALS['TT']->setTSlogMessage('"tidy" returned an empty value!',2);
@@ -2875,7 +2875,7 @@ if (version == "n3") {
                        }
                                // Parsing the user TS (or getting from cache)
                        $TSdataArray = t3lib_TSparser::checkIncludeLines_array($TSdataArray);
-                       $userTS = implode($TSdataArray,chr(10).'[GLOBAL]'.chr(10));
+                       $userTS = implode(chr(10).'[GLOBAL]'.chr(10),$TSdataArray);
                        $hash = md5('pageTS:'.$userTS);
                        $cachedContent = $this->sys_page->getHash($hash,0);
                        if (isset($cachedContent))      {
index f6825a4..ccd2214 100644 (file)
@@ -148,7 +148,7 @@ class tslib_feUserAuth extends t3lib_userAuth {
 
                if (is_array($this->user) && $this->user['usergroup'])  {
                        $groups = t3lib_div::intExplode(',',$this->user['usergroup']);
-                       $list = implode($groups,',');
+                       $list = implode(',',$groups);
                        $lockToDomain_SQL = ' AND (lockToDomain="" OR lockToDomain="'.t3lib_div::getIndpEnv('HTTP_HOST').'")';
                        if (!$this->showHiddenRecords)  $hiddenP = 'AND NOT hidden ';
 
@@ -190,7 +190,7 @@ class tslib_feUserAuth extends t3lib_userAuth {
                if (!$this->userTSUpdated) {
                                // Parsing the user TS (or getting from cache)
                        $this->TSdataArray = t3lib_TSparser::checkIncludeLines_array($this->TSdataArray);
-                       $userTS = implode($this->TSdataArray,chr(10).'[GLOBAL]'.chr(10));
+                       $userTS = implode(chr(10).'[GLOBAL]'.chr(10),$this->TSdataArray);
                        $parseObj = t3lib_div::makeInstance('t3lib_TSparser');
                        $parseObj->parse($userTS);
                        $this->userTS = $parseObj->setup;
index 1985c6a..d05bbb2 100755 (executable)
@@ -520,7 +520,7 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
                                $value[$key]=intval($value[$key]);
                        }
                }
-               $string = implode($value,',');
+               $string = implode(',',$value);
                return $string;
        }
 
index 3af568a..4780e87 100755 (executable)
@@ -423,7 +423,7 @@ class tslib_menu {
                                                        $bA = t3lib_div::intInRange($this->conf['special.']['beginAtLevel'],0,100);
                                                        $id_list_arr[] = tslib_cObj::getTreeList(-1*$id,$depth-1+$bA,$bA-1);
                                                }
-                                               $id_list = implode($id_list_arr, ',');
+                                               $id_list = implode(',',$id_list_arr);
                                                        // Get sortField (mode)
                                                switch($mode)   {
                                                        case 'starttime':
@@ -525,7 +525,7 @@ class tslib_menu {
                                                                        $keyWordsWhereArr[] = $kfield.' LIKE "%'.$GLOBALS['TYPO3_DB']->quoteStr($word, 'pages').'%"';
                                                                }
                                                        }
-                                                       $res = $GLOBALS['TSFE']->cObj->exec_getQuery('pages',Array('pidInList'=>'0', 'uidInList'=>$id_list, 'where'=>'('.implode($keyWordsWhereArr,' OR ').')'.$extraWhere, 'orderBy'=>($altSortFieldValue ? $altSortFieldValue : $sortField.' desc'),'max'=>$limit));
+                                                       $res = $GLOBALS['TSFE']->cObj->exec_getQuery('pages',Array('pidInList'=>'0', 'uidInList'=>$id_list, 'where'=>'('.implode(' OR ',$keyWordsWhereArr).')'.$extraWhere, 'orderBy'=>($altSortFieldValue ? $altSortFieldValue : $sortField.' desc'),'max'=>$limit));
                                                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))      {
                                                                $temp[$row['uid']]=$this->sys_page->getPageOverlay($row);
                                                        }
@@ -1760,7 +1760,7 @@ class tslib_gmenu extends tslib_menu {
                                $tempXY = explode(',',$val['XY']);
                                if ($Wcounter<$minDim[0])       {$tempXY[0]=$minDim[0]-$Wcounter; $flag=1;}
                                if ($Hcounter<$minDim[1])       {$tempXY[1]=$minDim[1]-$Hcounter; $flag=1;}
-                               $val['XY'] = implode($tempXY,',');
+                               $val['XY'] = implode(',',$tempXY);
                                if (!$flag){break;}
                        }
                        $c++;
@@ -1778,7 +1778,7 @@ class tslib_gmenu extends tslib_menu {
                                        if ($this->mconf['useLargestItemX'])    {$tempXY[0] = max($totalWH['W']);}
                                        if ($this->mconf['useLargestItemY'])    {$tempXY[1] = max($totalWH['H']);}
                                                // regenerate the new values...
-                                       $val['XY'] = implode($tempXY,',');
+                                       $val['XY'] = implode(',',$tempXY);
                                        $gifCreator = t3lib_div::makeInstance('tslib_gifBuilder');
                                        $gifCreator->init();
                                        $gifCreator->start($val,$this->menuArr[$key]);
@@ -1801,7 +1801,7 @@ class tslib_gmenu extends tslib_menu {
                                                $tempXY[1] = $totalWH['H'][$key]+$compensate;
                                        }
                                                // regenerate the new values...
-                                       $val['XY'] = implode($tempXY,',');
+                                       $val['XY'] = implode(',',$tempXY);
                                        $gifCreator = t3lib_div::makeInstance('tslib_gifBuilder');
                                        $gifCreator->init();
                                        $gifCreator->start($val,$this->menuArr[$key]);
@@ -1813,7 +1813,7 @@ class tslib_gmenu extends tslib_menu {
                                        if ($maxDim[0] && $Wcounter+$gifCreator->XY[0]>=$maxDim[0])     {$tempXY[0]==$maxDim[0]-$Wcounter; $maxFlag=1;}
                                        if ($maxDim[1] && $Hcounter+$gifCreator->XY[1]>=$maxDim[1])     {$tempXY[1]=$maxDim[1]-$Hcounter; $maxFlag=1;}
                                        if ($maxFlag)   {
-                                               $val['XY'] = implode($tempXY,',');
+                                               $val['XY'] = implode(',',$tempXY);
                                                $gifCreator = t3lib_div::makeInstance('tslib_gifBuilder');
                                                $gifCreator->init();
                                                $gifCreator->start($val,$this->menuArr[$key]);
@@ -1829,7 +1829,7 @@ class tslib_gmenu extends tslib_menu {
                                        while(list(,$index)=each($Hobjs))       {
                                                if ($gifCreator->setup[$index] && $gifCreator->setup[$index.'.'])       {
                                                        $oldOffset = explode(',',$gifCreator->setup[$index.'.']['offset']);
-                                                       $gifCreator->setup[$index.'.']['offset'] = implode($gifCreator->applyOffset($oldOffset,Array(0,-$Hcounter)), ',');
+                                                       $gifCreator->setup[$index.'.']['offset'] = implode(',',$gifCreator->applyOffset($oldOffset,Array(0,-$Hcounter)));
                                                }
                                        }
                                }
@@ -1839,7 +1839,7 @@ class tslib_gmenu extends tslib_menu {
                                        while(list(,$index)=each($Wobjs))       {
                                                if ($gifCreator->setup[$index] && $gifCreator->setup[$index.'.'])       {
                                                        $oldOffset = explode(',',$gifCreator->setup[$index.'.']['offset']);
-                                                       $gifCreator->setup[$index.'.']['offset'] = implode($gifCreator->applyOffset($oldOffset,Array(-$Wcounter,0)), ',');
+                                                       $gifCreator->setup[$index.'.']['offset'] = implode(',',$gifCreator->applyOffset($oldOffset,Array(-$Wcounter,0)));
                                                }
                                        }
                                }
@@ -1938,7 +1938,7 @@ class tslib_gmenu extends tslib_menu {
                                $tempXY = explode(',',$val['XY']);
                                if ($Wcounter<$minDim[0])       {$tempXY[0]=$minDim[0]-$Wcounter; $flag=1;}
                                if ($Hcounter<$minDim[1])       {$tempXY[1]=$minDim[1]-$Hcounter; $flag=1;}
-                               $val['XY'] = implode($tempXY,',');
+                               $val['XY'] = implode(',',$tempXY);
                                if (!$flag){break;}
                        }
                        $c++;
@@ -1951,7 +1951,7 @@ class tslib_gmenu extends tslib_menu {
                                if ($maxDim[0] && $Wcounter+$gifCreator->XY[0]>=$maxDim[0])     {$tempXY[0]==$maxDim[0]-$Wcounter; $maxFlag=1;}
                                if ($maxDim[1] && $Hcounter+$gifCreator->XY[1]>=$maxDim[1])     {$tempXY[1]=$maxDim[1]-$Hcounter; $maxFlag=1;}
                                if ($maxFlag)   {
-                                       $val['XY'] = implode($tempXY,',');
+                                       $val['XY'] = implode(',',$tempXY);
                                        $gifCreator = t3lib_div::makeInstance('tslib_gifBuilder');
                                        $gifCreator->init();
                                        $gifCreator->start($val,$this->menuArr[$key]);
@@ -2363,7 +2363,7 @@ class tslib_imgmenu extends tslib_menu {
                                        $workArea[2] = $dConf[$key][2] ? $dConf[$key][2] : $dConf[$key][0];
                                        $workArea[3] = $dConf[$key][3] ? $dConf[$key][3] : $dConf[$key][1];
 
-                                       $gifCreator->setup[$index.'.']['set'] = implode($workArea,',');
+                                       $gifCreator->setup[$index.'.']['set'] = implode(',',$workArea);
                                        $workArea[0]+=$dConf[$key][0];
                                        $workArea[1]+=$dConf[$key][1];
                                }
index c3f4dfb..92d3db5 100755 (executable)
@@ -754,10 +754,10 @@ class user_feAdmin        {
                                                break;
                                        }
                                }
-                               $this->markerArray['###EVAL_ERROR_FIELD_'.$theField.'###'] = is_array($this->failureMsg[$theField]) ? implode($this->failureMsg[$theField],'<br />') : '';
+                               $this->markerArray['###EVAL_ERROR_FIELD_'.$theField.'###'] = is_array($this->failureMsg[$theField]) ? implode('<br />',$this->failureMsg[$theField]) : '';
                        }
                }
-               $this->failure=implode($tempArr,',');    //$failure will show which fields were not OK
+               $this->failure=implode(',',$tempArr);    //$failure will show which fields were not OK
        }
 
        /**
@@ -834,7 +834,7 @@ class user_feAdmin  {
                                $theUid = $this->dataArr['uid'];
                                $origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable,$theUid);           // Fetches the original record to check permissions
                                if ($this->conf['edit'] && ($GLOBALS['TSFE']->loginUser || $this->aCAuth($origArr)))    {       // Must be logged in in order to edit  (OR be validated by email)
-                                       $newFieldList = implode(array_intersect(explode(',',$this->fieldList),t3lib_div::trimExplode(',',$this->conf['edit.']['fields'],1)),',');
+                                       $newFieldList = implode(',',array_intersect(explode(',',$this->fieldList),t3lib_div::trimExplode(',',$this->conf['edit.']['fields'],1)));
                                        if ($this->aCAuth($origArr) || $this->cObj->DBmayFEUserEdit($this->theTable,$origArr,$GLOBALS['TSFE']->fe_user->user,$this->conf['allowedGroups'],$this->conf['fe_userEditSelf']))      {
                                                $this->cObj->DBgetUpdate($this->theTable, $theUid, $this->dataArr, $newFieldList, TRUE);
                                                $this->currentArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable,$theUid);
@@ -847,7 +847,7 @@ class user_feAdmin  {
                        break;
                        default:
                                if ($this->conf['create'])      {
-                                       $newFieldList = implode(array_intersect(explode(',',$this->fieldList),t3lib_div::trimExplode(',',$this->conf['create.']['fields'],1)),',');
+                                       $newFieldList = implode(',',array_intersect(explode(',',$this->fieldList),t3lib_div::trimExplode(',',$this->conf['create.']['fields'],1)));
                                        $this->cObj->DBgetInsert($this->theTable, $this->thePid, $this->dataArr, $newFieldList, TRUE);
                                        $newId = $GLOBALS['TYPO3_DB']->sql_insert_id();
 
@@ -1124,7 +1124,7 @@ class user_feAdmin        {
                                        if ($sFK=='DELETE')     {
                                                $this->cObj->DBgetDelete($this->theTable, $theUid, TRUE);
                                        } else {
-                                               $newFieldList = implode(array_intersect(t3lib_div::trimExplode(',',$this->fieldList),t3lib_div::trimExplode(',',implode($fieldArr,','),1)),',');
+                                               $newFieldList = implode(',',array_intersect(t3lib_div::trimExplode(',',$this->fieldList),t3lib_div::trimExplode(',',implode($fieldArr,','),1)));
                                                $this->cObj->DBgetUpdate($this->theTable, $theUid, $fD, $newFieldList, TRUE);
                                        }
 
index e2e9766..206d283 100644 (file)
@@ -159,7 +159,7 @@ class tx_sv_auth extends tx_sv_authbase     {
                        $groups = array_unique($groups);
 
                        if (count($groups))     {
-                               $list = implode($groups,',');
+                               $list = implode(',',$groups);
                                
                                if ($this->writeDevLog)         t3lib_div::devLog('Get usergroups with id: '.$list, 'tx_sv_auth');