Bug #19891 » 10231v2.patch
typo3/mod/tools/em/class.em_index.php (working copy) | ||
---|---|---|
}
|
||
}
|
||
//
|
||
$XclassParts = split('if \(defined\([\'"]TYPO3_MODE[\'"]\) && \$TYPO3_CONF_VARS\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]',$fContent,2);
|
||
$XclassParts = preg_split('/if \(defined\([\'"]TYPO3_MODE[\'"]\) && \$TYPO3_CONF_VARS\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]/',$fContent,2);
|
||
if (count($XclassParts)==2) {
|
||
unset($reg);
|
||
preg_match('/^\[[\'"]([[:alnum:]_\/\.]*)[\'"]\]/',$XclassParts[1],$reg);
|
typo3/mod/tools/em/class.nusoap.php (working copy) | ||
---|---|---|
*/
|
||
function parseCookie($cookie_str) {
|
||
$cookie_str = str_replace('; ', ';', $cookie_str) . ';';
|
||
$data = split(';', $cookie_str);
|
||
$data = explode(';', $cookie_str);
|
||
$value_str = $data[0];
|
||
$cookie_param = 'domain=';
|
typo3/sysext/cms/tslib/class.tslib_content.php (working copy) | ||
---|---|---|
while(list($tK,$tV)=each($aKeys)) {
|
||
$aKeys[$tK]=quotemeta($tV);
|
||
}
|
||
$regex = implode('|',$aKeys);
|
||
$regex = '/'.implode('|',$aKeys).'/';
|
||
// Doing regex's
|
||
$storeArr['c'] = split($regex,$content);
|
||
preg_match_all('/'.$regex.'/',$content,$keyList);
|
||
$storeArr['c'] = preg_split($regex,$content);
|
||
preg_match_all($regex,$content,$keyList);
|
||
$storeArr['k']=$keyList[0];
|
||
// Setting cache:
|
||
$this->substMarkerCache[$storeKey] = $storeArr;
|
||
... | ... | |
if ($GLOBALS['TSFE']->no_cache && $conf['sword'] && is_array($GLOBALS['TSFE']->sWordList) && $GLOBALS['TSFE']->sWordRegEx) {
|
||
$newstring = '';
|
||
do {
|
||
$pieces = split($GLOBALS['TSFE']->sWordRegEx,$data,2);
|
||
$pieces = preg_split('/'.$GLOBALS['TSFE']->sWordRegEx.'/',$data,2);
|
||
$newstring.=$pieces[0];
|
||
$match_len = strlen($data)-(strlen($pieces[0])+strlen($pieces[1]));
|
||
if (strstr($pieces[0],'<') || strstr($pieces[0],'>')) {
|
||
... | ... | |
* @return string Cleaned up string, keywords will be separated by a comma only.
|
||
*/
|
||
function keywords($content) {
|
||
$listArr = split(',|;|'.chr(10),$content);
|
||
$listArr = preg_split('/[,;'.chr(10).']/',$content);
|
||
reset($listArr);
|
||
while(list($k,$v)=each($listArr)) {
|
||
$listArr[$k]=trim($v);
|
||
... | ... | |
$emailContent = trim($msg);
|
||
if ($emailContent) {
|
||
$parts = split(chr(10),$emailContent,2); // First line is subject
|
||
$parts = explode(chr(10),$emailContent,2); // First line is subject
|
||
$subject=trim($parts[0]);
|
||
$plain_message=trim($parts[1]);
|
||
... | ... | |
$where = '';
|
||
if ($sw) {
|
||
$searchFields = explode(',',$searchFieldList);
|
||
$kw = split('[ ,]',$sw);
|
||
$kw = preg_split('/[ ,]/',$sw);
|
||
while(list(,$val)=each($kw)) {
|
||
$val = trim($val);
|
typo3/sysext/cms/tslib/class.tslib_fe.php (working copy) | ||
---|---|---|
$res = t3lib_div::getURL($code, 1, $headerArr);
|
||
// Header and content are separated by an empty line
|
||
list($header,$content) = split("\r\n\r\n", $res, 2);
|
||
list($header,$content) = preg_split("/[\r\n\r\n]/", $res, 2);
|
||
$content.= "\r\n";
|
||
if (false === $res) {
|
typo3/sysext/cms/layout/class.tx_cms_layout.php (working copy) | ||
---|---|---|
* @return string Processed output.
|
||
*/
|
||
function wordWrapper($content,$max=50,$char=' -') {
|
||
$array = split(' |'.chr(10),$content);
|
||
$array = preg_split('/[ '.chr(10).']/',$content);
|
||
foreach($array as $val) {
|
||
if (strlen($val)>$max) {
|
||
$content=str_replace($val,substr(chunk_split($val,$max,$char),0,-1),$content);
|
typo3/sysext/install/mod/class.tx_install.php (working copy) | ||
---|---|---|
* @return [type] ...
|
||
*/
|
||
function suggestTCAFieldDefinition($fieldName,$fieldInfo) {
|
||
list($type,$len) = split(' |\(|\)',$fieldInfo,3);
|
||
list($type,$len) = preg_split('/ |\(|\)/',$fieldInfo,3);
|
||
switch($type) {
|
||
case 'int':
|
||
$out="
|
typo3/view_help.php (working copy) | ||
---|---|---|
global $TCA,$BE_USER,$TCA_DESCR;
|
||
// Split references by comma, vert.line or linebreak
|
||
$items = split(',|'.chr(10),$value);
|
||
$items = preg_split('/[,|'.chr(10).']/',$value);
|
||
$lines = array();
|
||
foreach($items as $val) {
|
t3lib/class.t3lib_div.php (working copy) | ||
---|---|---|
}
|
||
// create_function() returns a string:
|
||
if (!is_string($getValueFunc)) {
|
||
$getValueFunc = null;
|
||
$getValueFunc = null;
|
||
}
|
||
// Do the filtering:
|
||
if (is_array($keepItems) && count($keepItems)) {
|
||
... | ... | |
$tag_tmp = trim(substr($tag_tmp,1)); // Removes = chars.
|
||
} else {
|
||
// There are '' around the value. We look for the next ' ' or '>'
|
||
$reg = split('[[:space:]=]',$tag_tmp,2);
|
||
$reg = preg_split('/[[:space:]=]/',$tag_tmp,2);
|
||
$value[] = trim($reg[0]);
|
||
$tag_tmp = trim(substr($tag_tmp,strlen($reg[0]),1).$reg[1]);
|
||
}
|
t3lib/class.t3lib_matchcondition.php (working copy) | ||
---|---|---|
$test = trim($test);
|
||
if (strlen($test)) {
|
||
if (preg_match('/^\*.+\*$/',$test)) {
|
||
$allLanguages = split('[,;]',t3lib_div::getIndpEnv('HTTP_ACCEPT_LANGUAGE'));
|
||
$allLanguages = preg_split('/[,;]/',t3lib_div::getIndpEnv('HTTP_ACCEPT_LANGUAGE'));
|
||
if (in_array(substr($test,1,-1), $allLanguages)) {return true;}
|
||
} else {
|
||
if (t3lib_div::getIndpEnv('HTTP_ACCEPT_LANGUAGE') == $test) {return true;}
|
||
... | ... | |
{ return t3lib_div::compat_version($value); }
|
||
break;
|
||
case 'userFunc':
|
||
$values = split('\(|\)',$value);
|
||
$values = preg_split('/[\(\)]/',$value);
|
||
$funcName=trim($values[0]);
|
||
$funcValue = t3lib_div::trimExplode(',',$values[1]);
|
||
$pre = $GLOBALS['TSFE']->TYPO3_CONF_VARS['FE']['userFuncClassPrefix'];
|
t3lib/class.t3lib_cs.php (working copy) | ||
---|---|---|
if (!$detectedType) $detectedType = ereg('[[:space:]]*0x([[:alnum:]]*)[[:space:]]+0x([[:alnum:]]*)[[:space:]]+',$value) ? 'whitespaced' : 'ms-token';
|
||
if ($detectedType=='ms-token') {
|
||
list($hexbyte,$utf8) = split('=|:',$value,3);
|
||
list($hexbyte,$utf8) = preg_split('/[=:]/',$value,3);
|
||
} elseif ($detectedType=='whitespaced') {
|
||
$regA=array();
|
||
ereg('[[:space:]]*0x([[:alnum:]]*)[[:space:]]+0x([[:alnum:]]*)[[:space:]]+',$value,$regA);
|
||
... | ... | |
while (!feof($fh)) {
|
||
$line = fgets($fh,4096);
|
||
// has a lot of info
|
||
list($char,$name,$cat,,,$decomp,,,$num,,,,$upper,$lower,$title,) = split(';', rtrim($line));
|
||
list($char,$name,$cat,,,$decomp,,,$num,,,,$upper,$lower,$title,) = explode(';', rtrim($line));
|
||
$ord = hexdec($char);
|
||
if ($ord > 0xFFFF) break; // only process the BMP
|
||
... | ... | |
case '<vertical>':
|
||
continue 2;
|
||
}
|
||
$decomposition["U+$char"] = split(' ',$match[2]);
|
||
$decomposition["U+$char"] = explode(' ',$match[2]);
|
||
}
|
||
}
|
||
fclose($fh);
|
||
... | ... | |
if ($cond == '' || $cond{0} == '#') {
|
||
$utf8_char = $this->UnumberToChar(hexdec($char));
|
||
if ($char != $lower) {
|
||
$arr = split(' ',$lower);
|
||
$arr = explode(' ',$lower);
|
||
for ($i=0; isset($arr[$i]); $i++) $arr[$i] = $this->UnumberToChar(hexdec($arr[$i]));
|
||
$utf8CaseFolding['toLower'][$utf8_char] = implode('',$arr);
|
||
}
|
||
if ($char != $title && $title != $upper) {
|
||
$arr = split(' ',$title);
|
||
$arr = explode(' ',$title);
|
||
for ($i=0; isset($arr[$i]); $i++) $arr[$i] = $this->UnumberToChar(hexdec($arr[$i]));
|
||
$utf8CaseFolding['toTitle'][$utf8_char] = implode('',$arr);
|
||
}
|
||
if ($char != $upper) {
|
||
$arr = split(' ',$upper);
|
||
$arr = explode(' ',$upper);
|
||
for ($i=0; isset($arr[$i]); $i++) $arr[$i] = $this->UnumberToChar(hexdec($arr[$i]));
|
||
$utf8CaseFolding['toUpper'][$utf8_char] = implode('',$arr);
|
||
}
|
||
... | ... | |
if ($line{0} != '#' && trim($line) != '') {
|
||
list($char,$translit) = t3lib_div::trimExplode(';', $line);
|
||
if (!$translit) $omit["U+$char"] = 1;
|
||
$decomposition["U+$char"] = split(' ', $translit);
|
||
$decomposition["U+$char"] = explode(' ', $translit);
|
||
}
|
||
}
|
t3lib/class.t3lib_htmlmail.php (working copy) | ||
---|---|---|
$attribRegex = $this->tag_regex(array('img','table','td','tr','body','iframe','script','input','embed'));
|
||
// split the document by the beginning of the above tags
|
||
$codepieces = split($attribRegex, $html_code);
|
||
$codepieces = preg_split($attribRegex, $html_code);
|
||
$len = strlen($codepieces[0]);
|
||
$pieces = count($codepieces);
|
||
$reg = array();
|
||
... | ... | |
// Extracting stylesheets
|
||
$attribRegex = $this->tag_regex(array('link'));
|
||
// Split the document by the beginning of the above tags
|
||
$codepieces = split($attribRegex, $html_code);
|
||
$codepieces = preg_split($attribRegex, $html_code);
|
||
$pieces = count($codepieces);
|
||
for ($i = 1; $i < $pieces; $i++) {
|
||
$dummy = eregi("[^>]*", $codepieces[$i], $reg);
|
||
... | ... | |
}
|
||
// fixes javascript rollovers
|
||
$codepieces = split(quotemeta(".src"), $html_code);
|
||
$codepieces = preg_split('/'.quotemeta(".src").'/', $html_code);
|
||
$pieces = count($codepieces);
|
||
$expr = "^[^".quotemeta("\"").quotemeta("'")."]*";
|
||
for($i = 1; $i < $pieces; $i++) {
|
||
... | ... | |
public function extractHyperLinks() {
|
||
$html_code = $this->theParts['html']['content'];
|
||
$attribRegex = $this->tag_regex(array('a','form','area'));
|
||
$codepieces = split($attribRegex, $html_code); // Splits the document by the beginning of the above tags
|
||
$codepieces = preg_split($attribRegex, $html_code); // Splits the document by the beginning of the above tags
|
||
$len = strlen($codepieces[0]);
|
||
$pieces = count($codepieces);
|
||
for($i = 1; $i < $pieces; $i++) {
|
||
... | ... | |
if (strpos(' '.$htmlCode,'<frame ')) {
|
||
$attribRegex = $this->tag_regex('frame');
|
||
// Splits the document by the beginning of the above tags
|
||
$codepieces = split($attribRegex, $htmlCode, 1000000);
|
||
$codepieces = preg_split($attribRegex, $htmlCode, 1000000);
|
||
$pieces = count($codepieces);
|
||
for($i = 1; $i < $pieces; $i++) {
|
||
$dummy = eregi("[^>]*", $codepieces[$i], $reg);
|
||
... | ... | |
*/
|
||
public function tag_regex($tags) {
|
||
$tags = (!is_array($tags) ? array($tags) : $tags);
|
||
$regexp = '';
|
||
$regexp = '/';
|
||
$c = count($tags);
|
||
foreach($tags as $tag) {
|
||
$c--;
|
||
$regexp .= '<' . sql_regcase($tag) . "[[:space:]]" . (($c) ? '|' : '');
|
||
}
|
||
return $regexp;
|
||
return $regexp . '/';
|
||
}
|
||
... | ... | |
// Find attribute
|
||
while ($tag) {
|
||
$value = '';
|
||
$reg = split("[[:space:]=>]",$tag,2);
|
||
$reg = preg_split('/[[:space:]=>]/',$tag,2);
|
||
$attrib = $reg[0];
|
||
$tag = ltrim(substr($tag,strlen($attrib),$tagLen));
|
t3lib/class.t3lib_tceforms.php (working copy) | ||
---|---|---|
$editFieldList=array_unique(t3lib_div::trimExplode(',',$list,1));
|
||
foreach($editFieldList as $theFieldC) {
|
||
list($theField,$palFields) = split('\[|\]',$theFieldC);
|
||
list($theField,$palFields) = preg_split('/\[|\]/',$theFieldC);
|
||
$theField = trim($theField);
|
||
$palFields = trim($palFields);
|
||
if ($TCA[$table]['columns'][$theField]) {
|
||
... | ... | |
// Kasper's comment (kept for history): Maybe there is a better way to do this than store the HTML for the new element in rawurlencoded format - maybe it even breaks with certain charsets? But for now this works...
|
||
$this->additionalJS_post = $additionalJS_post_saved;
|
||
$this->additionalJS_submit = $additionalJS_submit_saved;
|
||
$new = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.new', 1);
|
||
$new = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.new', 1);
|
||
$newElementsLinks[]= '<a href="#" onclick="'.htmlspecialchars($onClickInsert).'">
|
||
<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_el.gif','width="11" height="12"').' alt="' . $new . '" title="' . $new . '" align="absmiddle" />' .
|
||
htmlspecialchars(t3lib_div::fixed_lgd_cs($this->sL($nCfg['tx_templavoila']['title']),30)) . '</a>';
|
||
... | ... | |
$output.= '
|
||
<div style="padding: 5px 0px 5px 20px;">
|
||
<a href="#" onclick="'.htmlspecialchars('flexFormToggleSubs("'.$idTagPrefix.'"); return false;').'">
|
||
<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/pil2right.gif','width="7" height="12"').' align="absmiddle" alt="' .
|
||
<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/pil2right.gif','width="7" height="12"').' align="absmiddle" alt="' .
|
||
$toggleAll . '" title="' . $toggleAll . '" />
|
||
<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/pil2right.gif','width="7" height="12"').' align="absmiddle" alt="' .
|
||
$toggleAll . '" title="' . $toggleAll . '" />' . $toggleAll . '
|
- « Previous
- 1
- 2
- Next »