Bug #20745 » 11512_while_foreach_p1_v3a.diff
t3lib/class.t3lib_page.php (Arbeitskopie) | ||
---|---|---|
$MPA = array();
|
||
if ($MP) {
|
||
$MPA = explode(',',$MP);
|
||
reset($MPA);
|
||
while(list($MPAk) = each($MPA)) {
|
||
foreach ($MPA as $MPAk => $v) {
|
||
$MPA[$MPAk] = explode('-', $MPA[$MPAk]);
|
||
}
|
||
}
|
t3lib/class.t3lib_tsparser.php (Arbeitskopie) | ||
---|---|---|
if (strstr($string,$splitStr)) {
|
||
$newString='';
|
||
$allParts = explode($splitStr,chr(10).$string.chr(10)); // adds line break char before/after
|
||
reset($allParts);
|
||
while(list($c,$v)=each($allParts)) {
|
||
foreach ($allParts as $c => $v) {
|
||
if (!$c) { // first goes through
|
||
$newString.=$v;
|
||
} elseif (preg_match('/\r?\n\s*$/',$allParts[$c-1])) { // There must be a line-break char before.
|
||
... | ... | |
* @return array Same array but where the values has been parsed for include-commands
|
||
*/
|
||
function checkIncludeLines_array($array) {
|
||
reset($array);
|
||
while(list($k)=each($array)) {
|
||
foreach ($array as $k => $v) {
|
||
$array[$k]=t3lib_TSparser::checkIncludeLines($array[$k]);
|
||
}
|
||
return $array;
|
typo3/sysext/cms/tslib/class.tslib_pibase.php (Arbeitskopie) | ||
---|---|---|
*/
|
||
function pi_list_modeSelector($items=array(),$tableParams='') {
|
||
$cells=array();
|
||
reset($items);
|
||
while(list($k,$v)=each($items)) {
|
||
foreach ($items as $k => $v) {
|
||
$cells[]='
|
||
<td'.($this->piVars['mode']==$k?$this->pi_classParam('modeSelector-SCell'):'').'><p>'.
|
||
$this->pi_linkTP_keepPIvars(htmlspecialchars($v),array('mode'=>$k),$this->pi_isOnlyFields($this->pi_isOnlyFields)).
|
||
... | ... | |
}
|
||
// Overlaying labels from TypoScript (including fictitious language keys for non-system languages!):
|
||
if (is_array($this->conf['_LOCAL_LANG.'])) {
|
||
reset($this->conf['_LOCAL_LANG.']);
|
||
while(list($k,$lA)=each($this->conf['_LOCAL_LANG.'])) {
|
||
$confLL = $this->conf['_LOCAL_LANG.'];
|
||
if (is_array($confLL)) {
|
||
foreach ($confLL as $k => $lA) {
|
||
if (is_array($lA)) {
|
||
$k = substr($k,0,-1);
|
||
foreach($lA as $llK => $llV) {
|
||
... | ... | |
function pi_prependFieldsWithTable($table,$fieldList) {
|
||
$list=t3lib_div::trimExplode(',',$fieldList,1);
|
||
$return=array();
|
||
while(list(,$listItem)=each($list)) {
|
||
foreach ($list as $listItem) {
|
||
$return[]=$table.'.'.$listItem;
|
||
}
|
||
return implode(',',$return);
|
||
... | ... | |
$fList = t3lib_div::trimExplode(',',$fList,1);
|
||
$tempPiVars = $this->piVars;
|
||
while(list(,$k)=each($fList)) {
|
||
foreach ($fList as $k) {
|
||
if (!t3lib_div::testInt($tempPiVars[$k]) || $tempPiVars[$k]<$lowerThan) unset($tempPiVars[$k]);
|
||
}
|
||
if (!count($tempPiVars)) return 1;
|
||
... | ... | |
*/
|
||
function pi_autoCache($inArray) {
|
||
if (is_array($inArray)) {
|
||
reset($inArray);
|
||
while(list($fN,$fV)=each($inArray)) {
|
||
foreach ($inArray as $fN => $fV) {
|
||
if (!strcmp($inArray[$fN],'')) {
|
||
unset($inArray[$fN]);
|
||
} elseif (is_array($this->pi_autoCacheFields[$fN])) {
|
typo3/sysext/cms/tslib/class.tslib_menu.php (Arbeitskopie) | ||
---|---|---|
$prevnext_menu = $this->sys_page->getMenu($value_rec['pid'],'*',$altSortField);
|
||
$lastKey=0;
|
||
$nextActive=0;
|
||
reset($prevnext_menu);
|
||
while(list($k_b,$v_b)=each($prevnext_menu)) {
|
||
foreach ($prevnext_menu as $k_b => $v_b) {
|
||
if ($nextActive) {
|
||
$recArr['next']=$v_b;
|
||
$nextActive=0;
|
||
... | ... | |
$prevnextsection_menu = $this->sys_page->getMenu($recArr['index']['uid'],'*',$altSortField);
|
||
$lastKey=0;
|
||
$nextActive=0;
|
||
reset($prevnextsection_menu);
|
||
while(list($k_b,$v_b)=each($prevnextsection_menu)) {
|
||
foreach ($prevnextsection_menu as $k_b => $v_b) {
|
||
if ($nextActive) {
|
||
$sectionRec_temp = $this->sys_page->getMenu($v_b['uid'],'*',$altSortField);
|
||
if (count($sectionRec_temp)) {
|
||
... | ... | |
$items = explode('|',$this->conf['special.']['items']);
|
||
$c=0;
|
||
while(list($k_b,$v_b)=each($items)) {
|
||
foreach ($items as $k_b => $v_b) {
|
||
$v_b=strtolower(trim($v_b));
|
||
if (intval($this->conf['special.'][$v_b.'.']['uid'])) {
|
||
$recArr[$v_b] = $this->sys_page->getPage(intval($this->conf['special.'][$v_b.'.']['uid'])); // fetches the page in case of a hardcoded pid in template
|
||
... | ... | |
if ($this->conf['special.'][$v_b.'.']['target']) {
|
||
$temp[$c]['target']=$this->conf['special.'][$v_b.'.']['target'];
|
||
}
|
||
if (is_array($this->conf['special.'][$v_b.'.']['fields.'])) {
|
||
reset($this->conf['special.'][$v_b.'.']['fields.']);
|
||
while(list($fk,$val)=each($this->conf['special.'][$v_b.'.']['fields.'])) {
|
||
$tmpSpecialFields = $this->conf['special.'][$v_b.'.']['fields.'];
|
||
if (is_array($tmpSpecialFields)) {
|
||
foreach ($tmpSpecialFields as $fk => $val) {
|
||
$temp[$c][$fk]=$val;
|
||
}
|
||
}
|
||
... | ... | |
// IFSUB is true if there exist submenu items to the current item
|
||
if ($this->mconf['IFSUB']) {
|
||
$IFSUBinit = 0; // Flag: If $IFSUB is generated
|
||
reset($NOconf);
|
||
while (list($key,$val)=each($NOconf)) {
|
||
foreach ($NOconf as $key => $val) {
|
||
if ($this->isItemState('IFSUB',$key)) {
|
||
if (!$IFSUBinit) { // if this is the first IFSUB element, we must generate IFSUB.
|
||
$IFSUBconf = $this->tmpl->splitConfArray($this->mconf['IFSUB.'],$splitCount);
|
||
... | ... | |
// Prepare active settings, overriding normal settings
|
||
if ($this->mconf['ACT']) {
|
||
$ACTinit = 0; // Flag: If $ACT is generated
|
||
reset($NOconf);
|
||
while (list($key,$val)=each($NOconf)) { // Find active
|
||
foreach ($NOconf as $key => $val) { // Find active
|
||
if ($this->isItemState('ACT',$key)) {
|
||
if (!$ACTinit) { // if this is the first 'active', we must generate ACT.
|
||
$ACTconf = $this->tmpl->splitConfArray($this->mconf['ACT.'],$splitCount);
|
||
... | ... | |
// ACTIFSUB is true if there exist submenu items to the current item and the current item is active
|
||
if ($this->mconf['ACTIFSUB']) {
|
||
$ACTIFSUBinit = 0; // Flag: If $ACTIFSUB is generated
|
||
reset($NOconf);
|
||
while (list($key,$val)=each($NOconf)) { // Find active
|
||
foreach ($NOconf as $key => $val) { // Find active
|
||
if ($this->isItemState('ACTIFSUB',$key)) {
|
||
if (!$ACTIFSUBinit) { // if this is the first 'active', we must generate ACTIFSUB.
|
||
$ACTIFSUBconf = $this->tmpl->splitConfArray($this->mconf['ACTIFSUB.'],$splitCount);
|
||
... | ... | |
// CUR is true if the current page equals the item here!
|
||
if ($this->mconf['CUR']) {
|
||
$CURinit = 0; // Flag: If $CUR is generated
|
||
reset($NOconf);
|
||
while (list($key,$val)=each($NOconf)) {
|
||
foreach ($NOconf as $key => $val) {
|
||
if ($this->isItemState('CUR',$key)) {
|
||
if (!$CURinit) { // if this is the first 'current', we must generate CUR. Basically this control is just inherited from the other implementations as current would only exist one time and thats it (unless you use special-features of HMENU)
|
||
$CURconf = $this->tmpl->splitConfArray($this->mconf['CUR.'],$splitCount);
|
||
... | ... | |
// CURIFSUB is true if there exist submenu items to the current item and the current page equals the item here!
|
||
if ($this->mconf['CURIFSUB']) {
|
||
$CURIFSUBinit = 0; // Flag: If $CURIFSUB is generated
|
||
reset($NOconf);
|
||
while (list($key,$val)=each($NOconf)) {
|
||
foreach ($NOconf as $key => $val) {
|
||
if ($this->isItemState('CURIFSUB',$key)) {
|
||
if (!$CURIFSUBinit) { // if this is the first 'current', we must generate CURIFSUB.
|
||
$CURIFSUBconf = $this->tmpl->splitConfArray($this->mconf['CURIFSUB.'],$splitCount);
|
||
... | ... | |
// Prepare active settings, overriding normal settings
|
||
if ($this->mconf['USR']) {
|
||
$USRinit = 0; // Flag: If $USR is generated
|
||
reset($NOconf);
|
||
while (list($key,$val)=each($NOconf)) { // Find active
|
||
foreach ($NOconf as $key => $val) { // Find active
|
||
if ($this->isItemState('USR',$key)) {
|
||
if (!$USRinit) { // if this is the first active, we must generate USR.
|
||
$USRconf = $this->tmpl->splitConfArray($this->mconf['USR.'],$splitCount);
|
||
... | ... | |
// Prepare spacer settings, overriding normal settings
|
||
if ($this->mconf['SPC']) {
|
||
$SPCinit = 0; // Flag: If $SPC is generated
|
||
reset($NOconf);
|
||
while (list($key,$val)=each($NOconf)) { // Find spacers
|
||
foreach ($NOconf as $key => $val) { // Find spacers
|
||
if ($this->isItemState('SPC',$key)) {
|
||
if (!$SPCinit) { // if this is the first spacer, we must generate SPC.
|
||
$SPCconf = $this->tmpl->splitConfArray($this->mconf['SPC.'],$splitCount);
|
||
... | ... | |
// Prepare Userdefined settings
|
||
if ($this->mconf['USERDEF1']) {
|
||
$USERDEF1init = 0; // Flag: If $USERDEF1 is generated
|
||
reset($NOconf);
|
||
while (list($key,$val)=each($NOconf)) { // Find active
|
||
foreach ($NOconf as $key => $val) { // Find active
|
||
if ($this->isItemState('USERDEF1',$key)) {
|
||
if (!$USERDEF1init) { // if this is the first active, we must generate USERDEF1.
|
||
$USERDEF1conf = $this->tmpl->splitConfArray($this->mconf['USERDEF1.'],$splitCount);
|
||
... | ... | |
// Prepare Userdefined settings
|
||
if ($this->mconf['USERDEF2']) {
|
||
$USERDEF2init = 0; // Flag: If $USERDEF2 is generated
|
||
reset($NOconf);
|
||
while (list($key,$val)=each($NOconf)) { // Find active
|
||
foreach ($NOconf as $key => $val) { // Find active
|
||
if ($this->isItemState('USERDEF2',$key)) {
|
||
if (!$USERDEF2init) { // if this is the first active, we must generate USERDEF2.
|
||
$USERDEF2conf = $this->tmpl->splitConfArray($this->mconf['USERDEF2.'],$splitCount);
|
||
... | ... | |
$LD['target'] = '';
|
||
}
|
||
}
|
||
|
||
// out:
|
||
$list = array();
|
||
$list['HREF'] = strlen($LD['totalURL']) ? $LD['totalURL'] : $GLOBALS['TSFE']->baseUrl; // Added this check: What it does is to enter the baseUrl (if set, which it should for "realurl" based sites) as URL if the calculated value is empty. The problem is that no link is generated with a blank URL and blank URLs might appear when the realurl encoding is used and a link to the frontpage is generated.
|
||
... | ... | |
$this->WMsubmenuObjSuffixes = $this->tmpl->splitConfArray(array('sOSuffix'=>$this->mconf['submenuObjSuffixes']),$this->WMmenuItems);
|
||
$this->extProc_init();
|
||
reset($this->result);
|
||
while (list($key,$val)=each($this->result)) {
|
||
foreach ($this->result as $key => $val) {
|
||
$GLOBALS['TSFE']->register['count_HMENU_MENUOBJ']++;
|
||
$GLOBALS['TSFE']->register['count_MENUOBJ']++;
|
||
... | ... | |
$c=0;
|
||
$maxFlag=0;
|
||
$distributeAccu=array('H'=>0,'W'=>0);
|
||
reset($conf);
|
||
while (list($key,$val)=each($conf)) {
|
||
foreach ($conf as $key => $val) {
|
||
$GLOBALS['TSFE']->register['count_HMENU_MENUOBJ']++;
|
||
$GLOBALS['TSFE']->register['count_MENUOBJ']++;
|
||
... | ... | |
$Lobjs = $this->mconf['removeObjectsOfDummy'];
|
||
if ($Lobjs) {
|
||
$Lobjs = t3lib_div::intExplode(',',$Lobjs);
|
||
reset($Lobjs);
|
||
while(list(,$remItem)=each($Lobjs)) {
|
||
foreach ($Lobjs as $remItem) {
|
||
unset($val[$remItem]);
|
||
unset($val[$remItem.'.']);
|
||
}
|
||
... | ... | |
// displace
|
||
if ($Hobjs) {
|
||
reset($Hobjs);
|
||
while(list(,$index)=each($Hobjs)) {
|
||
foreach ($Hobjs as $index) {
|
||
if ($gifCreator->setup[$index] && $gifCreator->setup[$index.'.']) {
|
||
$oldOffset = explode(',',$gifCreator->setup[$index.'.']['offset']);
|
||
$gifCreator->setup[$index.'.']['offset'] = implode(',',$gifCreator->applyOffset($oldOffset,Array(0,-$Hcounter)));
|
||
... | ... | |
}
|
||
if ($Wobjs) {
|
||
reset($Wobjs);
|
||
while(list(,$index)=each($Wobjs)) {
|
||
foreach ($Wobjs as $index) {
|
||
if ($gifCreator->setup[$index] && $gifCreator->setup[$index.'.']) {
|
||
$oldOffset = explode(',',$gifCreator->setup[$index.'.']['offset']);
|
||
$gifCreator->setup[$index.'.']['offset'] = implode(',',$gifCreator->applyOffset($oldOffset,Array(-$Wcounter,0)));
|
||
... | ... | |
$Wcounter = 0;
|
||
$c=0;
|
||
$maxFlag=0;
|
||
reset($conf);
|
||
while (list($key,$val)=each($conf)) {
|
||
foreach ($conf as $key => $val) {
|
||
// SAME CODE AS makeGifs()! BEGIN
|
||
if ($items==($c+1) && $minDim) {
|
||
$Lobjs = $this->mconf['removeObjectsOfDummy'];
|
||
if ($Lobjs) {
|
||
$Lobjs = t3lib_div::intExplode(',',$Lobjs);
|
||
reset($Lobjs);
|
||
while(list(,$remItem)=each($Lobjs)) {
|
||
foreach ($Lobjs as $remItem) {
|
||
unset($val[$remItem]);
|
||
unset($val[$remItem.'.']);
|
||
}
|
||
... | ... | |
$lastOriginal = $gifObjCount;
|
||
// Now we add graphical objects to the gifbuilder-setup
|
||
reset($itemsConf);
|
||
$waArr = Array();
|
||
while (list($key,$val)=each($itemsConf)) {
|
||
foreach ($itemsConf as $key => $val) {
|
||
if (is_array($val)) {
|
||
$gifObjCount++;
|
||
$waArr[$key]['free']=$gifObjCount;
|
||
... | ... | |
if ($theValue=='IMAGE') {
|
||
if ($theValArr['file']=='GIFBUILDER') {
|
||
$temp_sKeyArray=t3lib_TStemplate::sortedKeyList($theValArr['file.']);
|
||
reset($temp_sKeyArray);
|
||
while(list(,$temp_theKey)=each($temp_sKeyArray)) {
|
||
foreach ($temp_sKeyArray as $temp_theKey) {
|
||
if ($theValArr['mask.'][$temp_theKey]=='TEXT') {
|
||
$gifCreator->data = $this->menuArr[$key] ? $this->menuArr[$key] : Array();
|
||
$theValArr['mask.'][$temp_theKey.'.'] = $gifCreator->checkTextObj($theValArr['mask.'][$temp_theKey.'.']);
|
||
... | ... | |
}
|
||
if ($theValArr['mask']=='GIFBUILDER') {
|
||
$temp_sKeyArray=t3lib_TStemplate::sortedKeyList($theValArr['mask.']);
|
||
reset($temp_sKeyArray);
|
||
while(list(,$temp_theKey)=each($temp_sKeyArray)) {
|
||
foreach ($temp_sKeyArray as $temp_theKey) {
|
||
if ($theValArr['mask.'][$temp_theKey]=='TEXT') {
|
||
$gifCreator->data = $this->menuArr[$key] ? $this->menuArr[$key] : Array();
|
||
$theValArr['mask.'][$temp_theKey.'.'] = $gifCreator->checkTextObj($theValArr['mask.'][$temp_theKey.'.']);
|
||
... | ... | |
// calculations
|
||
$sum=Array(0,0,0,0);
|
||
reset($waArr);
|
||
while (list($key,$val)=each($waArr)) {
|
||
if ($dConf[$key] =$itemsConf[$key]['distrib']) {
|
||
foreach ($waArr as $key => $val) {
|
||
if (($dConf[$key] = $itemsConf[$key]['distrib'])) {
|
||
$textBB = $gifCreator->objBB[$val['textNum']];
|
||
$dConf[$key] = str_replace('textX',$textBB[0],$dConf[$key]);
|
||
$dConf[$key] = str_replace('textY',$textBB[1],$dConf[$key]);
|
||
... | ... | |
}
|
||
}
|
||
$workArea = t3lib_div::intExplode(',',$gifCreator->calcOffset($this->mconf['dWorkArea']));
|
||
reset($waArr);
|
||
while (list($key,$val)=each($waArr)) {
|
||
foreach ($waArr as $key => $val) {
|
||
$index = $val['free'];
|
||
$gifCreator->setup[$index] = 'WORKAREA';
|
||
$workArea[2] = $dConf[$key][2] ? $dConf[$key][2] : $dConf[$key][0];
|
typo3/sysext/cms/tslib/class.tslib_pagegen.php (Arbeitskopie) | ||
---|---|---|
}
|
||
if ($GLOBALS['TSFE']->config['config']['MP_defaults']) {
|
||
$temp_parts = t3lib_div::trimExplode('|',$GLOBALS['TSFE']->config['config']['MP_defaults'],1);
|
||
reset($temp_parts);
|
||
while(list(,$temp_p)=each($temp_parts)) {
|
||
foreach ($temp_parts as $temp_p) {
|
||
list($temp_idP,$temp_MPp) = explode(':',$temp_p,2);
|
||
$temp_ids=t3lib_div::intExplode(',',$temp_idP);
|
||
reset($temp_ids);
|
||
while(list(,$temp_id)=each($temp_ids)) {
|
||
foreach ($temp_ids as $temp_id) {
|
||
$GLOBALS['TSFE']->MP_defaults[$temp_id]=$temp_MPp;
|
||
}
|
||
}
|
||
... | ... | |
$noMixedCase = trim(''.$GLOBALS['TSFE']->config['config']['sword_noMixedCase']);
|
||
$space = ($standAlone) ? '[[:space:]]' : '';
|
||
reset($GLOBALS['TSFE']->sWordList);
|
||
while (list($key,$val) = each($GLOBALS['TSFE']->sWordList)) {
|
||
foreach ($GLOBALS['TSFE']->sWordList as $val) {
|
||
if (trim($val)) {
|
||
if (!$noMixedCase) {
|
||
$GLOBALS['TSFE']->sWordRegEx.= $space.sql_regcase(quotemeta($val)).$space.'|';
|
||
... | ... | |
if (is_array($GLOBALS['TSFE']->pSetup['includeLibs.'])) {$incLibs=$GLOBALS['TSFE']->pSetup['includeLibs.'];} else {$incLibs=array();}
|
||
if (is_array($GLOBALS['TSFE']->tmpl->setup['includeLibs.'])) {$incLibs+=$GLOBALS['TSFE']->tmpl->setup['includeLibs.'];} // toplevel 'includeLibs' is added to the PAGE.includeLibs. In that way, PAGE-libs get first priority, because if the key already exist, it's not altered. (Due to investigation by me)
|
||
if (count($incLibs)) {
|
||
reset($incLibs);
|
||
while(list(,$theLib)=each($incLibs)) {
|
||
foreach ($incLibs as $theLib) {
|
||
if (!is_array($theLib) && $incFile=$GLOBALS['TSFE']->tmpl->getFileName($theLib)) {
|
||
$incFilesArray[] = $incFile;
|
||
}
|
||
... | ... | |
$conf=$GLOBALS['TSFE']->pSetup['meta.'];
|
||
if (is_array($conf)) {
|
||
reset($conf);
|
||
while(list($theKey,$theValue)=each($conf)) {
|
||
foreach ($conf as $theKey => $theValue) {
|
||
if (!strstr($theKey,'.') || !isset($conf[substr($theKey,0,-1)])) { // Only if 1) the property is set but not the value itself, 2) the value and/or any property
|
||
if (strstr($theKey,'.')) {
|
||
$theKey = substr($theKey,0,-1);
|
typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie) | ||
---|---|---|
$capSplit = $this->stdWrap($conf['captionSplit.']['token'], $conf['captionSplit.']['token.']);
|
||
if (!$capSplit) {$capSplit=chr(10);}
|
||
$captionArray = explode($capSplit, $this->cObjGetSingle($conf['captionSplit.']['cObject'], $conf['captionSplit.']['cObject.'], 'captionSplit.cObject'));
|
||
while (list($ca_key, $ca_val) = each($captionArray)) {
|
||
foreach ($captionArray as $ca_key => $ca_val) {
|
||
$captionArray[$ca_key] = $this->stdWrap(trim($captionArray[$ca_key]), $conf['captionSplit.']['stdWrap.']);
|
||
}
|
||
}
|
||
... | ... | |
if ($conf['tables'] && $conf['source']) {
|
||
$allowedTables = $conf['tables'];
|
||
if (is_array($conf['conf.'])) {
|
||
reset($conf['conf.']);
|
||
while(list($k)=each($conf['conf.'])) {
|
||
foreach ($conf['conf.'] as $k => $v) {
|
||
if (substr($k,-1)!='.') $allowedTables.=','.$k;
|
||
}
|
||
}
|
||
$loadDB = t3lib_div::makeInstance('FE_loadDBGroup');
|
||
$loadDB->start($conf['source'], $allowedTables);
|
||
reset($loadDB->tableArray);
|
||
while(list($table,)=each($loadDB->tableArray)) {
|
||
foreach ($loadDB->tableArray as $table => $v) {
|
||
if (is_array($GLOBALS['TCA'][$table])) {
|
||
$loadDB->additionalWhere[$table]=$this->enableFields($table);
|
||
}
|
||
... | ... | |
$cObj->setParent($this->data,$this->currentRecord);
|
||
$this->currentRecordNumber=0;
|
||
$this->currentRecordTotal = count($loadDB->itemArray);
|
||
reset($loadDB->itemArray);
|
||
while(list(,$val)=each($loadDB->itemArray)) {
|
||
foreach ($loadDB->itemArray as $val) {
|
||
$row = $data[$val['table']][$val['id']];
|
||
// Versioning preview:
|
||
... | ... | |
'gapLineCol' => $this->stdWrap($conf['gapLineCol'],$conf['gapLineCol.'])
|
||
);
|
||
$gapData = $GLOBALS['TSFE']->tmpl->splitConfArray($gapData,$rows-1);
|
||
reset($gapData);
|
||
while(list(,$val)=each($gapData)) {
|
||
foreach ($gapData as $val) {
|
||
$totalGapWidth+=intval($val['gapWidth']);
|
||
}
|
||
... | ... | |
} else {
|
||
array_push($GLOBALS['TSFE']->registerStack,$GLOBALS['TSFE']->register);
|
||
if (is_array($conf)) {
|
||
reset($conf);
|
||
while(list($theKey,$theValue)=each($conf)) {
|
||
foreach ($conf as $theKey => $theValue) {
|
||
if (!strstr($theKey,'.') || !isset($conf[substr($theKey,0,-1)])) { // Only if 1) the property is set but not the value itself, 2) the value and/or any property
|
||
if (strstr($theKey,'.')) {
|
||
$theKey = substr($theKey,0,-1);
|
||
... | ... | |
list($temp[2]) = explode('|',$dAA['value.'] ? $this->stdWrap($dAA['value'],$dAA['value.']) : $dAA['value']);
|
||
// If value Array is set, then implode those values.
|
||
if (is_array($dAA['valueArray.'])) {
|
||
reset($dAA['valueArray.']);
|
||
$temp_accum = array();
|
||
while (list($dAKey_vA,$dAA_vA) = each($dAA['valueArray.'])) {
|
||
foreach ($dAA['valueArray.'] as $dAKey_vA => $dAA_vA) {
|
||
if (is_array($dAA_vA) && !strcmp(intval($dAKey_vA).'.',$dAKey_vA)) {
|
||
$temp_vA=array();
|
||
list($temp_vA[0])= explode('=',$dAA_vA['label.'] ? $this->stdWrap($dAA_vA['label'],$dAA_vA['label.']) : $dAA_vA['label']);
|
||
... | ... | |
// hidden fields:
|
||
if (is_array($conf['hiddenFields.'])) {
|
||
reset($conf['hiddenFields.']);
|
||
while (list($hF_key,$hF_conf) = each($conf['hiddenFields.'])) {
|
||
foreach ($conf['hiddenFields.'] as $hF_key => $hF_conf) {
|
||
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)) {
|
||
... | ... | |
$temp_theStartId=t3lib_div::_GP('stype');
|
||
$rootLine = $GLOBALS['TSFE']->sys_page->getRootLine($temp_theStartId);
|
||
// The page MUST have a rootline with the Level0-page of the current site inside!!
|
||
while(list(,$val)=each($rootLine)) {
|
||
foreach ($rootLine as $val) {
|
||
if($val['uid']==$GLOBALS['TSFE']->tmpl->rootLine[0]['uid']) {
|
||
$theStartId=$temp_theStartId;
|
||
$theStartId = $temp_theStartId;
|
||
}
|
||
}
|
||
} else if (t3lib_div::_GP('stype')) {
|
||
... | ... | |
ksort($altRootLine);
|
||
if (count($altRootLine)) {
|
||
// check if the rootline has the real Level0 in it!!
|
||
reset($altRootLine);
|
||
$hitRoot=0;
|
||
$theNewRoot=array();
|
||
while(list(,$val)=each($altRootLine)) {
|
||
foreach ($altRootLine as $val) {
|
||
if($hitRoot || $val['uid']==$GLOBALS['TSFE']->tmpl->rootLine[0]['uid']) {
|
||
$hitRoot=1;
|
||
$theNewRoot[]=$val;
|
||
... | ... | |
if ($conf['nonCachedSubst']) { // NON-CACHED:
|
||
// Getting marks
|
||
if (is_array($conf['marks.'])) {
|
||
reset($conf['marks.']);
|
||
while(list($theKey,$theValue)=each($conf['marks.'])) {
|
||
foreach ($conf['marks.'] as $theKey => $theValue) {
|
||
if (!strstr($theKey,'.')) {
|
||
$content = str_replace(
|
||
$PRE.$theKey.$POST,
|
||
... | ... | |
// Getting subparts.
|
||
if (is_array($conf['subparts.'])) {
|
||
reset($conf['subparts.']);
|
||
while(list($theKey,$theValue)=each($conf['subparts.'])) {
|
||
foreach ($conf['subparts.'] as $theKey => $theValue) {
|
||
if (!strstr($theKey,'.')) {
|
||
$subpart = $this->getSubpart($content, $PRE.$theKey.$POST);
|
||
if ($subpart) {
|
||
... | ... | |
}
|
||
// Getting subpart wraps
|
||
if (is_array($conf['wraps.'])) {
|
||
reset($conf['wraps.']);
|
||
while(list($theKey,$theValue)=each($conf['wraps.'])) {
|
||
foreach ($conf['wraps.'] as $theKey => $theValue) {
|
||
if (!strstr($theKey,'.')) {
|
||
$subpart = $this->getSubpart($content, $PRE.$theKey.$POST);
|
||
if ($subpart) {
|
||
... | ... | |
} else { // CACHED
|
||
// Getting subparts.
|
||
if (is_array($conf['subparts.'])) {
|
||
reset($conf['subparts.']);
|
||
while(list($theKey,$theValue)=each($conf['subparts.'])) {
|
||
foreach ($conf['subparts.'] as $theKey => $theValue) {
|
||
if (!strstr($theKey,'.')) {
|
||
$subpart = $this->getSubpart($content, $PRE.$theKey.$POST);
|
||
if ($subpart) {
|
||
... | ... | |
}
|
||
// Getting marks
|
||
if (is_array($conf['marks.'])) {
|
||
reset($conf['marks.']);
|
||
while(list($theKey,$theValue)=each($conf['marks.'])) {
|
||
foreach ($conf['marks.'] as $theKey => $theValue) {
|
||
if (!strstr($theKey,'.')) {
|
||
$marks[$theKey]['name'] = $theValue;
|
||
$marks[$theKey]['conf'] = $conf['marks.'][$theKey.'.'];
|
||
... | ... | |
}
|
||
// Getting subpart wraps
|
||
if (is_array($conf['wraps.'])) {
|
||
reset($conf['wraps.']);
|
||
while(list($theKey,$theValue)=each($conf['wraps.'])) {
|
||
foreach ($conf['wraps.'] as $theKey => $theValue) {
|
||
if (!strstr($theKey,'.')) {
|
||
$wraps[$theKey]['name'] = $theValue;
|
||
$wraps[$theKey]['conf'] = $conf['wraps.'][$theKey.'.'];
|
||
... | ... | |
}
|
||
// Getting subparts
|
||
$subpartArray =array();
|
||
reset($subparts);
|
||
while(list($theKey,$theValue)=each($subparts)) {
|
||
foreach ($subparts as $theKey => $theValue) {
|
||
// Set current with the content of the subpart...
|
||
$this->data[$this->currentValKey] = $GLOBALS['TSFE']->register['SUBPART_'.$theKey];
|
||
// Get subpart cObject and substitute it!
|
||
... | ... | |
// Getting marks
|
||
$markerArray =array();
|
||
reset($marks);
|
||
while(list($theKey,$theValue)=each($marks)) {
|
||
foreach ($marks as $theKey => $theValue) {
|
||
$markerArray[$PRE.$theKey.$POST] = $this->cObjGetSingle($theValue['name'],$theValue['conf'],'marks.'.$theKey);
|
||
}
|
||
// Getting wraps
|
||
$subpartWraps =array();
|
||
reset($wraps);
|
||
while(list($theKey,$theValue)=each($wraps)) {
|
||
foreach ($wraps as $theKey => $theValue) {
|
||
$subpartWraps[$PRE.$theKey.$POST] = explode('|',$this->cObjGetSingle($theValue['name'],$theValue['conf'],'wraps.'.$theKey));
|
||
}
|
||
... | ... | |
// fetching params
|
||
$lines = explode(chr(10), $this->stdWrap($conf['params'],$conf['params.']));
|
||
while(list(,$l)=each($lines)) {
|
||
foreach ($lines as $l) {
|
||
$parts = explode('=', $l);
|
||
$parameter = strtolower(trim($parts[0]));
|
||
$value = trim($parts[1]);
|
||
... | ... | |
$storeArr=array();
|
||
// Finding subparts and substituting them with the subpart as a marker
|
||
reset($sPkeys);
|
||
while(list(,$sPK)=each($sPkeys)) {
|
||
foreach ($sPkeys as $sPK) {
|
||
$content =$this->substituteSubpart($content,$sPK,$sPK);
|
||
}
|
||
// Finding subparts and wrapping them with markers
|
||
reset($wPkeys);
|
||
while(list(,$wPK)=each($wPkeys)) {
|
||
foreach ($wPkeys as $wPK) {
|
||
$content =$this->substituteSubpart($content,$wPK,array($wPK,$wPK));
|
||
}
|
||
// traverse keys and quote them for reg ex.
|
||
reset($aKeys);
|
||
while(list($tK,$tV)=each($aKeys)) {
|
||
foreach ($aKeys as $tK => $tV) {
|
||
$aKeys[$tK] = preg_quote($tV, '/');
|
||
}
|
||
$regex = '/' . implode('|', $aKeys) . '/';
|
||
... | ... | |
$valueArr = array_merge($markContentArray,$subpartContentArray,$wrappedSubpartContentArray);
|
||
$wSCA_reg=array();
|
||
reset($storeArr['k']);
|
||
$content = '';
|
||
// traversin the keyList array and merging the static and dynamic content
|
||
while(list($n,$keyN)=each($storeArr['k'])) {
|
||
// traversing the keyList array and merging the static and dynamic content
|
||
foreach ($storeArr['k'] as $n => $keyN) {
|
||
$content.=$storeArr['c'][$n];
|
||
if (!is_array($valueArr[$keyN])) {
|
||
$content.=$valueArr[$keyN];
|
||
... | ... | |
*/
|
||
public function substituteMarkerInObject(&$tree, array $markContentArray) {
|
||
if (is_array ($tree)) {
|
||
reset($tree);
|
||
while(list($key, $value) = each($tree)) {
|
||
foreach ($tree as $key => $value) {
|
||
$this->substituteMarkerInObject ($tree[$key], $markContentArray);
|
||
}
|
||
} else {
|
||
... | ... | |
reset($items['sorting']);
|
||
$fullPath = trim($data_arr[4]);
|
||
$list_arr=Array();
|
||
while(list($key,)=each($items['sorting'])) {
|
||
foreach ($items['sorting'] as $key => $v) {
|
||
$list_arr[]= $fullPath ? $path.'/'.$items['files'][$key] : $items['files'][$key];
|
||
}
|
||
return implode(',',$list_arr);
|
||
... | ... | |
$mimetype='';
|
||
if ($fI['extension']) {
|
||
$mimeTypes = t3lib_div::trimExplode(',',$conf['mimeTypes'],1);
|
||
reset($mimeTypes);
|
||
while(list(,$v)=each($mimeTypes)) {
|
||
foreach ($mimeTypes as $v) {
|
||
$parts = explode('=',$v,2);
|
||
if (strtolower($fI['extension']) == strtolower(trim($parts[0]))) {
|
||
$mimetype = '&mimeType='.rawurlencode(trim($parts[1]));
|
||
... | ... | |
function calc($val) {
|
||
$parts= t3lib_div::splitCalc($val,'+-*/');
|
||
$value=0;
|
||
reset($parts);
|
||
while(list(,$part)=each($parts)) {
|
||
foreach ($parts as $part) {
|
||
$theVal = $part[1];
|
||
$sign = $part[0];
|
||
if ((string)intval($theVal)==(string)$theVal) {
|
||
... | ... | |
*/
|
||
function calcIntExplode($delim, $string) {
|
||
$temp = explode($delim,$string);
|
||
while(list($key,$val)=each($temp)) {
|
||
foreach ($temp as $key => $val) {
|
||
$temp[$key]=intval(tslib_cObj::calc($val));
|
||
}
|
||
return $temp;
|
||
... | ... | |
$htmlParser = t3lib_div::makeInstance('t3lib_parsehtml');
|
||
$parts = $htmlParser->splitIntoBlock($tags,$theValue);
|
||
reset($parts);
|
||
while(list($k,$v)=each($parts)) {
|
||
foreach ($parts as $k => $v) {
|
||
if ($k%2) { // font:
|
||
$tagName=strtolower($htmlParser->getFirstTagName($v));
|
||
$cfg=$conf['externalBlocks.'][$tagName.'.'];
|
||
... | ... | |
}
|
||
}
|
||
reset($parts);
|
||
while(list($k,$v)=each($parts)) {
|
||
foreach ($parts as $k => $v) {
|
||
if ($k%2) {
|
||
$tag=$htmlParser->getFirstTag($v);
|
||
$tagName=strtolower($htmlParser->getFirstTagName($v));
|
||
... | ... | |
}
|
||
} elseif($cfg['HTMLtableCells']) {
|
||
$rowParts = $htmlParser->splitIntoBlock('tr',$parts[$k]);
|
||
reset($rowParts);
|
||
while(list($kk,$vv)=each($rowParts)) {
|
||
foreach ($rowParts as $kk => $vv) {
|
||
if ($kk%2) {
|
||
$colParts = $htmlParser->splitIntoBlock('td,th',$vv);
|
||
reset($colParts);
|
||
$cc=0;
|
||
while(list($kkk,$vvv)=each($colParts)) {
|
||
foreach ($colParts as $kkk => $vvv) {
|
||
if ($kkk%2) {
|
||
$cc++;
|
||
$tag=$htmlParser->getFirstTag($vvv);
|
||
... | ... | |
if (!is_array($currentTag)) { // These operations should only be performed on code outside the tags...
|
||
// Constants
|
||
if ($conf['constants'] && is_array($GLOBALS['TSFE']->tmpl->setup['constants.'])) {
|
||
reset($GLOBALS['TSFE']->tmpl->setup['constants.']);
|
||
while(list($key,$val)=each($GLOBALS['TSFE']->tmpl->setup['constants.'])) {
|
||
$tmpConstants = $GLOBALS['TSFE']->tmpl->setup['constants.'];
|
||
if ($conf['constants'] && is_array($tmpConstants)) {
|
||
foreach ($tmpConstants as $key => $val) {
|
||
if (is_string($val)) {
|
||
$data = str_replace('###'.$key.'###', $val, $data);
|
||
}
|
||
... | ... | |
if (is_array($conf['short.'])) {
|
||
$shortWords = $conf['short.'];
|
||
krsort($shortWords);
|
||
reset($shortWords);
|
||
while(list($key,$val)=each($shortWords)) {
|
||
foreach ($shortWords as $key => $val) {
|
||
if (is_string($val)) {
|
||
$data = str_replace($key, $val, $data);
|
||
}
|
||
... | ... | |
if ($currentTag[1]) {
|
||
$params=t3lib_div::get_tag_attributes($currentTag[1]);
|
||
if (is_array($params)) {
|
||
reset($params);
|
||
while(list($option,$val)=each($params)) {
|
||
foreach ($params as $option => $val) {
|
||
$this->parameters[strtolower($option)]=$val;
|
||
}
|
||
}
|
||
... | ... | |
if (!strcmp('',$theValue)) return '';
|
||
while(list($k,$l)=each($lParts)) {
|
||
foreach ($lParts as $k => $l) {
|
||
$sameBeginEnd=0;
|
||
$l=trim($l);
|
||
$attrib=array();
|
||
... | ... | |
if ($uTagName) {
|
||
// Setting common attributes
|
||
if (is_array($conf['addAttributes.'][$uTagName.'.'])) {
|
||
reset($conf['addAttributes.'][$uTagName.'.']);
|
||
while(list($kk,$vv)=each($conf['addAttributes.'][$uTagName.'.'])) {
|
||
foreach ($conf['addAttributes.'][$uTagName.'.'] as $kk => $vv) {
|
||
if (!is_array($vv)) {
|
||
if ((string)$conf['addAttributes.'][$uTagName.'.'][$kk.'.']['setOnly']=='blank') {
|
||
if (!strcmp($attrib[$kk],'')) $attrib[$kk]=$vv;
|
||
... | ... | |
// The image onto the background
|
||
$gifCreator->combineExec($tempScale['m_bgImg'],$tempFileInfo[3],$tempScale['m_mask'],$dest);
|
||
// Unlink the temp-images...
|
||
reset($tempScale);
|
||
while(list(,$file)=each($tempScale)) {
|
||
foreach ($tempScale as $file) {
|
||
if (@is_file($file)) {
|
||
unlink($file);
|
||
}
|
||
... | ... | |
return $this->data[trim($field)];
|
||
} else {
|
||
$sections = t3lib_div::trimExplode('//',$field,1);
|
||
while (list(,$k)=each($sections)) {
|
||
foreach ($sections as $k) {
|
||
if (strcmp($this->data[$k],'')) return $this->data[$k];
|
||
}
|
||
}
|
||
... | ... | |
$output = array();
|
||
foreach ($values as $value) {
|
||
// Traverse the items-array...
|
||
reset($TCA[$table]['columns'][$field]['config']['items']);
|
||
while (list($key,$item)=each($TCA[$table]['columns'][$field]['config']['items'])) {
|
||
foreach ($TCA[$table]['columns'][$field]['config']['items'] as $item) {
|
||
// ... and return the first found label where the value was equal to $key
|
||
if (!strcmp($item[1],trim($value))) {
|
||
$output[] = $GLOBALS['TSFE']->sL($item[0]);
|
||
... | ... | |
*/
|
||
function keywords($content) {
|
||
$listArr = preg_split('/[,;' . chr(10) . ']/', $content);
|
||
reset($listArr);
|
||
while(list($k,$v)=each($listArr)) {
|
||
foreach ($listArr as $k => $v) {
|
||
$listArr[$k]=trim($v);
|
||
}
|
||
return implode(',',$listArr);
|
||
... | ... | |
*/
|
||
function clearTSProperties($TSArr,$propList) {
|
||
$list = explode(',',$propList);
|
||
while(list(,$prop)=each($list)) {
|
||
foreach ($list as $prop) {
|
||
$prop = trim($prop);
|
||
unset($TSArr[$prop]);
|
||
unset($TSArr[$prop.'.']);
|
||
... | ... | |
*/
|
||
function joinTSarrays($conf,$old_conf) {
|
||
if (is_array($old_conf)) {
|
||
reset($old_conf);
|
||
while(list($key,$val)=each($old_conf)) {
|
||
foreach ($old_conf as $key => $val) {
|
||
if (is_array($val)) {
|
||
$conf[$key] = $this->joinTSarrays($conf[$key],$val);
|
||
} else {
|
||
... | ... | |
if ($tmplObjNumber && $gifbuilderConf[$tmplObjNumber]=='TEXT') {
|
||
$textArr = $this->linebreaks($text,$chars,$maxLines);
|
||
$angle = intval($gifbuilderConf[$tmplObjNumber.'.']['angle']);
|
||
reset($textArr);
|
||
while(list($c,$textChunk)=each($textArr)) {
|
||
foreach ($textArr as $c => $textChunk) {
|
||
$index = $tmplObjNumber+1+($c*2);
|
||
// Workarea
|
||
$gifbuilderConf = $this->clearTSProperties($gifbuilderConf,$index);
|
||
... | ... | |
$lines = explode(chr(10),$string);
|
||
$lineArr=Array();
|
||
$c=0;
|
||
while(list(,$paragraph)=each($lines)) {
|
||
foreach ($lines as $paragraph) {
|
||
$words = explode(' ',$paragraph);
|
||
while(list(,$word)=each($words)) {
|
||
foreach ($words as $word) {
|
||
if (strlen($lineArr[$c].$word)>$chars) {
|
||
$c++;
|
||
}
|
||
... | ... | |
function getUpdateJS($dataArray, $formName, $arrPrefix, $fieldList) {
|
||
$JSPart='';
|
||
$updateValues=t3lib_div::trimExplode(',',$fieldList);
|
||
reset($updateValues);
|
||
while(list(,$fKey)=each($updateValues)) {
|
||
foreach ($updateValues as $fKey) {
|
||
$value = $dataArray[$fKey];
|
||
if (is_array($value)) {
|
||
reset($value);
|
||
while(list(,$Nvalue)=each($value)) {
|
||
foreach ($value as $Nvalue) {
|
||
$JSPart.="
|
||
updateForm('".$formName."','".$arrPrefix."[".$fKey."][]',".t3lib_div::quoteJSvalue($Nvalue, true).");";
|
||
}
|
||
... | ... | |
// points to the field (integer) that holds the fe_group-id of the creator fe_user's first group
|
||
if ($GLOBALS['TCA'][$table]['ctrl']['fe_crgroup_id']) {
|
||
$values = t3lib_div::intExplode(',',$groupList);
|
||
while(list(,$theGroupUid)=each($values)) {
|
||
foreach ($values as $theGroupUid) {
|
||
if ($theGroupUid) {$OR_arr[]=$GLOBALS['TCA'][$table]['ctrl']['fe_crgroup_id'].'='.$theGroupUid;}
|
||
}
|
||
}
|
||
... | ... | |
$searchFields = explode(',',$searchFieldList);
|
||
$kw = preg_split('/[ ,]/', $sw);
|
||
while(list(,$val)=each($kw)) {
|
||
foreach ($kw as $val) {
|
||
$val = trim($val);
|
||
$where_p = array();
|
||
if (strlen($val)>=2) {
|
||
$val = $TYPO3_DB->escapeStrForLike($TYPO3_DB->quoteStr($val,$searchTable),$searchTable);
|
||
reset($searchFields);
|
||
while(list(,$field)=each($searchFields)) {
|
||
foreach ($searchFields as $field) {
|
||
$where_p[] = $prefixTableName.$field.' LIKE \'%'.$val.'%\'';
|
||
}
|
||
}
|
||
... | ... | |
$content = '';
|
||
if (is_array($setup)) {
|
||
$sKeyArray=t3lib_TStemplate::sortedKeyList($setup);
|
||
reset($sKeyArray);
|
||
while(list(,$theKey)=each($sKeyArray)) {
|
||
foreach ($sKeyArray as $theKey) {
|
||
$theValue=$setup[$theKey];
|
||
if (intval($theKey) && $conf=$setup[$theKey.'.']) {
|
||
switch($theValue) {
|
- « Previous
- 1
- 2
- Next »