diff --git a/t3lib/class.t3lib_page.php b/t3lib/class.t3lib_page.php index dd6117f870b2eb5054bd5d8d29f482aa52be1000..02ce152590c2e60becbb34938b8d0df208f840e8 100755 --- a/t3lib/class.t3lib_page.php +++ b/t3lib/class.t3lib_page.php @@ -761,8 +761,8 @@ class t3lib_pageSelect { */ function checkRecord($table,$uid,$checkPage=0) { global $TCA; - $uid=intval($uid); - if (is_array($TCA[$table])) { + $uid = intval($uid); + if (is_array($TCA[$table])) { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, 'uid='.intval($uid).$this->enableFields($table)); if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { $this->versionOL($table,$row); diff --git a/t3lib/class.t3lib_tcemain.php b/t3lib/class.t3lib_tcemain.php index a3fdc401ac83a9c8387a1feb8793a803eabc705d..3f28ded4161790205a63368b3b948cf194df8d2b 100755 --- a/t3lib/class.t3lib_tcemain.php +++ b/t3lib/class.t3lib_tcemain.php @@ -1978,7 +1978,7 @@ class t3lib_TCEmain { default: if (substr($func, 0, 3) == 'tx_') { $evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func].':&'.$func); - if(is_object($evalObj) && method_exists($evalObj, 'evaluateFieldValue')) { + if (is_object($evalObj) && method_exists($evalObj, 'evaluateFieldValue')) { $value = $evalObj->evaluateFieldValue($value, $is_in, $set); } } diff --git a/t3lib/class.t3lib_tstemplate.php b/t3lib/class.t3lib_tstemplate.php index 0fbd177a66c9bca1dd92e72ef447538c65f9b2a5..ef759b5b8fd76c96ad635fc6c7fc31d942902adf 100755 --- a/t3lib/class.t3lib_tstemplate.php +++ b/t3lib/class.t3lib_tstemplate.php @@ -1401,7 +1401,7 @@ class t3lib_TStemplate { $page['alias'] ? $page['alias'] : $page['uid'], intval($typeNum), $LD['linkVars'], - $LD['no_cache']?1:0 + $LD['no_cache'] ? true : false ); if ($flag_simulateStaticDocuments_pEnc) { @@ -1431,7 +1431,7 @@ class t3lib_TStemplate { 'args' => array('page'=>$page, 'oTarget'=>$oTarget, 'no_cache'=>$no_cache, 'script'=>$script, 'overrideArray'=>$overrideArray, 'addParams'=>$addParams, 'typeOverride'=>$typeOverride), 'typeNum' => $typeNum ); - foreach($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'] as $_funcRef) { + foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'] as $_funcRef) { t3lib_div::callUserFunction($_funcRef,$_params,$this); } } diff --git a/typo3/db_new.php b/typo3/db_new.php index ac0e488fc861497d04ac472ebc7f3c6a27d0263d..ddb51181c6089f316c32cc43593e133b44396521 100755 --- a/typo3/db_new.php +++ b/typo3/db_new.php @@ -244,9 +244,9 @@ class SC_db_new { // Set header-HTML and return_url - $this->code=$this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br /> + $this->code = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br /> '; - $this->R_URI=$this->returnUrl; + $this->R_URI = $this->returnUrl; // GENERATE the HTML-output depending on mode (pagesOnly is the page wizard) if (!$this->pagesOnly) { // Regular new element: diff --git a/typo3/sysext/cms/layout/db_new_content_el.php b/typo3/sysext/cms/layout/db_new_content_el.php index 27720705429d28daabdefaa0cc13f1b561d903ca..9393be159519e17ec3754d52e9457a180814c90c 100644 --- a/typo3/sysext/cms/layout/db_new_content_el.php +++ b/typo3/sysext/cms/layout/db_new_content_el.php @@ -261,7 +261,7 @@ class SC_db_new_content_el { // Traverse items for the wizard. // An item is either a header or an item rendered with a radio button and title/description and icon: $cc=0; - foreach($wizardItems as $k => $wInfo) { + foreach ($wizardItems as $k => $wInfo) { if ($wInfo['header']) { if ($cc>0) $lines[]=' <tr> @@ -307,7 +307,7 @@ class SC_db_new_content_el { <table border="0" cellpadding="1" cellspacing="2" id="typo3-ceWizardTable"> '.implode('',$lines).' </table>'; - $this->content.=$this->doc->section(!$onClickEvent?$LANG->getLL('1_selectType'):'',$code,0,1); + $this->content.= $this->doc->section(!$onClickEvent?$LANG->getLL('1_selectType'):'',$code,0,1); @@ -315,11 +315,11 @@ class SC_db_new_content_el { if (!$onClickEvent) { // Add anchor "sel2" - $this->content.=$this->doc->section('','<a name="sel2"></a>'); - $this->content.=$this->doc->spacer(20); + $this->content.= $this->doc->section('','<a name="sel2"></a>'); + $this->content.= $this->doc->spacer(20); // Select position - $code=$LANG->getLL('sel2',1).'<br /><br />'; + $code = $LANG->getLL('sel2',1).'<br /><br />'; // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable: $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->id,'mod.SHARED'); @@ -327,27 +327,27 @@ class SC_db_new_content_el { $colPosList = implode(',',array_unique(t3lib_div::intExplode(',',$colPosList))); // Removing duplicates, if any // Finally, add the content of the column selector to the content: - $code.=$posMap->printContentElementColumns($this->id,0,$colPosList,1,$this->R_URI); - $this->content.=$this->doc->section($LANG->getLL('2_selectPosition'),$code,0,1); + $code.= $posMap->printContentElementColumns($this->id,0,$colPosList,1,$this->R_URI); + $this->content.= $this->doc->section($LANG->getLL('2_selectPosition'),$code,0,1); } // IF there is a return-url set, then print a go-back link: if ($this->R_URI) { $code='<br /><br /><a href="'.htmlspecialchars($this->R_URI).'" class="typo3-goBack"><img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/goback.gif','width="14" height="14"').' alt="" />'.$LANG->getLL('goBack',1).'</a>'; - $this->content.=$this->doc->section('',$code,0,1); + $this->content.= $this->doc->section('',$code,0,1); } // Add CSH: $this->content.= $this->doc->section('',t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'new_ce', $GLOBALS['BACK_PATH'],'<br/>'),0,1); // Add a very high clear-gif, 700 px (so that the link to the anchor "sel2" shows this part in top for sure...) - $this->content.=$this->doc->section('','<img src="clear.gif" width="1" height="700" alt="" />',0,1); + $this->content.= $this->doc->section('','<img src="clear.gif" width="1" height="700" alt="" />',0,1); } else { // In case of no access: - $this->content=''; - $this->content.=$this->doc->startPage($LANG->getLL('newContentElement')); - $this->content.=$this->doc->header($LANG->getLL('newContentElement')); - $this->content.=$this->doc->spacer(5); + $this->content = ''; + $this->content.= $this->doc->startPage($LANG->getLL('newContentElement')); + $this->content.= $this->doc->header($LANG->getLL('newContentElement')); + $this->content.= $this->doc->spacer(5); } } @@ -556,7 +556,7 @@ Contact me: | tv=check | 1 $row = array('pid'=>$this->id); $TCEFORM_TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig('tt_content',$row); $removeItems = t3lib_div::trimExplode(',',$TCEFORM_TSconfig['CType']['removeItems'],1); - + $headersUsed = Array(); // Traverse wizard items: foreach($wizardItems as $key => $cfg) { diff --git a/typo3/sysext/cms/tslib/class.tslib_content.php b/typo3/sysext/cms/tslib/class.tslib_content.php index cf7209185e481e7a97f222b07aa024dfe3f8882e..b9664473e0355b31505951d388c1b6a79a2402ce 100755 --- a/typo3/sysext/cms/tslib/class.tslib_content.php +++ b/typo3/sysext/cms/tslib/class.tslib_content.php @@ -1482,9 +1482,9 @@ class tslib_cObj { } } } - $content='<tr>'.$content.'</tr>'; - $content='<table'.$tableParams.'>'.$content.'</table>'; - $content.=$this->cObjGetSingle($conf['after'],$conf['after.'], 'after'); + $content = '<tr>'.$content.'</tr>'; + $content = '<table'.$tableParams.'>'.$content.'</table>'; + $content.= $this->cObjGetSingle($conf['after'],$conf['after.'], 'after'); if ($conf['stdWrap.']) { $content = $this->stdWrap($content,$conf['stdWrap.']); } @@ -1605,7 +1605,7 @@ class tslib_cObj { // Adding the new dataArray config form: if (is_array($conf['dataArray.'])) { // dataArray is supplied $sKeyArray = t3lib_TStemplate::sortedKeyList($conf['dataArray.'], TRUE); - foreach($sKeyArray as $theKey) { + foreach ($sKeyArray as $theKey) { $dAA = $conf['dataArray.'][$theKey.'.']; if (is_array($dAA)) { $temp=array(); @@ -1663,7 +1663,7 @@ class tslib_cObj { $prefix = $formname; } - foreach($dataArr as $val) { + foreach ($dataArr as $val) { $cc++; $confData=Array(); @@ -1717,7 +1717,7 @@ class tslib_cObj { if (is_array($conf['params.']) && isset($conf['params.'][$confData['type']])) { $addParams=trim($conf['params.'][$confData['type']]); } - if (strcmp('',$addParams)) $addParams=' '.$addParams; + if (strcmp('',$addParams)) { $addParams=' '.$addParams; } } else $addParams=''; if ($conf['dontMd5FieldNames']) { @@ -1734,7 +1734,7 @@ class tslib_cObj { } // Create form field based on configuration/type: - switch($confData['type']) { + switch ($confData['type']) { case 'textarea': $cols=trim($fParts[1]) ? intval($fParts[1]) : 20; $compWidth = doubleval($conf['compensateFieldWidth'] ? $conf['compensateFieldWidth'] : $GLOBALS['TSFE']->compensateFieldWidth); @@ -1869,13 +1869,13 @@ class tslib_cObj { break; case 'hidden': $value = trim($parts[2]); - if(strlen($value) && t3lib_div::inList('recipient_copy,recipient',$confData['fieldname']) && $GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']) { + if (strlen($value) && t3lib_div::inList('recipient_copy,recipient',$confData['fieldname']) && $GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']) { break; } if (strlen($value) && t3lib_div::inList('recipient_copy,recipient',$confData['fieldname'])) { $value = $GLOBALS['TSFE']->codeString($value); } - $hiddenfields.=sprintf('<input type="hidden" name="%s"%s value="%s" />', + $hiddenfields.= sprintf('<input type="hidden" name="%s"%s value="%s" />', $confData['fieldname'], $elementIdAttribute, htmlspecialchars($value)); break; case 'property': @@ -1927,7 +1927,7 @@ class tslib_cObj { } // Adding evaluation based on settings: - switch((string)$modeParameters[0]) { + switch ((string)$modeParameters[0]) { case 'EREG': $fieldlist[] = '_EREG'; $fieldlist[] = rawurlencode($modeParameters[1]); @@ -1989,7 +1989,7 @@ class tslib_cObj { } } } - if ($conf['stdWrap.']) $content=$this->stdWrap($content, $conf['stdWrap.']); + if ($conf['stdWrap.']) { $content = $this->stdWrap($content, $conf['stdWrap.']); } // redirect (external: where to go afterwards. internal: where to submit to) @@ -1997,10 +1997,10 @@ class tslib_cObj { $page = $GLOBALS['TSFE']->page; if (!$theRedirect) { // Internal: Just submit to current page $LD = $GLOBALS['TSFE']->tmpl->linkData($page, $conf['target'], $conf['no_cache'],'index.php', '', $this->getClosestMPvalueForPage($page['uid'])); - } elseif (t3lib_div::testInt($theRedirect)) { // Internal: Submit to page with id $theRedirect + } elseif (t3lib_div::testInt($theRedirect)) { // Internal: Submit to page with ID $theRedirect $page = $GLOBALS['TSFE']->sys_page->getPage_noCheck($theRedirect); $LD = $GLOBALS['TSFE']->tmpl->linkData($page, $conf['target'], $conf['no_cache'],'index.php', '', $this->getClosestMPvalueForPage($page['uid'])); - } else { // External url, redirect-hidden field is rendered! + } else { // External URL, redirect-hidden field is rendered! $LD = $GLOBALS['TSFE']->tmpl->linkData($page, $conf['target'], $conf['no_cache'],'', '', $this->getClosestMPvalueForPage($page['uid'])); $LD['totalURL'] = $theRedirect; $hiddenfields.= '<input type="hidden" name="redirect" value="'.htmlspecialchars($LD['totalURL']).'" />'; // 18-09-00 added @@ -2012,13 +2012,13 @@ class tslib_cObj { $page = $GLOBALS['TSFE']->sys_page->getPage_noCheck($formtype); $LD_A = $GLOBALS['TSFE']->tmpl->linkData($page, $conf['target'], $conf['no_cache'], '', '', $this->getClosestMPvalueForPage($page['uid'])); $action = $LD_A['totalURL']; - } elseif ($formtype){ // Submit to external script + } elseif ($formtype) { // Submit to external script $LD_A = $LD; $action = $formtype; - } elseif (t3lib_div::testInt($theRedirect)) { + } elseif (t3lib_div::testInt($theRedirect)) { $LD_A = $LD; $action = $LD_A['totalURL']; - } else { // Submit to 'nothing' - which is current page + } else { // Submit to "nothing" - which is current page $LD_A = $GLOBALS['TSFE']->tmpl->linkData($GLOBALS['TSFE']->page, $conf['target'], $conf['no_cache'], '', '', $this->getClosestMPvalueForPage($page['uid'])); $action = $LD_A['totalURL']; } @@ -2027,7 +2027,7 @@ class tslib_cObj { $theEmail = $this->stdWrap($conf['recipient'], $conf['recipient.']); if ($theEmail && !$GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']) { $theEmail = $GLOBALS['TSFE']->codeString($theEmail); - $hiddenfields.='<input type="hidden" name="recipient" value="'.htmlspecialchars($theEmail).'" />'; + $hiddenfields.= '<input type="hidden" name="recipient" value="'.htmlspecialchars($theEmail).'" />'; } // location data: @@ -2043,16 +2043,16 @@ class tslib_cObj { // hidden fields: if (is_array($conf['hiddenFields.'])) { reset($conf['hiddenFields.']); - while(list($hF_key,$hF_conf) = each($conf['hiddenFields.'])) { + while (list($hF_key,$hF_conf) = each($conf['hiddenFields.'])) { if (substr($hF_key,-1)!='.') { $hF_value = $this->cObjGetSingle($hF_conf,$conf['hiddenFields.'][$hF_key.'.'],'hiddenfields'); if (strlen($hF_value) && t3lib_div::inList('recipient_copy,recipient',$hF_key)) { - if($GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']) { + if ($GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']) { continue; } $hF_value = $GLOBALS['TSFE']->codeString($hF_value); } - $hiddenfields.='<input type="hidden" name="'.$hF_key.'" value="'.htmlspecialchars($hF_value).'" />'; + $hiddenfields.= '<input type="hidden" name="'.$hF_key.'" value="'.htmlspecialchars($hF_value).'" />'; } } } @@ -2067,7 +2067,7 @@ class tslib_cObj { // Create form tag: $theTarget = ($theRedirect?$LD['target']:$LD_A['target']); - $content = Array( + $content = array( '<form'. ' action="'.htmlspecialchars($action).'"'. ' id="'.$formname.'"'.($xhtmlStrict ? '' : ' name="'.$formname.'"'). @@ -5213,14 +5213,14 @@ class tslib_cObj { // This checks if the linked id is in the rootline of this site and if not it will find the domain for that ID and prefix it: $tCR_rootline = $GLOBALS['TSFE']->sys_page->getRootLine($page['uid']); // Gets rootline of linked-to page $tCR_flag = 0; - foreach($tCR_rootline as $tCR_data) { + foreach ($tCR_rootline as $tCR_data) { if ($tCR_data['uid']==$GLOBALS['TSFE']->tmpl->rootLine[0]['uid']) { $tCR_flag = 1; // OK, it was in rootline! break; } } if (!$tCR_flag) { - foreach($tCR_rootline as $tCR_data) { + foreach ($tCR_rootline as $tCR_data) { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_domain', 'pid='.intval($tCR_data['uid']).' AND redirectTo=\'\''.$this->enableFields('sys_domain'), '', 'sorting'); if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { $tCR_domain = preg_replace('/\/$/','',$row['domainName']); diff --git a/typo3/sysext/cms/tslib/class.tslib_fe.php b/typo3/sysext/cms/tslib/class.tslib_fe.php index 745f0fc244db7e99b9d7c390adea1d957f93bcc6..d8f650e6d21c6c9134b17e8445d7813934d925ba 100755 --- a/typo3/sysext/cms/tslib/class.tslib_fe.php +++ b/typo3/sysext/cms/tslib/class.tslib_fe.php @@ -939,7 +939,7 @@ } } - // spacer is not accessible in frontend + // Spacer is not accessible in frontend if ($this->page['doktype'] == 199) { if ($this->TYPO3_CONF_VARS['FE']['pageNotFound_handling']) { $this->pageNotFoundAndExit('The requested page does not exist!'); @@ -1784,7 +1784,7 @@ $this->setSimulReplacementChar(); } - // set default values for removeDefaultJS and inlineStyle2TempFile so CSS and JS are externalized if compatversion is higher than 4.0 + // Set default values for removeDefaultJS and inlineStyle2TempFile so CSS and JS are externalized if compatversion is higher than 4.0 if (!isset($this->config['config']['removeDefaultJS']) && t3lib_div::compat_version('4.0')) { $this->config['config']['removeDefaultJS'] = 'external'; } @@ -2129,7 +2129,7 @@ /** * Checks if any email-submissions or submission via the fe_tce * - * @return string 'email' if a formmail has been sent, 'fe_tce' if front-end data submission (like forums, guestbooks) is sent. '' if none. + * @return string "email" if a formmail has been sent, "fe_tce" if front-end data submission (like forums, guestbooks) is sent. "" if none. */ function checkDataSubmission() { $ret = ''; @@ -2207,10 +2207,10 @@ $integrityCheck = $this->TYPO3_CONF_VARS['FE']['strictFormmail']; - if(!$this->TYPO3_CONF_VARS['FE']['secureFormmail']) { + if (!$this->TYPO3_CONF_VARS['FE']['secureFormmail']) { // Check recipient field: $encodedFields = explode(',','recipient,recipient_copy'); // These two fields are the ones which contain recipient addresses that can be misused to send mail from foreign servers. - foreach($encodedFields as $fieldKey) { + foreach ($encodedFields as $fieldKey) { if (strlen($EMAIL_VARS[$fieldKey])) { if ($res = $this->codeString($EMAIL_VARS[$fieldKey], TRUE)) { // Decode... $EMAIL_VARS[$fieldKey] = $res; // Set value if OK @@ -2305,9 +2305,9 @@ if (@is_file($this->jumpurl)) { $mimeType = t3lib_div::_GP('mimeType'); $mimeType = $mimeType ? $mimeType : 'application/octet-stream'; - Header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - Header('Content-Type: '.$mimeType); - Header('Content-Disposition: attachment; filename='.basename($this->jumpurl)); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Content-Type: '.$mimeType); + header('Content-Disposition: attachment; filename='.basename($this->jumpurl)); readfile($this->jumpurl); exit; } else die('jumpurl Secure: "'.$this->jumpurl.'" was not a valid file!'); @@ -2318,9 +2318,9 @@ if ($TSConf['TSFE.']['jumpUrl_transferSession']) { $uParts = parse_url($this->jumpurl); $params = '&FE_SESSION_KEY='.rawurlencode($this->fe_user->id.'-'.md5($this->fe_user->id.'/'.$this->TYPO3_CONF_VARS['SYS']['encryptionKey'])); - $this->jumpurl.=($uParts['query']?'':'?').$params; // Add the session parameter ... + $this->jumpurl.= ($uParts['query']?'':'?').$params; // Add the session parameter ... } - Header('Location: '.$this->jumpurl); + header('Location: '.$this->jumpurl); exit; } } @@ -3241,9 +3241,9 @@ if (version == "n3") { $label = !$this->beUserLogin ? $this->config['config']['beLoginLinkIPList_login'] : $this->config['config']['beLoginLinkIPList_logout']; if ($label) { if (!$this->beUserLogin) { - $link = '<a href="'.htmlspecialchars(TYPO3_mainDir.'index.php?redirect_url='.rawurlencode(t3lib_div::getIndpEnv("REQUEST_URI"))).'">'.$label.'</a>'; + $link = '<a href="'.htmlspecialchars(TYPO3_mainDir.'index.php?redirect_url='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.$label.'</a>'; } else { - $link = '<a href="'.htmlspecialchars(TYPO3_mainDir.'index.php?L=OUT&redirect_url='.rawurlencode(t3lib_div::getIndpEnv("REQUEST_URI"))).'">'.$label.'</a>'; + $link = '<a href="'.htmlspecialchars(TYPO3_mainDir.'index.php?L=OUT&redirect_url='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.$label.'</a>'; } return $link; } @@ -3302,7 +3302,7 @@ if (version == "n3") { * @return string The body of the filename. * @see getSimulFileName(), t3lib_tstemplate::linkData(), tslib_frameset::frameParams() */ - function makeSimulFileName($inTitle,$page,$type,$addParams='',$no_cache='') { + function makeSimulFileName($inTitle,$page,$type,$addParams='',$no_cache=false) { $titleChars = intval($this->config['config']['simulateStaticDocuments_addTitle']); // Default value is 30 but values > 1 will be override this if($titleChars==1) { $titleChars = 30; } @@ -3490,7 +3490,7 @@ if (version == "n3") { */ function codeString($string, $decode=FALSE) { - if ($decode) { + if ($decode) { list($md5Hash, $str) = explode(':',$string,2); $newHash = substr(md5($this->TYPO3_CONF_VARS['SYS']['encryptionKey'].':'.$str),0,10); if (!strcmp($md5Hash, $newHash)) { diff --git a/typo3/sysext/indexed_search/class.crawler.php b/typo3/sysext/indexed_search/class.crawler.php index 54341d8d1233789c04c1add3d1469b531eb26dac..5705a475e92fafdc026a07c2a77a87b2a38b6928 100755 --- a/typo3/sysext/indexed_search/class.crawler.php +++ b/typo3/sysext/indexed_search/class.crawler.php @@ -618,7 +618,7 @@ class tx_indexedsearch_crawler { $list = $indexerObj->extractHyperLinks($indexerObj->indexExternalUrl_content); // Traverse links: - foreach($list as $count => $linkInfo) { + foreach ($list as $count => $linkInfo) { // Decode entities: $subUrl = t3lib_div::htmlspecialchars_decode($linkInfo['href']);