Project

General

Profile

Bug #17001 ยป 0005009.patch

Administrator Admin, 2007-02-17 11:08

View differences:

typo3/sysext/cms/tslib/class.tslib_pagegen.php (Arbeitskopie)
function isAllowedLinkVarValue($haystack,$needle) {
$OK = false;
if ($needle=='int' || $needle=='integer') { // Integer
if ($needle=='int' || $needle=='integer') { // Integer, usage e.g. "(int)" or "(integer)"
if (t3lib_div::testInt($haystack)) {
$OK = true;
......
$OK = true;
}
} elseif (strstr($needle,'-')) { // Range
} elseif (strstr($needle,'..')) { // Range, usage e.g. "(-4..-2)" or "(12..18)"
if (t3lib_div::testInt($haystack)) {
$range = explode('-',$needle);
$range = explode('..',$needle);
if ($range[0] <= $haystack && $range[1] >= $haystack) {
$OK = true;
}
}
} elseif (strstr($needle,'|')) { // List
} elseif (strstr($needle,'|')) { // List, usage e.g. "(word1|word2|word3)"
$haystack = str_replace(' ','',$haystack); // Trim the input
if (strstr('|'.$needle.'|', '|'.$haystack.'|')) {
    (1-1/1)