Project

General

Profile

Bug #21143 » 12066-v5-use-in-core.diff

Administrator Admin, 2010-04-06 15:19

View differences:

typo3/classes/class.backendsearchmenu.php (working copy)
$searchMenu[] = '<input type="text" id="search-query" name="search-query" value="" />';
$searchMenu[] = '</div>';
return implode("\n", $searchMenu);
return implode(LF, $searchMenu);
}
/**
typo3/classes/class.modulemenu.php (working copy)
$menu .= $this->renderSubModules($moduleData['subitems'], $menuState);
}
$menu .= '</li>' . "\n";
$menu .= '</li>' . LF;
}
}
return ($wrapInUl ? '<ul id="typo3-menu">' . "\n".$menu.'</ul>' . "\n" : $menu);
return ($wrapInUl ? '<ul id="typo3-menu">' . LF.$menu.'</ul>' . LF : $menu);
}
/**
......
.'</a>';
}
$moduleMenu .= '<li id="modmenu_' . $moduleData['name'] . '">' . $submoduleLink . '</li>' . "\n";
$moduleMenu .= '<li id="modmenu_' . $moduleData['name'] . '">' . $submoduleLink . '</li>' . LF;
}
return '<ul'.($menuState ? ' style="display:none;"' : '').'>'."\n".$moduleMenu.'</ul>'."\n";
return '<ul'.($menuState ? ' style="display:none;"' : '').'>'.LF.$moduleMenu.'</ul>'.LF;
}
/**
......
var modScriptURL = "";
switch(modName) {'
."\n".implode("\n", $moduleJavascriptCommands)."\n".'
.LF.implode(LF, $moduleJavascriptCommands).LF.'
}
';
typo3/classes/class.clearcachemenu.php (working copy)
$cacheMenu[] = '</ul>';
return implode("\n", $cacheMenu);
return implode(LF, $cacheMenu);
}
/**
typo3/classes/class.shortcutmenu.php (working copy)
$shortcutMenu[] = $this->renderMenu();
$shortcutMenu[] = '</div>';
return implode("\n", $shortcutMenu);
return implode(LF, $shortcutMenu);
}
/**
......
$shortcutMenu[] = '</table>';
$compiledShortcutMenu = implode("\n", $shortcutMenu);
$compiledShortcutMenu = implode(LF, $shortcutMenu);
return $compiledShortcutMenu;
}
typo3/classes/class.workspaceselector.php (working copy)
$workspaceMenu[] = '</ul>';
return implode("\n", $workspaceMenu);
return implode(LF, $workspaceMenu);
}
/**
typo3/alt_topmenu_dummy.php (working copy)
<tr>';
foreach ($contentArray as $key=>$menucontent) {
$this->content .= implode(chr(10), $menucontent);
$this->content .= implode(LF, $menucontent);
}
$this->content.='
typo3/wizard_forms.php (working copy)
// Default:
if ($vv['type']=='select' || $vv['type']=='radio') {
$thisLine[2]=str_replace(chr(10),', ',str_replace(',','',$vv['options']));
$thisLine[2]=str_replace(LF,', ',str_replace(',','',$vv['options']));
} elseif ($vv['type']=='check') {
if ($vv['default']) $thisLine[2]=1;
} elseif (strcmp(trim($vv['default']),'')) {
......
}
}
// Finally, implode the lines into a string, and return it:
return implode(chr(10),$inLines);
return implode(LF,$inLines);
}
/**
......
function cfgString2CfgArray($cfgStr) {
// Traverse the number of form elements:
$tLines=explode(chr(10),$cfgStr);
$tLines=explode(LF,$cfgStr);
foreach($tLines as $k => $v) {
// Initialize:
......
switch((string)$confData['type']) {
case 'select':
case 'radio':
$confData['default'] = implode(chr(10),t3lib_div::trimExplode(',',$parts[2]));
$confData['default'] = implode(LF,t3lib_div::trimExplode(',',$parts[2]));
break;
default:
$confData['default'] = trim($parts[2]);
typo3/wizard_tsconfig.php (working copy)
foreach($table['rows'] as $row) {
// Linking:
$lP=t3lib_div::trimExplode(chr(10),$row['property'],1);
$lP=t3lib_div::trimExplode(LF,$row['property'],1);
$lP2=array();
while(list($k,$lStr)=each($lP)) {
$lP2[$k] = $this->linkProperty($lStr,$lStr,$objString,$row['datatype']);
typo3/alt_doc.php (working copy)
if (is_array($this->tceforms->extraFormHeaders)) {
$extraTemplate = t3lib_parsehtml::getSubpart($this->doc->moduleTemplate, '###DOCHEADER_EXTRAHEADER###');
$extraTemplate = t3lib_parsehtml::substituteMarker($extraTemplate, '###EXTRAHEADER###', implode(chr(10), $this->tceforms->extraFormHeaders));
$extraTemplate = t3lib_parsehtml::substituteMarker($extraTemplate, '###EXTRAHEADER###', implode(LF, $this->tceforms->extraFormHeaders));
}
return $extraTemplate;
}
......
if (count($this->tceforms->commentMessages)) {
$tceformMessages = '
<!-- TCEFORM messages
'.htmlspecialchars(implode(chr(10),$this->tceforms->commentMessages)).'
'.htmlspecialchars(implode(LF,$this->tceforms->commentMessages)).'
-->
';
}
typo3/template.php (working copy)
if ($this->docType !== 'html_3') {
// Put the XML prologue before or after the doctype declaration according to browser
if ($browserInfo['browser'] === 'msie' && $browserInfo['version'] < 7) {
$headerStart = $headerStart . chr(10) . $xmlPrologue;
$headerStart = $headerStart . LF . $xmlPrologue;
} else {
$headerStart = $xmlPrologue . chr(10) . $headerStart;
$headerStart = $xmlPrologue . LF . $headerStart;
}
// Add the xml stylesheet according to doctype
if ($this->docType !== 'xhtml_frames') {
$headerStart = $headerStart . chr(10) . $xmlStylesheet;
$headerStart = $headerStart . LF . $xmlStylesheet;
}
}
$this->pageRenderer->setXmlPrologAndDocType($headerStart);
$this->pageRenderer->setHeadTag('<head>' . chr(10). '<!-- TYPO3 Script ID: '.htmlspecialchars($this->scriptID).' -->');
$this->pageRenderer->setHeadTag('<head>' . LF. '<!-- TYPO3 Script ID: '.htmlspecialchars($this->scriptID).' -->');
$this->pageRenderer->setCharSet($this->charset);
$this->pageRenderer->addMetaTag($this->generator());
$this->pageRenderer->addMetaTag($this->xUaCompatible());
......
$this->inDocStylesArray[] = $this->inDocStyles_TBEstyle;
// Implode it all:
$inDocStyles = implode(chr(10), $this->inDocStylesArray);
$inDocStyles = implode(LF, $this->inDocStylesArray);
if ($this->styleSheetFile) {
$this->pageRenderer->addCssFile($this->backPath . $this->styleSheetFile);
......
$this->pageRenderer->addCssFile($this->backPath . $this->styleSheetFile2);
}
$this->pageRenderer->addCssInlineBlock('inDocStyles', $inDocStyles . chr(10) . '/*###POSTCSSMARKER###*/');
$this->pageRenderer->addCssInlineBlock('inDocStyles', $inDocStyles . LF . '/*###POSTCSSMARKER###*/');
if ($this->styleSheetFile_post) {
$this->pageRenderer->addCssFile($this->backPath . $this->styleSheetFile_post);
}
......
function insertStylesAndJS($content) {
// insert accumulated CSS
$this->inDocStylesArray[] = $this->inDocStyles;
$styles = "\n".implode("\n", $this->inDocStylesArray);
$styles = LF.implode(LF, $this->inDocStylesArray);
$content = str_replace('/*###POSTCSSMARKER###*/',$styles,$content);
// insert accumulated JS
$jscode = $this->JScode."\n".$this->wrapScriptTags(implode("\n", $this->JScodeArray));
$jscode = $this->JScode.LF.$this->wrapScriptTags(implode(LF, $this->JScodeArray));
$content = str_replace('<!--###POSTJSMARKER###-->',$jscode,$content);
return $content;
......
function wrapScriptTags($string, $linebreak=TRUE) {
if(trim($string)) {
// <script wrapped in nl?
$cr = $linebreak? "\n" : '';
$cr = $linebreak? LF : '';
// remove nl from the beginning
$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],"\t", $string);
$string = str_replace($match[1],TAB, $string);
}
$string = $cr.'<script type="text/javascript">
/*<![CDATA[*/
......
}
}
// replace the marker with the template and remove all line breaks (for IE compat)
$markers['BUTTONLIST_' . strtoupper($key)] = str_replace("\n", '', $buttonTemplate);
$markers['BUTTONLIST_' . strtoupper($key)] = str_replace(LF, '', $buttonTemplate);
}
// Hook for manipulating docHeaderButtons
typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php (working copy)
if (!strcmp($content,'')) return '';
// Split into single lines:
$lines = t3lib_div::trimExplode(chr(10),$content);
$lines = t3lib_div::trimExplode(LF,$content);
foreach($lines as &$val) {
$val = '<li>'.$this->cObj->stdWrap($val,$conf['innerStdWrap.']).'</li>';
}
......
$headerIdPrefix = $headerScope.$this->cObj->data['uid'].'-';
// Split into single lines (will become table-rows):
$rows = t3lib_div::trimExplode(chr(10),$content);
$rows = t3lib_div::trimExplode(LF,$content);
reset($rows);
// Find number of columns to render:
......
if (count($fileArray)) {
// Get the descriptions for the files (if any):
$descriptions = t3lib_div::trimExplode(chr(10),$this->cObj->data['imagecaption']);
$descriptions = t3lib_div::trimExplode(LF,$this->cObj->data['imagecaption']);
// Adding hardcoded TS to linkProc configuration:
$conf['linkProc.']['path.']['current'] = 1;
typo3/sysext/setup/mod/index.php (working copy)
if ($config['itemsProcFunc']) {
$html = t3lib_div::callUserFunction($config['itemsProcFunc'], $config, $this, '');
} else {
$html = '<select id="field_' . $fieldName . '" name="data[' . $fieldName . ']"' . $more . '>' . chr(10);
$html = '<select id="field_' . $fieldName . '" name="data[' . $fieldName . ']"' . $more . '>' . LF;
foreach ($config['items'] as $key => $optionLabel) {
$html .= '<option value="' . $key . '"' .
($value == $key ? ' selected="selected"' : '') .
'>' . $this->getLabel($optionLabel, '', false) . '</option>' . chr(10);
'>' . $this->getLabel($optionLabel, '', false) . '</option>' . LF;
}
$html .= '</select>';
}
......
// compile the languages dropdown
$languageOptions = array(
'000000000' => chr(10) . '<option value="">' . $GLOBALS['LANG']->getLL('lang_default', 1) . '</option>'
'000000000' => LF . '<option value="">' . $GLOBALS['LANG']->getLL('lang_default', 1) . '</option>'
);
// traverse the number of languages
$theLanguages = t3lib_div::trimExplode('|', TYPO3_languages);
typo3/sysext/indexed_search/class.crawler.php (working copy)
*/
function checkDeniedSuburls($url, $url_deny) {
if (trim($url_deny)) {
$url_denyArray = t3lib_div::trimExplode(chr(10),$url_deny,1);
$url_denyArray = t3lib_div::trimExplode(LF,$url_deny,1);
foreach($url_denyArray as $testurl) {
if (t3lib_div::isFirstPartOfStr($url,$testurl)) {
echo $url.' /// '.$url_deny.chr(10);
echo $url.' /// '.$url_deny.LF;
return TRUE;
}
}
typo3/sysext/indexed_search/class.external_parser.php (working copy)
if ($this->app['catdoc']) {
$cmd = $this->app['catdoc'] . ' -d utf-8 ' . escapeshellarg($absFile);
exec($cmd,$res);
$content = implode(chr(10),$res);
$content = implode(LF,$res);
unset($res);
$contentArr = $this->pObj->splitRegularContent($this->removeEndJunk($content));
}
......
if ($this->app['ppthtml']) {
$cmd = $this->app['ppthtml'] . ' ' . escapeshellarg($absFile);
exec($cmd,$res);
$content = implode(chr(10),$res);
$content = implode(LF,$res);
unset($res);
$content = $this->pObj->convertHTMLToUtf8($content);
$contentArr = $this->pObj->splitHTMLContent($this->removeEndJunk($content));
......
if ($this->app['xlhtml']) {
$cmd = $this->app['xlhtml'] . ' -nc -te ' . escapeshellarg($absFile);
exec($cmd,$res);
$content = implode(chr(10),$res);
$content = implode(LF,$res);
unset($res);
$content = $this->pObj->convertHTMLToUtf8($content);
$contentArr = $this->pObj->splitHTMLContent($this->removeEndJunk($content));
......
// Read content.xml:
$cmd = $this->app['unzip'] . ' -p ' . escapeshellarg($absFile) . ' content.xml';
exec($cmd,$res);
$content_xml = implode(chr(10),$res);
$content_xml = implode(LF,$res);
unset($res);
// Read meta.xml:
$cmd = $this->app['unzip'] . ' -p ' . escapeshellarg($absFile) . ' meta.xml';
exec($cmd, $res);
$meta_xml = implode(chr(10),$res);
$meta_xml = implode(LF,$res);
unset($res);
$utf8_content = trim(strip_tags(str_replace('<',' <',$content_xml)));
......
if ($this->app['unrtf']) {
$cmd = $this->app['unrtf'] . ' ' . escapeshellarg($absFile);
exec($cmd,$res);
$fileContent = implode(chr(10),$res);
$fileContent = implode(LF,$res);
unset($res);
$fileContent = $this->pObj->convertHTMLToUtf8($fileContent);
$contentArr = $this->pObj->splitHTMLContent($fileContent);
......
* @return string String
*/
function removeEndJunk($string) {
return trim(preg_replace('/['.chr(10).chr(12).']*$/','',$string));
return trim(preg_replace('/['.LF.chr(12).']*$/','',$string));
}
typo3/sysext/indexed_search/class.indexer.php (working copy)
if (strlen($content)) {
// Compile headers:
$headers = t3lib_div::trimExplode(chr(10),$content,1);
$headers = t3lib_div::trimExplode(LF,$content,1);
$retVal = array();
foreach($headers as $line) {
if (!strlen(trim($line))) {
......
if ($maxL) {
// Takes the quadruple lenght first, because whitespace and entities may be removed and thus shorten the string more yet.
# $bodyDescription = implode(' ',split('[[:space:],]+',substr(trim($contentArr['body']),0,$maxL*4)));
$bodyDescription = str_replace(array(' ',"\t","\r","\n"),' ',$contentArr['body']);
$bodyDescription = str_replace(array(' ',TAB,CR,LF),' ',$contentArr['body']);
// Shorten the string:
$bodyDescription = $this->csObj->strtrunc('utf-8', $bodyDescription, $maxL);
typo3/sysext/scheduler/examples/class.tx_scheduler_testtask.php (working copy)
$multiple = $exec->getMultiple();
$cronCmd = $exec->getCronCmd();
$mailBody =
'SCHEDULER TEST-TASK' . chr(10)
. '- - - - - - - - - - - - - - - -' . chr(10)
. 'UID: ' . $this->taskUid . chr(10)
. 'Sitename: ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . chr(10)
. 'Site: ' . $site . chr(10)
. 'Called by: ' . $calledBy . chr(10)
. 'tstamp: ' . date('Y-m-d H:i:s') . ' [' . time() . ']' . chr(10)
. 'maxLifetime: ' . $this->scheduler->extConf['maxLifetime'] . chr(10)
. 'start: ' . date('Y-m-d H:i:s', $start) . ' [' . $start . ']' . chr(10)
. 'end: ' . ((empty($end)) ? '-' : (date('Y-m-d H:i:s', $end) . ' [' . $end . ']')) . chr(10)
. 'interval: ' . $interval . chr(10)
. 'multiple: ' . ($multiple ? 'yes' : 'no') . chr(10)
'SCHEDULER TEST-TASK' . LF
. '- - - - - - - - - - - - - - - -' . LF
. 'UID: ' . $this->taskUid . LF
. 'Sitename: ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . LF
. 'Site: ' . $site . LF
. 'Called by: ' . $calledBy . LF
. 'tstamp: ' . date('Y-m-d H:i:s') . ' [' . time() . ']' . LF
. 'maxLifetime: ' . $this->scheduler->extConf['maxLifetime'] . LF
. 'start: ' . date('Y-m-d H:i:s', $start) . ' [' . $start . ']' . LF
. 'end: ' . ((empty($end)) ? '-' : (date('Y-m-d H:i:s', $end) . ' [' . $end . ']')) . LF
. 'interval: ' . $interval . LF
. 'multiple: ' . ($multiple ? 'yes' : 'no') . LF
. 'cronCmd: ' . ($cronCmd ? $cronCmd : 'not used');
// Prepare mailer and send the mail
typo3/sysext/tstemplate_analyzer/class.tx_tstemplateanalyzer.php (working copy)
';
$tmpl->ext_lineNumberOffset = -2; // Don't know why -2 and not 0... :-) But works.
$tmpl->ext_lineNumberOffset_mode = "const";
$tmpl->ext_lineNumberOffset += count(explode(chr(10), t3lib_TSparser::checkIncludeLines("" . $GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_constants"]))) + 1;
$tmpl->ext_lineNumberOffset += count(explode(LF, t3lib_TSparser::checkIncludeLines("" . $GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_constants"]))) + 1;
reset($tmpl->clearList_const);
foreach ($tmpl->constants as $key => $val) {
......
break;
}
}
$tmpl->ext_lineNumberOffset += count(explode(chr(10), $val)) + 1;
$tmpl->ext_lineNumberOffset += count(explode(LF, $val)) + 1;
next($tmpl->clearList_const);
}
$theOutput .= '
......
';
$tmpl->ext_lineNumberOffset = 0;
$tmpl->ext_lineNumberOffset_mode = "setup";
$tmpl->ext_lineNumberOffset += count(explode(chr(10), t3lib_TSparser::checkIncludeLines("" . $GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_setup"]))) + 1;
$tmpl->ext_lineNumberOffset += count(explode(LF, t3lib_TSparser::checkIncludeLines("" . $GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_setup"]))) + 1;
reset($tmpl->clearList_setup);
foreach ($tmpl->config as $key => $val) {
......
break;
}
}
$tmpl->ext_lineNumberOffset += count(explode(chr(10), $val)) + 1;
$tmpl->ext_lineNumberOffset += count(explode(LF, $val)) + 1;
next($tmpl->clearList_setup);
}
$theOutput .= '
typo3/sysext/cms/layout/db_layout.php (working copy)
if (count($tceforms->commentMessages)) {
$content.='
<!-- TCEFORM messages
'.htmlspecialchars(implode(chr(10),$tceforms->commentMessages)).'
'.htmlspecialchars(implode(LF,$tceforms->commentMessages)).'
-->
';
}
typo3/sysext/cms/layout/class.tx_cms_layout.php (working copy)
*/
function infoGif($infoArr) {
if (count($infoArr) && $this->tt_contentConfig['showInfo']) {
$out='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom2.gif','width="12" height="12"').' title="'.htmlspecialchars(implode(chr(10),$infoArr)).'" alt="" /> ';
$out='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom2.gif','width="12" height="12"').' title="'.htmlspecialchars(implode(LF,$infoArr)).'" alt="" /> ';
return $out;
}
}
......
* @return string Processed output.
*/
function wordWrapper($content,$max=50,$char=' -') {
$array = preg_split('/[ ' . chr(10) . ']/', $content);
$array = preg_split('/[ ' . LF . ']/', $content);
foreach($array as $val) {
if (strlen($val)>$max) {
$content=str_replace($val,substr(chunk_split($val,$max,$char),0,-1),$content);
......
if($fillEmptyContent && strstr($content, '><')) {
$content = preg_replace('/(<[^ >]* )([^ >]*)([^>]*>)(<\/[^>]*>)/', '$1$2$3$2$4', $content);
}
$content = preg_replace('/<br.?\/?>/', chr(10), $content);
$content = preg_replace('/<br.?\/?>/', LF, $content);
return strip_tags($content);
}
typo3/sysext/cms/tslib/class.tslib_adminpanel.php (working copy)
<input type="hidden" name="TSFE_ADMIN_PANEL[display_top]" value="' . $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_top'] . '" />' . ($this->extNeedUpdate ? '<input type="submit" value="' . $this->extGetLL('update') . '" />' : '') . '</td>
</tr>';
$query = !t3lib_div::_GET('id') ? ('<input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />' . chr(10)) : '';
$query = !t3lib_div::_GET('id') ? ('<input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />' . LF) : '';
// the dummy field is needed for Firefox: to force a page reload on submit with must change the form value with JavaScript (see "onsubmit" attribute of the "form" element")
$query .= '<input type="hidden" name="TSFE_ADMIN_PANEL[DUMMY]" value="">';
foreach (t3lib_div::_GET() as $key => $value) {
......
if (is_array($value)) {
$query .= $this->getHiddenFields($key, $value);
} else {
$query .= '<input type="hidden" name="' . $key . '" value="' . htmlspecialchars($value) . '">' . chr(10);
$query .= '<input type="hidden" name="' . $key . '" value="' . htmlspecialchars($value) . '">' . LF;
}
}
}
......
if (is_array($v)) {
$out .= $this->getHiddenFields($key . '[' . $k . ']', $v);
} else {
$out .= '<input type="hidden" name="' . $key . '[' . $k . ']" value="' . htmlspecialchars($v) . '">' . chr(10);
$out .= '<input type="hidden" name="' . $key . '[' . $k . ']" value="' . htmlspecialchars($v) . '">' . LF;
}
}
return $out;
typo3/sysext/cms/tslib/class.tslib_pibase.php (working copy)
$links[]=$this->cObj->wrap($this->pi_getLL('pi_list_browseresults_last','Last >>',$hscText),$wrapper['disabledLinkWrap']);
}
}
$theLinks = $this->cObj->wrap(implode(chr(10),$links),$wrapper['browseLinksWrap']);
$theLinks = $this->cObj->wrap(implode(LF,$links),$wrapper['browseLinksWrap']);
} else {
$theLinks = '';
}
......
// TypoScript property .recursive is a int+ which determines how many levels down from the pids in the pid-list subpages should be included in the select.
$pidList = $this->pi_getPidList($this->conf['pidList'],$this->conf['recursive']);
if (is_array($mm_cat)) {
$query='FROM '.$table.','.$mm_cat['table'].','.$mm_cat['mmtable'].chr(10).
' WHERE '.$table.'.uid='.$mm_cat['mmtable'].'.uid_local AND '.$mm_cat['table'].'.uid='.$mm_cat['mmtable'].'.uid_foreign '.chr(10).
(strcmp($mm_cat['catUidList'],'')?' AND '.$mm_cat['table'].'.uid IN ('.$mm_cat['catUidList'].')':'').chr(10).
' AND '.$table.'.pid IN ('.$pidList.')'.chr(10).
$this->cObj->enableFields($table).chr(10); // This adds WHERE-clauses that ensures deleted, hidden, starttime/endtime/access records are NOT selected, if they should not! Almost ALWAYS add this to your queries!
$query='FROM '.$table.','.$mm_cat['table'].','.$mm_cat['mmtable'].LF.
' WHERE '.$table.'.uid='.$mm_cat['mmtable'].'.uid_local AND '.$mm_cat['table'].'.uid='.$mm_cat['mmtable'].'.uid_foreign '.LF.
(strcmp($mm_cat['catUidList'],'')?' AND '.$mm_cat['table'].'.uid IN ('.$mm_cat['catUidList'].')':'').LF.
' AND '.$table.'.pid IN ('.$pidList.')'.LF.
$this->cObj->enableFields($table).LF; // This adds WHERE-clauses that ensures deleted, hidden, starttime/endtime/access records are NOT selected, if they should not! Almost ALWAYS add this to your queries!
} else {
$query='FROM '.$table.' WHERE pid IN ('.$pidList.')'.chr(10).
$this->cObj->enableFields($table).chr(10); // This adds WHERE-clauses that ensures deleted, hidden, starttime/endtime/access records are NOT selected, if they should not! Almost ALWAYS add this to your queries!
$query='FROM '.$table.' WHERE pid IN ('.$pidList.')'.LF.
$this->cObj->enableFields($table).LF; // This adds WHERE-clauses that ensures deleted, hidden, starttime/endtime/access records are NOT selected, if they should not! Almost ALWAYS add this to your queries!
}
}
......
$WHERE = trim($WHERE);
// Add '$addWhere'
if ($addWhere) {$WHERE.=' '.$addWhere.chr(10);}
if ($addWhere) {$WHERE.=' '.$addWhere.LF;}
// Search word:
if ($this->piVars['sword'] && $this->internal['searchFieldList']) {
$WHERE.=$this->cObj->searchWhere($this->piVars['sword'],$this->internal['searchFieldList'],$table).chr(10);
$WHERE.=$this->cObj->searchWhere($this->piVars['sword'],$this->internal['searchFieldList'],$table).LF;
}
if ($count) {
typo3/sysext/cms/tslib/class.tslib_fe.php (working copy)
if ($reason == '') {
$reason = 'Page cannot be found.';
}
$reason.= chr(10) . chr(10) . 'Additionally, ' . $code . ' was not found while trying to retrieve the error document.';
$reason.= LF . LF . 'Additionally, ' . $code . ' was not found while trying to retrieve the error document.';
$this->printError('Reason: '.nl2br(htmlspecialchars($reason)));
exit();
}
......
$res = t3lib_div::getURL($code, 1, $headerArr);
// Header and content are separated by an empty line
list($header, $content) = explode("\r\n\r\n", $res, 2);
$content.= "\r\n";
list($header, $content) = explode(CRLF . CRLF, $res, 2);
$content.= CRLF;
if (false === $res) {
// Last chance -- redirect
......
$base.= preg_replace('/(.*\/)[^\/]*/', '${1}', $url_parts['path']);
// Put it into content (generate also <head> if necessary)
$replacement = chr(10) . '<base href="' . htmlentities($base) . '" />' . chr(10);
$replacement = LF . '<base href="' . htmlentities($base) . '" />' . LF;
if (stristr($content, '<head>')) {
$content = preg_replace('/(<head>)/i', '\1' . $replacement, $content);
} else {
......
$dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'];
$timeFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
$this->content.= chr(10).'<!-- Cached page generated '.date($dateFormat.' '.$timeFormat, $row['tstamp']).'. Expires '.Date($dateFormat.' '.$timeFormat, $row['expires']).' -->';
$this->content.= LF.'<!-- Cached page generated '.date($dateFormat.' '.$timeFormat, $row['tstamp']).'. Expires '.Date($dateFormat.' '.$timeFormat, $row['expires']).' -->';
}
}
$GLOBALS['TT']->pull();
......
$padSuffix = '<!--pad-->'; // prevent any trims
$padSize = 768 - strlen($padSuffix) - strlen($temp_content);
if ($padSize > 0) {
$temp_content = str_pad($temp_content, $padSize, "\n") . $padSuffix;
$temp_content = str_pad($temp_content, $padSize, LF) . $padSuffix;
}
if (!$this->headerNoCache() && $cachedRow = $this->getFromCache_queryRow()) {
......
$GLOBALS['TT']->push('Substitute header section');
$this->INTincScript_loadJSCode();
$this->content = str_replace('<!--HD_'.$this->config['INTincScript_ext']['divKey'].'-->', $this->convOutputCharset(implode(chr(10),$this->additionalHeaderData),'HD'), $this->content);
$this->content = str_replace('<!--HD_'.$this->config['INTincScript_ext']['divKey'].'-->', $this->convOutputCharset(implode(LF,$this->additionalHeaderData),'HD'), $this->content);
$this->content = str_replace('<!--TDS_'.$this->config['INTincScript_ext']['divKey'].'-->', $this->convOutputCharset($this->divSection,'TDS'), $this->content);
$this->setAbsRefPrefix();
$GLOBALS['TT']->pull();
......
<script type="text/javascript">
/*<![CDATA[*/
<!--
'.implode(chr(10),$this->additionalJavaScript).'
'.implode(LF,$this->additionalJavaScript).'
'.trim($this->JSCode).'
// -->
/*]]>*/
......
<style type="text/css">
/*<![CDATA[*/
<!--
'.implode(chr(10),$this->additionalCSS).'
'.implode(LF,$this->additionalCSS).'
// -->
/*]]>*/
</style>';
......
$GLOBALS['TT']->push('Write to log file (fputs)');
$logfilehandle = fopen($this->config['stat_vars']['logFile'], 'a');
fputs($logfilehandle, $LogLine.chr(10));
fputs($logfilehandle, $LogLine.LF);
@fclose($logfilehandle);
$GLOBALS['TT']->pull();
......
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(chr(10),$output);
$content = implode(LF,$output);
if (!trim($content)) {
$content = $oldContent; // Restore old content due empty return value.
$GLOBALS['TT']->setTSlogMessage('"tidy" returned an empty value!',2);
......
}
// Parsing the user TS (or getting from cache)
$TSdataArray = t3lib_TSparser::checkIncludeLines_array($TSdataArray);
$userTS = implode(chr(10).'[GLOBAL]'.chr(10),$TSdataArray);
$userTS = implode(LF.'[GLOBAL]'.LF,$TSdataArray);
$hash = md5('pageTS:'.$userTS);
$cachedContent = $this->sys_page->getHash($hash);
if (isset($cachedContent)) {
typo3/sysext/cms/tslib/class.tslib_pagegen.php (working copy)
}
}
return array(count($functions)? implode(chr(10), $functions) . chr(10) . implode(chr(10), $setEvents) : '', $setBody);
return array(count($functions)? implode(LF, $functions) . LF . implode(LF, $setEvents) : '', $setBody);
}
/**
......
$headerComment = $GLOBALS['TSFE']->config['config']['headerComment'];
if (trim($headerComment)) {
$pageRenderer->addInlineComment("\t" . str_replace("\n", "\n\t", trim($headerComment)) . "\n");
$pageRenderer->addInlineComment(TAB . str_replace(LF, LF . TAB, trim($headerComment)) . LF);
}
// Setting charset:
......
// Adding doctype parts:
if (count($docTypeParts)) {
$pageRenderer->setXmlPrologAndDocType(implode(chr(10), $docTypeParts));
$pageRenderer->setXmlPrologAndDocType(implode(LF, $docTypeParts));
}
// Begin header section:
......
$temp_styleLines = array ();
foreach ($GLOBALS['TSFE']->tmpl->setup['plugin.'] as $key => $iCSScode) {
if (is_array($iCSScode) && $iCSScode['_CSS_DEFAULT_STYLE']) {
$temp_styleLines[] = '/* default styles for extension "' . substr($key, 0, - 1) . '" */' . chr(10) . $iCSScode['_CSS_DEFAULT_STYLE'];
$temp_styleLines[] = '/* default styles for extension "' . substr($key, 0, - 1) . '" */' . LF . $iCSScode['_CSS_DEFAULT_STYLE'];
}
}
if (count($temp_styleLines)) {
if ($GLOBALS['TSFE']->config['config']['inlineStyle2TempFile']) {
$pageRenderer->addCssFile(TSpagegen::inline2TempFile(implode(chr(10), $temp_styleLines), 'css'));
$pageRenderer->addCssFile(TSpagegen::inline2TempFile(implode(LF, $temp_styleLines), 'css'));
} else {
$pageRenderer->addCssInlineBlock('TSFEinlineStyle', implode(chr(10), $temp_styleLines));
$pageRenderer->addCssInlineBlock('TSFEinlineStyle', implode(LF, $temp_styleLines));
}
}
}
......
if (is_array($GLOBALS['TSFE']->inlineJS)) {
foreach ($GLOBALS['TSFE']->inlineJS as $key => $val) {
if (! is_array($val)) {
$inlineJS .= chr(10) . $val . chr(10);
$inlineJS .= LF . $val . LF;
}
}
}
......
// Javascript inline code
$inline = $GLOBALS['TSFE']->cObj->cObjGet($GLOBALS['TSFE']->pSetup['jsInline.'], 'jsInline.');
if ($inline) {
$inlineJS .= chr(10) . $inline . chr(10);
$inlineJS .= LF . $inline . LF;
}
// Javascript inline code for Footer
......
// add header data block
if ($GLOBALS['TSFE']->additionalHeaderData) {
$pageRenderer->addHeaderData(implode(chr(10), $GLOBALS['TSFE']->additionalHeaderData));
$pageRenderer->addHeaderData(implode(LF, $GLOBALS['TSFE']->additionalHeaderData));
}
// add footer data block
if ($GLOBALS['TSFE']->additionalFooterData) {
$pageRenderer->addFooterData(implode(chr(10), $GLOBALS['TSFE']->additionalFooterData));
$pageRenderer->addFooterData(implode(LF, $GLOBALS['TSFE']->additionalFooterData));
}
// Header complete, now add content
......
if ($GLOBALS['TSFE']->pSetup['frameSet.']) {
$fs = t3lib_div::makeInstance('tslib_frameset');
$pageRenderer->addBodyContent($fs->make($GLOBALS['TSFE']->pSetup['frameSet.']));
$pageRenderer->addBodyContent(chr(10) . '<noframes>' . chr(10));
$pageRenderer->addBodyContent(LF . '<noframes>' . LF);
}
// Bodytag:
......
if (count($JSef[1])) { // Event functions:
$bodyTag = preg_replace('/>$/', '', trim($bodyTag)) . ' ' . trim(implode(' ', $JSef[1])) . '>';
}
$pageRenderer->addBodyContent(chr(10) . $bodyTag);
$pageRenderer->addBodyContent(LF . $bodyTag);
// Div-sections
if ($GLOBALS['TSFE']->divSection) {
$pageRenderer->addBodyContent(chr(10) . $GLOBALS['TSFE']->divSection);
$pageRenderer->addBodyContent(LF . $GLOBALS['TSFE']->divSection);
}
// Page content
$pageRenderer->addBodyContent(chr(10) . $pageContent);
$pageRenderer->addBodyContent(LF . $pageContent);
// Render complete page
$GLOBALS['TSFE']->content = $pageRenderer->render();
// Ending page
if ($GLOBALS['TSFE']->pSetup['frameSet.']) {
$GLOBALS['TSFE']->content .= chr(10) . '</noframes>';
$GLOBALS['TSFE']->content .= LF . '</noframes>';
}
}
typo3/sysext/cms/tslib/class.tslib_feuserauth.php (working copy)
if (!$this->userTSUpdated) {
// Parsing the user TS (or getting from cache)
$this->TSdataArray = t3lib_TSparser::checkIncludeLines_array($this->TSdataArray);
$userTS = implode(chr(10).'[GLOBAL]'.chr(10),$this->TSdataArray);
$userTS = implode(LF.'[GLOBAL]'.LF,$this->TSdataArray);
$parseObj = t3lib_div::makeInstance('t3lib_TSparser');
$parseObj->parse($userTS);
$this->userTS = $parseObj->setup;
typo3/sysext/cms/tslib/media/scripts/gmenu_layers.php (working copy)
GLV_timeout["'.$this->WMid.'"] = GLV_date.getTime();
GLV_timeoutRef["'.$this->WMid.'"] = '.t3lib_div::intInRange($this->mconf['hideMenuTimer'],0,20000).';
GLV_menuXY["'.$this->WMid.'"] = new Array();
'.implode(chr(10),$this->WMxyArray).'
'.implode(LF,$this->WMxyArray).'
'.$this->WMrestoreVars;
if ($this->mconf['freezeMouseover']) {
......
function GL'.$this->WMid.'_over(mitm_id) {
GL'.$this->WMid.'_out(""); // removes any old roll over state of an item. Needed for alwaysKeep and Opera browsers.
switch(mitm_id) {
'.implode(chr(10),$this->VMmouseoverActions).'
'.implode(LF,$this->VMmouseoverActions).'
}
GLV_currentROitem["'.$this->WMid.'"]=mitm_id;
}
function GL'.$this->WMid.'_out(mitm_id) {
if (!mitm_id) mitm_id=GLV_currentROitem["'.$this->WMid.'"];
switch(mitm_id) {
'.implode(chr(10),$this->VMmouseoutActions).'
'.implode(LF,$this->VMmouseoutActions).'
}
}
';
......
$GLOBALS["TSFE"]->JSCode.= '
function GL'.$this->WMid.'_getMouse(e) {
if (GLV_menuOn["'.$this->WMid.'"]!=null && !GLV_dontFollowMouse["'.$this->WMid.'"]){
'.implode(chr(10),$GLV_menuOn).'
'.implode(LF,$GLV_menuOn).'
}
GL_mouseMoveEvaluate("'.$this->WMid.'");
}
......
'.$this->WMhideCode.'
}
function GL'.$this->WMid.'_doTop(WMid,id) {
'.trim(implode(chr(10),$DoTop)).'
'.trim(implode(LF,$DoTop)).'
}
function GL'.$this->WMid.'_restoreMenu() {
'.$this->WMrestoreScript.'
......
$GLOBALS['TSFE']->JSeventFuncCalls['onmousemove'][$this->WMid]= 'GL'.$this->WMid.'_getMouse(e);';
$GLOBALS['TSFE']->JSeventFuncCalls['onmouseup'][$this->WMid]= 'GL_mouseUp(\''.$this->WMid.'\',e);';
$GLOBALS['TSFE']->divSection.=implode($this->divLayers,chr(10)).chr(10);
$GLOBALS['TSFE']->divSection.=implode($this->divLayers,LF).LF;
return parent::extProc_finish();
}
typo3/sysext/cms/tslib/media/scripts/tmenu_layers.php (working copy)
GLV_timeout["'.$this->WMid.'"] = GLV_date.getTime();
GLV_timeoutRef["'.$this->WMid.'"] = '.t3lib_div::intInRange($this->mconf['hideMenuTimer'],0,20000).';
GLV_menuXY["'.$this->WMid.'"] = new Array();
'.implode(chr(10),$this->WMxyArray).'
'.implode(LF,$this->WMxyArray).'
'.$this->WMrestoreVars;
if ($this->mconf['freezeMouseover']) {
......
function GL'.$this->WMid.'_over(mitm_id) {
GL'.$this->WMid.'_out(""); // removes any old roll over state of an item. Needed for alwaysKeep and Opera browsers.
switch(mitm_id) {
'.implode(chr(10),$this->VMmouseoverActions).'
'.implode(LF,$this->VMmouseoverActions).'
}
GLV_currentROitem["'.$this->WMid.'"]=mitm_id;
}
function GL'.$this->WMid.'_out(mitm_id) {
if (!mitm_id) mitm_id=GLV_currentROitem["'.$this->WMid.'"];
switch(mitm_id) {
'.implode(chr(10),$this->VMmouseoutActions).'
'.implode(LF,$this->VMmouseoutActions).'
}
}
';
......
$GLOBALS["TSFE"]->JSCode.= '
function GL'.$this->WMid.'_getMouse(e) {
if (GLV_menuOn["'.$this->WMid.'"]!=null && !GLV_dontFollowMouse["'.$this->WMid.'"]){
'.implode(chr(10),$GLV_menuOn).'
'.implode(LF,$GLV_menuOn).'
}
GL_mouseMoveEvaluate("'.$this->WMid.'");
}
......
'.$this->WMhideCode.'
}
function GL'.$this->WMid.'_doTop(WMid,id) {
'.trim(implode(chr(10),$DoTop)).'
'.trim(implode(LF,$DoTop)).'
}
function GL'.$this->WMid.'_restoreMenu() {
'.$this->WMrestoreScript.'
......
$GLOBALS['TSFE']->JSeventFuncCalls['onmousemove'][$this->WMid]= 'GL'.$this->WMid.'_getMouse(e);';
$GLOBALS['TSFE']->JSeventFuncCalls['onmouseup'][$this->WMid]= 'GL_mouseUp(\''.$this->WMid.'\',e);';
$GLOBALS['TSFE']->divSection.=implode($this->divLayers,chr(10)).chr(10);
$GLOBALS['TSFE']->divSection.=implode($this->divLayers,LF).LF;
return parent::extProc_finish();
}
typo3/sysext/cms/tslib/media/scripts/freesite_dummy_page_menu.php (working copy)
$key = $row['uid'];
$val = $row['title'];
$content.= '<a target="testTemplate" href="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.'index.php?id='.$GLOBALS['TSFE']->id.'&based_on_uid='.$key).'">'.$val.'</a><br />';
$specialComment.= '[globalVar= based_on_uid='.$key.']'.chr(10);
$specialComment.= '[globalVar= based_on_uid='.$key.']'.LF;
}
// Select subcategories of template folder.
$page_res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'pid='.intval($pid).' AND deleted=0 AND hidden=0 AND starttime=0 AND endtime=0 AND fe_group=0', '', 'sorting');
......
$key = $row['uid'];
$val = $page_row['title'].' / '.$row['title'];
$content.= '<a target="testTemplate" href="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.'index.php?id='.$GLOBALS['TSFE']->id.'&based_on_uid='.$key).'">'.$val.'</a><br />';
$specialComment.= '[globalVar= based_on_uid='.$key.']'.chr(10);
$specialComment.= '[globalVar= based_on_uid='.$key.']'.LF;
}
}
}
typo3/sysext/cms/tslib/class.tslib_fetce.php (working copy)
while(list($table,$id_arr)=each($data)) {
t3lib_div::loadTCA($table);
if (is_array($id_arr)) {
$sep=$FEData[$table.'.']['separator']?$FEData[$table.'.']['separator']:chr(10);
$sep=$FEData[$table.'.']['separator']?$FEData[$table.'.']['separator']:LF;
reset($id_arr);
while(list($id,$field_arr)=each($id_arr)) {
$this->newData[$table][$id]=Array();
typo3/sysext/cms/tslib/class.tslib_menu.php (working copy)
if ($imgROInfo) {
$theName = $this->imgNamePrefix.$this->I['uid'].$this->I['INPfix'].$pref;
$name = ' '.$this->nameAttribute.'="'.$theName.'"';
$GLOBALS['TSFE']->JSImgCode.= chr(10).$theName.'_n=new Image(); '.$theName.'_n.src = "'.$GLOBALS['TSFE']->absRefPrefix.$imgInfo[3].'"; ';
$GLOBALS['TSFE']->JSImgCode.= chr(10).$theName.'_h=new Image(); '.$theName.'_h.src = "'.$GLOBALS['TSFE']->absRefPrefix.$imgROInfo[3].'"; ';
$GLOBALS['TSFE']->JSImgCode.= LF.$theName.'_n=new Image(); '.$theName.'_n.src = "'.$GLOBALS['TSFE']->absRefPrefix.$imgInfo[3].'"; ';
$GLOBALS['TSFE']->JSImgCode.= LF.$theName.'_h=new Image(); '.$theName.'_h.src = "'.$GLOBALS['TSFE']->absRefPrefix.$imgROInfo[3].'"; ';
}
}
$GLOBALS['TSFE']->imagesOnPage[]=$imgInfo[3];
......
$this->I['name'] = ' '.$this->nameAttribute.'="'.$this->I["theName"].'"';
$this->I['linkHREF']['onMouseover']=$this->WMfreezePrefix.'over(\''.$this->I['theName'].'\');';
$this->I['linkHREF']['onMouseout']=$this->WMfreezePrefix.'out(\''.$this->I['theName'].'\');';
$GLOBALS['TSFE']->JSImgCode.= chr(10).$this->I['theName'].'_n=new Image(); '.$this->I['theName'].'_n.src = "'.$GLOBALS['TSFE']->absRefPrefix.$this->I['val']['output_file'].'"; ';
$GLOBALS['TSFE']->JSImgCode.= chr(10).$this->I['theName'].'_h=new Image(); '.$this->I['theName'].'_h.src = "'.$GLOBALS['TSFE']->absRefPrefix.$this->result['RO'][$key]['output_file'].'"; ';
$GLOBALS['TSFE']->JSImgCode.= LF.$this->I['theName'].'_n=new Image(); '.$this->I['theName'].'_n.src = "'.$GLOBALS['TSFE']->absRefPrefix.$this->I['val']['output_file'].'"; ';
$GLOBALS['TSFE']->JSImgCode.= LF.$this->I['theName'].'_h=new Image(); '.$this->I['theName'].'_h.src = "'.$GLOBALS['TSFE']->absRefPrefix.$this->result['RO'][$key]['output_file'].'"; ';
$GLOBALS['TSFE']->imagesOnPage[]=$this->result['RO'][$key]['output_file'];
$GLOBALS['TSFE']->setJS('mouseOver');
$this->extProc_RO($key);
......
for ($a=1;$a<=$levels;$a++) {
$JScode.="\n var ".$this->JSVarName.$a."=0;";
}
$JScode.= $this->generate_level($levels,1,$this->id,$this->menuArr,$this->MP_array)."\n";
$JScode.= $this->generate_level($levels,1,$this->id,$this->menuArr,$this->MP_array).LF;
$GLOBALS['TSFE']->additionalHeaderData['JSMenuCode']='<script type="text/javascript" src="'.$GLOBALS['TSFE']->absRefPrefix.'t3lib/jsfunc.menu.js"></script>';
$GLOBALS['TSFE']->JSCode.=$JScode;
......
$url = $GLOBALS['TSFE']->baseUrlWrap($LD['totalURL']);
$target = $LD['target'];
}
$codeLines.="\n".$var.$count."=".$menuName.".add(".$parent.",".$prev.",0,".t3lib_div::quoteJSvalue($title, true).",".t3lib_div::quoteJSvalue($url, true).",".t3lib_div::quoteJSvalue($target, true).");";
$codeLines.=LF.$var.$count."=".$menuName.".add(".$parent.",".$prev.",0,".t3lib_div::quoteJSvalue($title, true).",".t3lib_div::quoteJSvalue($url, true).",".t3lib_div::quoteJSvalue($target, true).");";
// If the active one should be chosen...
$active = ($levelConf['showActive'] && $this->isActive($data['uid'], $MP_var));
// If the first item should be shown
......
// do it...
if ($active || $first) {
if ($count==1) {
$codeLines.="\n".$menuName.".openID = ".$var.$count.";";
$codeLines.=LF.$menuName.".openID = ".$var.$count.";";
} else {
$codeLines.="\n".$menuName.".entry[".$parent."].openID = ".$var.$count.";";
$codeLines.=LF.$menuName.".entry[".$parent."].openID = ".$var.$count.";";
}
}
// Add submenu...
......
$levelConf['firstLabel'] = $this->mconf['firstLabelGeneral'];
}
if ($levelConf['firstLabel'] && $codeLines) {
$codeLines.= chr(10).$menuName.'.defTopTitle['.$count.'] = '.t3lib_div::quoteJSvalue($levelConf['firstLabel'], true).';';
$codeLines.= LF.$menuName.'.defTopTitle['.$count.'] = '.t3lib_div::quoteJSvalue($levelConf['firstLabel'], true).';';
}
return $codeLines;
}
typo3/sysext/cms/tslib/class.tslib_content.php (working copy)
if ($conf['captionSplit'] && $conf['captionSplit.']['cObject']) {
$legacyCaptionSplit = 1;
$capSplit = $this->stdWrap($conf['captionSplit.']['token'], $conf['captionSplit.']['token.']);
if (!$capSplit) {$capSplit=chr(10);}
if (!$capSplit) {$capSplit=LF;}
$captionArray = explode($capSplit, $this->cObjGetSingle($conf['captionSplit.']['cObject'], $conf['captionSplit.']['cObject.'], 'captionSplit.cObject'));
foreach ($captionArray as $ca_key => $ca_val) {
$captionArray[$ca_key] = $this->stdWrap(trim($captionArray[$ca_key]), $conf['captionSplit.']['stdWrap.']);
......
$dataArr = array();
// Getting the original config
if (trim($data)) {
$data = str_replace(chr(10),'||',$data);
$data = str_replace(LF,'||',$data);
$dataArr = explode('||',$data);
}
// Adding the new dataArray config form:
......
} else {
$wrap = $wrap ? ' wrap="'.$wrap.'"' : ' wrap="virtual"';
}
$default = $this->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], str_replace('\n',chr(10),trim($parts[2])));
$default = $this->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], str_replace('\n',LF,trim($parts[2])));
$fieldCode=sprintf('<textarea name="%s"%s cols="%s" rows="%s"%s%s>%s</textarea>',
$confData['fieldname'], $elementIdAttribute, $cols, $rows, $wrap, $addParams, t3lib_div::formatForTextarea($default));
break;
......
}
// fetching params
$lines = explode(chr(10), $this->stdWrap($conf['params'],$conf['params.']));
$lines = explode(LF, $this->stdWrap($conf['params'],$conf['params.']));
foreach ($lines as $l) {
$parts = explode('=', $l);
$parameter = strtolower(trim($parts[0]));
......
//custom parameter entry
$rawTS = $val['mmParamCustomEntry'];
//read and merge
$tmp = t3lib_div::trimExplode(chr(10), $rawTS);
$tmp = t3lib_div::trimExplode(LF, $rawTS);
if (count($tmp)) {
foreach ($tmp as $tsLine) {
if (substr($tsLine, 0, 1) != '#' && $pos = strpos($tsLine, '.')) {
......
$paramsArray = array_merge((array) $typeConf['default.']['params.'], (array) $conf['params.'], $conf['predefined']);
$conf['params']= '';
foreach ($paramsArray as $key => $value) {
$conf['params'] .= $key . '=' . $value . chr(10);
$conf['params'] .= $key . '=' . $value . LF;
}
$content = $this->MULTIMEDIA($conf);
break;
......
if (is_array($conf['params.'])) {
t3lib_div::remapArrayKeys($conf['params.'], $typeConf['mapping.']['params.']);
foreach ($conf['params.'] as $key => $value) {
$params .= $qtObject . '.addParam("' .$key . '", "' . $value . '");' . chr(10);
$params .= $qtObject . '.addParam("' .$key . '", "' . $value . '");' . LF;
}
}
$params = ($params ? substr($params, 0, -2) : '') . chr(10) . $qtObject . '.write("' . $replaceElementIdString . '");';
$params = ($params ? substr($params, 0, -2) : '') . LF . $qtObject . '.write("' . $replaceElementIdString . '");';
$alternativeContent = $this->stdWrap($conf['alternativeContent'], $conf['alternativeContent.']);
$layout = $this->stdWrap($conf['layout'], $conf['layout.']);
......
$content=preg_replace("/\r?\n[\t ]*\r?\n/",$conf['doubleBrTag'],$content);
}
if ($conf['br']) {$content=nl2br($content);}
if ($conf['brTag']) {$content= str_replace(chr(10),$conf['brTag'],$content);}
if ($conf['brTag']) {$content= str_replace(LF,$conf['brTag'],$content);}
if ($conf['encapsLines.']) {$content=$this->encaps_lineSplit($content,$conf['encapsLines.']);}
if ($conf['keywords']) {$content= $this->keywords($content);}
if ($conf['innerWrap'] || $conf['innerWrap.']){$content=$this->wrap($content, $this->stdWrap($conf['innerWrap'], $conf['innerWrap.']));}
......
$parts = explode('|',$str);
$output =
chr(10).str_pad('',$parts[0],chr(9)).
LF.str_pad('',$parts[0],TAB).
'<!-- '.htmlspecialchars($this->insertData($parts[1])).' [begin] -->'.
chr(10).str_pad('',$parts[0]+1,chr(9)).
LF.str_pad('',$parts[0]+1,TAB).
$content.
chr(10).str_pad('',$parts[0],chr(9)).
LF.str_pad('',$parts[0],TAB).
'<!-- '.htmlspecialchars($this->insertData($parts[1])).' [end] -->'.
chr(10).str_pad('',$parts[0]+1,chr(9));
LF.str_pad('',$parts[0]+1,TAB);
return $output;
}
......
$tagName=strtolower($htmlParser->getFirstTagName($v));
$cfg=$conf['externalBlocks.'][$tagName.'.'];
if ($cfg['stripNLprev'] || $cfg['stripNL']) {
$parts[$k-1]=preg_replace('/'.chr(13).'?'.chr(10).'[ ]*$/', '', $parts[$k-1]);
$parts[$k-1]=preg_replace('/'.CR.'?'.LF.'[ ]*$/', '', $parts[$k-1]);
}
if ($cfg['stripNLnext'] || $cfg['stripNL']) {
$parts[$k+1]=preg_replace('/^[ ]*'.chr(13).'?'.chr(10).'/', '', $parts[$k+1]);
$parts[$k+1]=preg_replace('/^[ ]*'.CR.'?'.LF.'/', '', $parts[$k+1]);
}
}
}
......
$colParts[$kkk] = $htmlParser->removeFirstAndLastTag($vvv);
if ($cfg['HTMLtableCells.'][$cc.'.']['callRecursive'] || (!isset($cfg['HTMLtableCells.'][$cc.'.']['callRecursive']) && $cfg['HTMLtableCells.']['default.']['callRecursive'])) {
if ($cfg['HTMLtableCells.']['addChr10BetweenParagraphs']) $colParts[$kkk]=str_replace('</p><p>','</p>'.chr(10).'<p>',$colParts[$kkk]);
if ($cfg['HTMLtableCells.']['addChr10BetweenParagraphs']) $colParts[$kkk]=str_replace('</p><p>','</p>'.LF.'<p>',$colParts[$kkk]);
$colParts[$kkk] = $this->parseFunc($colParts[$kkk], $conf);
}
......
$data = substr($theValue,$pointer,$len); // $data is the content until the next <tag-start or end is detected. In case of a currentTag set, this would mean all data between the start- and end-tags
if ($data!='') {
if ($stripNL) { // If the previous tag was set to strip NewLines in the beginning of the next data-chunk.
$data = preg_replace('/^[ ]*'.chr(13).'?'.chr(10).'/', '', $data);
$data = preg_replace('/^[ ]*'.CR.'?'.LF.'/', '', $data);
}
if (!is_array($currentTag)) { // These operations should only be performed on code outside the tags...
......
}
$this->parameters['allParams']=trim($currentTag[1]);
if ($stripNL) { // Removes NL in the beginning and end of the tag-content AND at the end of the currentTagBuffer. $stripNL depends on the configuration of the current tag
$contentAccum[$contentAccumP-1] = preg_replace('/'.chr(13).'?'.chr(10).'[ ]*$/', '', $contentAccum[$contentAccumP-1]);
$contentAccum[$contentAccumP] = preg_replace('/^[ ]*'.chr(13).'?'.chr(10).'/', '', $contentAccum[$contentAccumP]);
$contentAccum[$contentAccumP] = preg_replace('/'.chr(13).'?'.chr(10).'[ ]*$/', '', $contentAccum[$contentAccumP]);
$contentAccum[$contentAccumP-1] = preg_replace('/'.CR.'?'.LF.'[ ]*$/', '', $contentAccum[$contentAccumP-1]);
$contentAccum[$contentAccumP] = preg_replace('/^[ ]*'.CR.'?'.LF.'/', '', $contentAccum[$contentAccumP]);
$contentAccum[$contentAccumP] = preg_replace('/'.CR.'?'.LF.'[ ]*$/', '', $contentAccum[$contentAccumP]);
}
$this->data[$this->currentValKey] = $contentAccum[$contentAccumP];
$newInput=$this->cObjGetSingle($theName,$theConf,'/parseFunc/.tags.'.$tag[0]); // fetch the content object
......
}
/**
* Lets you split the content by chr(10) and proces each line independently. Used to format content made with the RTE.
* Lets you split the content by LF and proces each line independently. Used to format content made with the RTE.
*
* @param string The input value
* @param array TypoScript options
* @return string The processed input value being returned; Splitted lines imploded by chr(10) again.
* @return string The processed input value being returned; Splitted lines imploded by LF again.
* @access private
* @link http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=323&cHash=a19312be78
*/
function encaps_lineSplit($theValue, $conf) {
$lParts = explode(chr(10),$theValue);
$lParts = explode(LF,$theValue);
$encapTags = t3lib_div::trimExplode(',',strtolower($conf['encapsTagList']),1);
$nonWrappedTag = $conf['nonWrappedTag'];
......
$lParts[$k] = $str_content;
}
return implode(chr(10),$lParts);
return implode(LF,$lParts);
}
/**
......
$textstr = $textpieces[0];
$initP = '?id='.$GLOBALS['TSFE']->id.'&type='.$GLOBALS['TSFE']->type;
for($i=1; $i<$pieces; $i++) {
$len=strcspn($textpieces[$i],chr(32).chr(9).chr(13).chr(10));
$len=strcspn($textpieces[$i],chr(32).TAB.CRLF);
if (trim(substr($textstr,-1))=='' && $len) {
$lastChar=substr($textpieces[$i],$len-1,1);
......
$textstr = $textpieces[0];
$initP = '?id='.$GLOBALS['TSFE']->id.'&type='.$GLOBALS['TSFE']->type;
for($i=1; $i<$pieces; $i++) {
$len = strcspn($textpieces[$i],chr(32).chr(9).chr(13).chr(10));
$len = strcspn($textpieces[$i],chr(32).TAB.CRLF);
if (trim(substr($textstr,-1))=='' && $len) {
$lastChar = substr($textpieces[$i],$len-1,1);
if (!preg_match('/[A-Za-z0-9]/',$lastChar)) {$len--;}
......
*/
function processParams($params) {
$paramArr=array();
$lines=t3lib_div::trimExplode(chr(10),$params,1);
$lines=t3lib_div::trimExplode(LF,$params,1);
foreach($lines as $val) {
$pair = explode('=',$val,2);
if (!t3lib_div::inList('#,/',substr(trim($pair[0]),0,1))) {
......
* @return string Cleaned up string, keywords will be separated by a comma only.
*/
function keywords($content) {
$listArr = preg_split('/[,;' . chr(10) . ']/', $content);
$listArr = preg_split('/[,;' . LF . ']/', $content);
foreach ($listArr as $k => $v) {
$listArr[$k]=trim($v);
}
......
$emailContent = trim($msg);
if ($emailContent) {
$parts = explode(chr(10), $emailContent, 2); // First line is subject
$parts = explode(LF, $emailContent, 2); // First line is subject
$subject=trim($parts[0]);
$plain_message=trim($parts[1]);
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));
if ($recipients) $GLOBALS['TSFE']->plainMailEncoded($recipients, $subject, $plain_message, implode(LF,$headers));
if ($cc) $GLOBALS['TSFE']->plainMailEncoded($cc, $subject, $plain_message, implode(LF,$headers));
return true;
}
}
......
* @see gifBuilderTextBox()
*/
function linebreaks($string,$chars,$maxLines=0) {
$lines = explode(chr(10),$string);
$lines = explode(LF,$string);
$lineArr=Array();
$c=0;
foreach ($lines as $paragraph) {
......
if (!$conf['src'] && !$typeNum) {
$typeNum = -1;
}
$content.='<frame'.$this->frameParams($conf,$typeNum).' />'.chr(10);
$content.='<frame'.$this->frameParams($conf,$typeNum).' />'.LF;
break;
case 'FRAMESET':
$frameset = t3lib_div::makeInstance('tslib_frameset');
$content.=$frameset->make($conf).chr(10);
$content.=$frameset->make($conf).LF;
break;
}
}
}
return '<frameset'.$this->framesetParams($setup).'>'.chr(10).$content.'</frameset>';
return '<frameset'.$this->framesetParams($setup).'>'.LF.$content.'</frameset>';
}
}
......
// If width is defined AND there has been no change to the default table params, then extend them to a tablewidth of 1
if ($valPairs[4] && $this->default_tableParams==$this->tableParams) {$this->tableParams.=' width="1"';}
// Init:
$this->begin = chr(10).'<table '.$this->tableParams.'>';
$this->begin = LF.'<table '.$this->tableParams.'>';
$this->end = '</table>';
$rows=array();
$widthImg = '';
......
if (!$rows && $cols) $rows=1; // If there are no rows in the middle but still som columns...
if ($rows&&$cols) {
$res = chr(10).'<table '.$this->tableParams.'>';
$res = LF.'<table '.$this->tableParams.'>';
// top offset:
if ($offArr[1]) {
$xoff = $offArr[0] ? 1 : 0;
typo3/sysext/openid/sv1/class.tx_openid_sv1.php (working copy)
// we must change the password in the record to a long random string so
// that this user cannot be authenticated with other service.
if (is_array($userRecord)) {
$userRecord[$this->authenticationInformation['db_user']['userident_column']] = uniqid($this->prefixId . chr(10), true);
$userRecord[$this->authenticationInformation['db_user']['userident_column']] = uniqid($this->prefixId . LF, true);
}
}
return $userRecord;
typo3/sysext/tstemplate_ceditor/class.tx_tstemplateceditor.php (working copy)
if ($tmpl->changed) {
// Set the data to be saved
$recData=array();
$recData["sys_template"][$saveId]["constants"] = implode($tmpl->raw,chr(10));
$recData["sys_template"][$saveId]["constants"] = implode($tmpl->raw,LF);
// Create new tce-object
$tce = t3lib_div::makeInstance("t3lib_TCEmain");
$tce->stripslashes_values=0;
typo3/sysext/statictemplates/media/scripts/freesite_dummy_page_menu.php (working copy)
$key = $row['uid'];
$val = $row['title'];
$content.= '<a target="testTemplate" href="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.'index.php?id='.$GLOBALS['TSFE']->id.'&based_on_uid='.$key).'">'.$val.'</a><br />';
$specialComment.= '[globalVar= based_on_uid='.$key.']'.chr(10);
$specialComment.= '[globalVar= based_on_uid='.$key.']'.LF;
}
// Select subcategories of template folder.
$page_res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'pid='.intval($pid).' AND deleted=0 AND hidden=0 AND starttime=0 AND endtime=0 AND fe_group=0', '', 'sorting');
......
$key = $row['uid'];
$val = $page_row['title'].' / '.$row['title'];
$content.= '<a target="testTemplate" href="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.'index.php?id='.$GLOBALS['TSFE']->id.'&based_on_uid='.$key).'">'.$val.'</a><br />';
$specialComment.= '[globalVar= based_on_uid='.$key.']'.chr(10);
$specialComment.= '[globalVar= based_on_uid='.$key.']'.LF;
}
}
}
typo3/sysext/statictemplates/media/scripts/tmenu_layers.php (working copy)
GLV_timeout["'.$this->WMid.'"] = GLV_date.getTime();
GLV_timeoutRef["'.$this->WMid.'"] = '.t3lib_div::intInRange($this->mconf['hideMenuTimer'],0,20000).';
GLV_menuXY["'.$this->WMid.'"] = new Array();
'.implode(chr(10),$this->WMxyArray).'
'.implode(LF,$this->WMxyArray).'
'.$this->WMrestoreVars;
if ($this->mconf['freezeMouseover']) {
......
function GL'.$this->WMid.'_over(mitm_id) {
GL'.$this->WMid.'_out(""); // removes any old roll over state of an item. Needed for alwaysKeep and Opera browsers.
switch(mitm_id) {
'.implode(chr(10),$this->VMmouseoverActions).'
'.implode(LF,$this->VMmouseoverActions).'
}
GLV_currentROitem["'.$this->WMid.'"]=mitm_id;
}
function GL'.$this->WMid.'_out(mitm_id) {
if (!mitm_id) mitm_id=GLV_currentROitem["'.$this->WMid.'"];
switch(mitm_id) {
'.implode(chr(10),$this->VMmouseoutActions).'
'.implode(LF,$this->VMmouseoutActions).'
}
}
';
......
$GLOBALS["TSFE"]->JSCode.= '
function GL'.$this->WMid.'_getMouse(e) {
if (GLV_menuOn["'.$this->WMid.'"]!=null && !GLV_dontFollowMouse["'.$this->WMid.'"]){
'.implode(chr(10),$GLV_menuOn).'
'.implode(LF,$GLV_menuOn).'
}
GL_mouseMoveEvaluate("'.$this->WMid.'");
}
......
'.$this->WMhideCode.'
}
function GL'.$this->WMid.'_doTop(WMid,id) {
'.trim(implode(chr(10),$DoTop)).'
'.trim(implode(LF,$DoTop)).'
}
function GL'.$this->WMid.'_restoreMenu() {
'.$this->WMrestoreScript.'
......
$GLOBALS['TSFE']->JSeventFuncCalls['onmousemove'][$this->WMid]= 'GL'.$this->WMid.'_getMouse(e);';
$GLOBALS['TSFE']->JSeventFuncCalls['onmouseup'][$this->WMid]= 'GL_mouseUp(\''.$this->WMid.'\',e);';
$GLOBALS['TSFE']->divSection.=implode($this->divLayers,chr(10)).chr(10);
$GLOBALS['TSFE']->divSection.=implode($this->divLayers,LF).LF;
return parent::extProc_finish();
}
typo3/sysext/statictemplates/media/scripts/gmenu_layers.php (working copy)
GLV_timeout["'.$this->WMid.'"] = GLV_date.getTime();
GLV_timeoutRef["'.$this->WMid.'"] = '.t3lib_div::intInRange($this->mconf['hideMenuTimer'],0,20000).';
GLV_menuXY["'.$this->WMid.'"] = new Array();
'.implode(chr(10),$this->WMxyArray).'
'.implode(LF,$this->WMxyArray).'
'.$this->WMrestoreVars;
if ($this->mconf['freezeMouseover']) {
......
function GL'.$this->WMid.'_over(mitm_id) {
GL'.$this->WMid.'_out(""); // removes any old roll over state of an item. Needed for alwaysKeep and Opera browsers.
switch(mitm_id) {
'.implode(chr(10),$this->VMmouseoverActions).'
'.implode(LF,$this->VMmouseoverActions).'
}
GLV_currentROitem["'.$this->WMid.'"]=mitm_id;
}
function GL'.$this->WMid.'_out(mitm_id) {
if (!mitm_id) mitm_id=GLV_currentROitem["'.$this->WMid.'"];
switch(mitm_id) {
'.implode(chr(10),$this->VMmouseoutActions).'
'.implode(LF,$this->VMmouseoutActions).'
}
}
';
......
$GLOBALS["TSFE"]->JSCode.= '
function GL'.$this->WMid.'_getMouse(e) {
if (GLV_menuOn["'.$this->WMid.'"]!=null && !GLV_dontFollowMouse["'.$this->WMid.'"]){
'.implode(chr(10),$GLV_menuOn).'
'.implode(LF,$GLV_menuOn).'
}
GL_mouseMoveEvaluate("'.$this->WMid.'");
}
... This diff was truncated because it exceeds the maximum size that can be displayed.
(8-8/11)