Bug #15441 » 2302.diff
t3lib/class.gzip_encode.php (working copy) | ||
---|---|---|
if (!$encoding) return;
|
||
$this->encoding = $encoding;
|
||
if (strtolower($level) == 'true' || $level === true) {
|
||
if (t3lib_div::strtolower($level) == 'true' || $level === true) {
|
||
$level = $this->get_complevel();
|
||
}
|
||
$this->level = $level;
|
||
... | ... | |
}
|
||
}
|
||
?>
|
||
?>
|
t3lib/class.t3lib_basicfilefunc.php (working copy) | ||
---|---|---|
* @see typo3/init.php, t3lib_userAuthGroup::returnFilemounts()
|
||
*/
|
||
function init($mounts, $f_ext) {
|
||
$this->f_ext['webspace']['allow'] = t3lib_div::uniqueList(strtolower($f_ext['webspace']['allow']));
|
||
$this->f_ext['webspace']['deny'] = t3lib_div::uniqueList(strtolower($f_ext['webspace']['deny']));
|
||
$this->f_ext['ftpspace']['allow'] = t3lib_div::uniqueList(strtolower($f_ext['ftpspace']['allow']));
|
||
$this->f_ext['ftpspace']['deny'] = t3lib_div::uniqueList(strtolower($f_ext['ftpspace']['deny']));
|
||
$this->f_ext['webspace']['allow'] = t3lib_div::uniqueList(t3lib_div::strtolower($f_ext['webspace']['allow']));
|
||
$this->f_ext['webspace']['deny'] = t3lib_div::uniqueList(t3lib_div::strtolower($f_ext['webspace']['deny']));
|
||
$this->f_ext['ftpspace']['allow'] = t3lib_div::uniqueList(t3lib_div::strtolower($f_ext['ftpspace']['allow']));
|
||
$this->f_ext['ftpspace']['deny'] = t3lib_div::uniqueList(t3lib_div::strtolower($f_ext['ftpspace']['deny']));
|
||
$this->mounts = $mounts;
|
||
$this->webPath = t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT');
|
||
... | ... | |
*/
|
||
function is_allowed($iconkey,$type) {
|
||
if (isset($this->f_ext[$type])) {
|
||
$ik = strtolower($iconkey);
|
||
$ik = t3lib_div::strtolower($iconkey);
|
||
if ($ik) {
|
||
// If the extension is found amongst the allowed types, we return true immediately
|
||
if ($this->f_ext[$type]['allow']=='*' || t3lib_div::inList($this->f_ext[$type]['allow'],$ik)) return true;
|
t3lib/class.t3lib_befunc.php (working copy) | ||
---|---|---|
$lines[$fname].='<br /><br />';
|
||
} else {
|
||
$lines[$fname] = '<hr />';
|
||
if ($config) $lines[$fname].='<strong>'.strtoupper(htmlspecialchars($config)).'</strong><br />';
|
||
if ($config) $lines[$fname].='<strong>'.t3lib_div::strtoupper(htmlspecialchars($config)).'</strong><br />';
|
||
if ($config) $lines[$fname].='<br />';
|
||
}
|
||
}
|
||
... | ... | |
public static function getDomainStartPage($domain, $path = '') {
|
||
if (t3lib_extMgm::isLoaded('cms')) {
|
||
$domain = explode(':', $domain);
|
||
$domain = strtolower(ereg_replace('\.$', '', $domain[0]));
|
||
$domain = t3lib_div::strtolower(ereg_replace('\.$', '', $domain[0]));
|
||
// path is calculated.
|
||
$path = trim(ereg_replace('\/[^\/]*$', '', $path));
|
||
// stuff:
|
t3lib/class.t3lib_beuserauth.php (working copy) | ||
---|---|---|
if (defined('TYPO3_cliMode') && TYPO3_cliMode) {
|
||
if (!$this->user['uid']) {
|
||
if (substr($GLOBALS['MCONF']['name'],0,5)=='_CLI_') {
|
||
$userName = strtolower($GLOBALS['MCONF']['name']);
|
||
$userName = t3lib_div::strtolower($GLOBALS['MCONF']['name']);
|
||
$this->setBeUserByName($userName);
|
||
if ($this->user['uid']) {
|
||
if (!$this->isAdmin()) {
|
t3lib/class.t3lib_cli.php (working copy) | ||
---|---|---|
*/
|
||
function cli_keyboardInput_yes($msg='') {
|
||
echo $msg.' (Yes/No + return): '; // ONLY makes sense to echo it out since we are awaiting keyboard input - that cannot be silenced...
|
||
return t3lib_div::inList('y,yes',strtolower($this->cli_keyboardInput()));
|
||
return t3lib_div::inList('y,yes',t3lib_div::strtolower($this->cli_keyboardInput()));
|
||
}
|
||
/**
|
||
... | ... | |
*/
|
||
function cli_help() {
|
||
foreach($this->cli_help as $key => $value) {
|
||
$this->cli_echo(strtoupper($key).":\n");
|
||
$this->cli_echo(t3lib_div::strtoupper($key).":\n");
|
||
switch($key) {
|
||
case 'synopsis':
|
||
$optStr = '';
|
||
... | ... | |
}
|
||
}
|
||
?>
|
||
?>
|
t3lib/class.t3lib_clipboard.php (working copy) | ||
---|---|---|
if ($table=='_FILE') { // Rendering files/directories on the clipboard:
|
||
if (@file_exists($v) && t3lib_div::isAllowedAbsPath($v)) {
|
||
$fI = pathinfo($v);
|
||
$icon = is_dir($v) ? 'folder.gif' : t3lib_BEfunc::getFileIcon(strtolower($fI['extension']));
|
||
$icon = is_dir($v) ? 'folder.gif' : t3lib_BEfunc::getFileIcon(t3lib_div::strtolower($fI['extension']));
|
||
$size = ' ('.t3lib_div::formatSize(filesize($v)).'bytes)';
|
||
$icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/fileicons/'.$icon,'width="18" height="16"').' border="0" hspace="20" class="absmiddle" title="'.htmlspecialchars($fI['basename'].$size).'" alt="" />';
|
||
$thumb = $this->clipData['_setThumb'] ? (t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],$fI['extension']) ? t3lib_BEfunc::getThumbNail($this->backPath.'thumbs.php',$v,' vspace="4"') : '') :'';
|
t3lib/class.t3lib_cs.php (working copy) | ||
---|---|---|
* @author Martin Kutschker <martin.t.kutschker@blackbox.net>
|
||
*/
|
||
function parse_charset($charset) {
|
||
$charset = trim(strtolower($charset));
|
||
$charset = trim(t3lib_div::strtolower($charset));
|
||
if (isset($this->synonyms[$charset])) $charset = $this->synonyms[$charset];
|
||
return $charset;
|
||
... | ... | |
* @author Martin Kutschker <martin.t.kutschker@blackbox.net>
|
||
*/
|
||
function get_locale_charset($locale) {
|
||
$locale = strtolower($locale);
|
||
$locale = t3lib_div::strtolower($locale);
|
||
// exact locale specific charset?
|
||
if (isset($this->locale_to_charset[$locale])) return $this->locale_to_charset[$locale];
|
t3lib/class.t3lib_div.php (working copy) | ||
---|---|---|
public static function gif_compress($theFile, $type) {
|
||
$gfxConf = $GLOBALS['TYPO3_CONF_VARS']['GFX'];
|
||
$returnCode='';
|
||
if ($gfxConf['gif_compress'] && strtolower(substr($theFile,-4,4))=='.gif') { // GIF...
|
||
if ($gfxConf['gif_compress'] && t3lib_div::strtolower(substr($theFile,-4,4))=='.gif') { // GIF...
|
||
if (($type=='IM' || !$type) && $gfxConf['im'] && $gfxConf['im_path_lzw']) { // IM
|
||
$cmd = t3lib_div::imageMagickCommand('convert', '"'.$theFile.'" "'.$theFile.'"', $gfxConf['im_path_lzw']);
|
||
exec($cmd);
|
||
... | ... | |
if ($GLOBALS['TYPO3_CONF_VARS']['FE']['png_to_gif']
|
||
&& $GLOBALS['TYPO3_CONF_VARS']['GFX']['im']
|
||
&& $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw']
|
||
&& strtolower(substr($theFile,-4,4))=='.png'
|
||
&& t3lib_div::strtolower(substr($theFile,-4,4))=='.png'
|
||
&& @is_file($theFile)) { // IM
|
||
$newFile = substr($theFile,0,-4).'.gif';
|
||
$cmd = t3lib_div::imageMagickCommand('convert', '"'.$theFile.'" "'.$newFile.'"', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw']);
|
||
... | ... | |
*/
|
||
public static function read_png_gif($theFile,$output_png=0) {
|
||
if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['im'] && @is_file($theFile)) {
|
||
$ext = strtolower(substr($theFile,-4,4));
|
||
$ext = t3lib_div::strtolower(substr($theFile,-4,4));
|
||
if (
|
||
((string)$ext=='.png' && $output_png) ||
|
||
((string)$ext=='.gif' && !$output_png)
|
||
... | ... | |
* @return boolean True if $ip is of IPv6 format.
|
||
*/
|
||
public static function validIPv6($ip) {
|
||
$uppercaseIP = strtoupper($ip);
|
||
$uppercaseIP = t3lib_div::strtoupper($ip);
|
||
$regex = '/^(';
|
||
$regex.= '(([\dA-F]{1,4}:){7}[\dA-F]{1,4})|';
|
||
... | ... | |
$reg='';
|
||
if ( ereg('(.*)\.([^\.]*$)',$info['file'],$reg) ) {
|
||
$info['filebody'] = $reg[1];
|
||
$info['fileext'] = strtolower($reg[2]);
|
||
$info['fileext'] = t3lib_div::strtolower($reg[2]);
|
||
$info['realFileext'] = $reg[2];
|
||
} else {
|
||
$info['filebody'] = $info['file'];
|
||
... | ... | |
* @ignore
|
||
*/
|
||
public static function danish_strtoupper($string) {
|
||
$value = strtoupper($string);
|
||
$value = t3lib_div::strtoupper($string);
|
||
return strtr($value, '???????????????', '???????????????');
|
||
}
|
||
... | ... | |
$name = '';
|
||
}
|
||
} else {
|
||
if ($key = strtolower(ereg_replace('[^a-zA-Z0-9]','',$val))) {
|
||
if ($key = t3lib_div::strtolower(ereg_replace('[^a-zA-Z0-9]','',$val))) {
|
||
$attributes[$key] = '';
|
||
$name = $key;
|
||
}
|
||
... | ... | |
if ($xhtmlSafe) {
|
||
$newArr=array();
|
||
foreach($arr as $p => $v) {
|
||
if (!isset($newArr[strtolower($p)])) $newArr[strtolower($p)] = htmlspecialchars($v);
|
||
if (!isset($newArr[t3lib_div::strtolower($p)])) $newArr[t3lib_div::strtolower($p)] = htmlspecialchars($v);
|
||
}
|
||
$arr = $newArr;
|
||
}
|
||
... | ... | |
// Find files+directories:
|
||
if (@is_dir($path)) {
|
||
$extensionList = strtolower($extensionList);
|
||
$extensionList = t3lib_div::strtolower($extensionList);
|
||
$d = dir($path);
|
||
if (is_object($d)) {
|
||
while($entry=$d->read()) {
|
||
if (@is_file($path.'/'.$entry)) {
|
||
$fI = pathinfo($entry);
|
||
$key = md5($path.'/'.$entry); // Don't change this ever - extensions may depend on the fact that the hash is an md5 of the path! (import/export extension)
|
||
if ((!strlen($extensionList) || t3lib_div::inList($extensionList,strtolower($fI['extension']))) && (!strlen($excludePattern) || !preg_match('/^'.$excludePattern.'$/',$entry))) {
|
||
if ((!strlen($extensionList) || t3lib_div::inList($extensionList,t3lib_div::strtolower($fI['extension']))) && (!strlen($excludePattern) || !preg_match('/^'.$excludePattern.'$/',$entry))) {
|
||
$filearray[$key]=($prependPath?$path.'/':'').$entry;
|
||
if ($order=='mtime') {$sortarray[$key]=filemtime($path.'/'.$entry);}
|
||
elseif ($order) {$sortarray[$key]=$entry;}
|
||
... | ... | |
// Load class file if not found:
|
||
if (!class_exists($className)) {
|
||
if (substr($className,0,6)=='t3lib_') {
|
||
t3lib_div::requireOnce(PATH_t3lib.'class.'.strtolower($className).'.php');
|
||
t3lib_div::requireOnce(PATH_t3lib.'class.'.t3lib_div::strtolower($className).'.php');
|
||
}
|
||
}
|
||
... | ... | |
if (TYPO3_OS == 'WIN') {
|
||
$facility = LOG_USER;
|
||
} else {
|
||
$facility = constant('LOG_'.strtoupper($destination));
|
||
$facility = constant('LOG_'.t3lib_div::strtoupper($destination));
|
||
}
|
||
openlog($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'], LOG_ODELAY, $facility);
|
||
}
|
||
... | ... | |
if(!$path) { $path = $gfxConf['im_path']; }
|
||
$im_version = strtolower($gfxConf['im_version_5']);
|
||
$im_version = t3lib_div::strtolower($gfxConf['im_version_5']);
|
||
$combineScript = $gfxConf['im_combine_filename'] ? trim($gfxConf['im_combine_filename']) : 'combine';
|
||
if($command==='combine') { // This is only used internally, has no effect outside
|
||
... | ... | |
}
|
||
}
|
||
?>
|
||
?>
|
t3lib/class.t3lib_extmgm.php (working copy) | ||
---|---|---|
list($place, $modRef) = t3lib_div::trimExplode(':', $position, 1);
|
||
$mods = t3lib_div::trimExplode(',', $TBE_MODULES[$main], 1);
|
||
if (!in_array($sub, $mods)) {
|
||
switch(strtolower($place)) {
|
||
switch(t3lib_div::strtolower($place)) {
|
||
case 'after':
|
||
case 'before':
|
||
$pointer = 0;
|
||
reset($mods);
|
||
while(list($k, $m) = each($mods)) {
|
||
if (!strcmp($m, $modRef)) {
|
||
$pointer = strtolower($place)=='after'?$k+1:$k;
|
||
$pointer = t3lib_div::strtolower($place)=='after'?$k+1:$k;
|
||
}
|
||
}
|
||
array_splice(
|
||
... | ... | |
);
|
||
break;
|
||
default:
|
||
if (strtolower($place)=='top') {
|
||
if (t3lib_div::strtolower($place)=='top') {
|
||
array_unshift($mods, $sub);
|
||
} else {
|
||
array_push($mods, $sub);
|
||
... | ... | |
// TYPO3_OS is not yet defined
|
||
$os_type = stristr(PHP_OS, 'win')&&!stristr(PHP_OS, 'darwin')?'WIN':'UNIX';
|
||
$os = t3lib_div::trimExplode(',', strtoupper($T3_SERVICES[$serviceType][$serviceKey]['os']));
|
||
$os = t3lib_div::trimExplode(',', t3lib_div::strtoupper($T3_SERVICES[$serviceType][$serviceKey]['os']));
|
||
if (!in_array($os_type, $os)) {
|
||
t3lib_extMgm::deactivateService($serviceType, $serviceKey);
|
t3lib/class.t3lib_flexformtools.php (working copy) | ||
---|---|---|
// Convert charset:
|
||
if ($this->convertCharset) {
|
||
$xmlHeaderAttributes = t3lib_div::xmlGetHeaderAttribs($xmlData);
|
||
$storeInCharset = strtolower($xmlHeaderAttributes['encoding']);
|
||
$storeInCharset = t3lib_div::strtolower($xmlHeaderAttributes['encoding']);
|
||
if ($storeInCharset) {
|
||
$currentCharset = $GLOBALS['LANG']->charSet;
|
||
$xmlData = $GLOBALS['LANG']->csConvObj->conv($xmlData,$storeInCharset,$currentCharset,1);
|
||
... | ... | |
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_flexformtools.php']) {
|
||
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_flexformtools.php']);
|
||
}
|
||
?>
|
||
?>
|
t3lib/class.t3lib_formmail.php (working copy) | ||
---|---|---|
$Plain_val = ($convCharset && strlen($val)) ? $GLOBALS['TSFE']->csConvObj->conv($val,$GLOBALS['TSFE']->renderCharset,$this->charset,0) : $val;
|
||
$HTML_val = ($convCharset && strlen($val)) ? $GLOBALS['TSFE']->csConvObj->conv(htmlspecialchars($val),$GLOBALS['TSFE']->renderCharset,$this->charset,1) : htmlspecialchars($val);
|
||
$Plain_content.= strtoupper($key).': '.$space.$Plain_val."\n".$space;
|
||
$HTML_content.= '<tr><td bgcolor="#eeeeee"><font face="Verdana" size="1"><b>'.strtoupper($key).'</b></font></td><td bgcolor="#eeeeee"><font face="Verdana" size="1">'.nl2br($HTML_val).' </font></td></tr>';
|
||
$Plain_content.= t3lib_div::strtoupper($key).': '.$space.$Plain_val."\n".$space;
|
||
$HTML_content.= '<tr><td bgcolor="#eeeeee"><font face="Verdana" size="1"><b>'.t3lib_div::strtoupper($key).'</b></font></td><td bgcolor="#eeeeee"><font face="Verdana" size="1">'.nl2br($HTML_val).' </font></td></tr>';
|
||
}
|
||
}
|
||
}
|
t3lib/class.t3lib_htmlmail.php (working copy) | ||
---|---|---|
$pieces = count($codepieces);
|
||
$reg = array();
|
||
for ($i = 1; $i < $pieces; $i++) {
|
||
$tag = strtolower(strtok(substr($html_code,$len+1,10),' '));
|
||
$tag = t3lib_div::strtolower(strtok(substr($html_code,$len+1,10),' '));
|
||
$len += strlen($tag)+strlen($codepieces[$i])+2;
|
||
$dummy = eregi("[^>]*", $codepieces[$i], $reg);
|
||
$attributes = $this->get_tag_attributes($reg[0]); // Fetches the attributes for the tag
|
||
... | ... | |
// fetches the attributes for the tag
|
||
$attributes = $this->get_tag_attributes($reg[0]);
|
||
$imageData = array();
|
||
if (strtolower($attributes['rel']) == 'stylesheet' && $attributes['href']) {
|
||
if (t3lib_div::strtolower($attributes['rel']) == 'stylesheet' && $attributes['href']) {
|
||
// Finds the src or background attribute
|
||
$imageData['ref'] = $attributes['href'];
|
||
// Finds out if the value had quotes around it
|
||
... | ... | |
$len = strlen($codepieces[0]);
|
||
$pieces = count($codepieces);
|
||
for($i = 1; $i < $pieces; $i++) {
|
||
$tag = strtolower(strtok(substr($html_code,$len+1,10)," "));
|
||
$tag = t3lib_div::strtolower(strtok(substr($html_code,$len+1,10)," "));
|
||
$len += strlen($tag) + strlen($codepieces[$i]) + 2;
|
||
$dummy = eregi("[^>]*", $codepieces[$i], $reg);
|
||
... | ... | |
$reg = '';
|
||
if (ereg("(.*)\.([^\.]*$)", $info['file'], $reg)) {
|
||
$info['filebody'] = $reg[1];
|
||
$info['fileext'] = strtolower($reg[2]);
|
||
$info['fileext'] = t3lib_div::strtolower($reg[2]);
|
||
$info['realFileext'] = $reg[2];
|
||
} else {
|
||
$info['filebody'] = $info['file'];
|
||
... | ... | |
}
|
||
}
|
||
}
|
||
$attributes[strtolower($attrib)] = $value;
|
||
$attributes[t3lib_div::strtolower($attrib)] = $value;
|
||
$safetyCounter--;
|
||
if ($safetyCounter < 0) break;
|
||
}
|
t3lib/class.t3lib_install.php (working copy) | ||
---|---|---|
if ($parts[0]=='CREATE' && $parts[1]=='TABLE') {
|
||
$table = str_replace( '`', '', $parts[2]);
|
||
if (TYPO3_OS=='WIN') { // tablenames are always lowercase on windows!
|
||
$table = strtolower($table);
|
||
$table = t3lib_div::strtolower($table);
|
||
}
|
||
}
|
||
} else {
|
||
... | ... | |
if ($table) {
|
||
// table names are always lowercase on Windows!
|
||
if (TYPO3_OS == 'WIN') {
|
||
$table = strtolower($table);
|
||
$table = t3lib_div::strtolower($table);
|
||
}
|
||
$sqlLines = explode(chr(10), $lineContent);
|
||
foreach ($sqlLines as $k=>$v) {
|
t3lib/class.t3lib_loadmodules.php (working copy) | ||
---|---|---|
*/
|
||
function checkModAccess($name,$MCONF) {
|
||
if ($MCONF['access']) {
|
||
$access=strtolower($MCONF['access']);
|
||
$access=t3lib_div::strtolower($MCONF['access']);
|
||
// Checking if admin-access is required
|
||
if (strstr($access,'admin')) { // If admin-permissions is required then return true if user is admin
|
||
if ($this->BE_USER->isAdmin()) {return true;}
|
t3lib/class.t3lib_matchcondition.php (working copy) | ||
---|---|---|
}
|
||
//
|
||
$agent=strtolower(trim($useragent));
|
||
$agent=t3lib_div::strtolower(trim($useragent));
|
||
// pda
|
||
if( strstr($agent, 'avantgo')) {
|
||
return 'pda';
|
t3lib/class.t3lib_page.php (working copy) | ||
---|---|---|
* @see tslib_fe::checkAndSetAlias(), tslib_cObj::typoLink()
|
||
*/
|
||
function getPageIdFromAlias($alias) {
|
||
$alias = strtolower($alias);
|
||
$alias = t3lib_div::strtolower($alias);
|
||
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'alias='.$GLOBALS['TYPO3_DB']->fullQuoteStr($alias, 'pages').' AND pid>=0 AND pages.deleted=0'); // "AND pid>=0" because of versioning (means that aliases sent MUST be online!)
|
||
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
|
||
$GLOBALS['TYPO3_DB']->sql_free_result($res);
|
||
... | ... | |
*/
|
||
function getDomainStartPage($domain, $path='',$request_uri='') {
|
||
$domain = explode(':',$domain);
|
||
$domain = strtolower(ereg_replace('\.$','',$domain[0]));
|
||
$domain = t3lib_div::strtolower(ereg_replace('\.$','',$domain[0]));
|
||
// Removing extra trailing slashes
|
||
$path = trim(ereg_replace('\/[^\/]*$','',$path));
|
||
// Appending to domain string
|
t3lib/class.t3lib_parsehtml.php (working copy) | ||
---|---|---|
$tagsArray = array();
|
||
$tagsArray['tag_start'] = $this->getFirstTag($v);
|
||
$tagsArray['tag_end'] = '</'.$firstTagName.'>';
|
||
$tagsArray['tag_name'] = strtolower($firstTagName);
|
||
$tagsArray['tag_name'] = t3lib_div::strtolower($firstTagName);
|
||
$tagsArray['add_level'] = 1;
|
||
$tagsArray['content'] = $this->splitIntoBlockRecursiveProc($tag,$this->removeFirstAndLastTag($v),$procObj,$callBackContent,$callBackTags,$level+$tagsArray['add_level']);
|
||
... | ... | |
$matches = array();
|
||
if (preg_match('/^\s*\<([^\s\>]+)(\s|\>)/', $str, $matches)===1) {
|
||
if (!$preserveCase) {
|
||
return strtoupper($matches[1]);
|
||
return t3lib_div::strtoupper($matches[1]);
|
||
}
|
||
return $matches[1];
|
||
}
|
||
... | ... | |
}
|
||
} else {
|
||
if ($namekey = preg_replace('/[^[:alnum:]_\:\-]/','',$val)) {
|
||
$name = strtolower($namekey);
|
||
$name = t3lib_div::strtolower($namekey);
|
||
$attributesMeta[$name]=array();
|
||
$attributesMeta[$name]['origTag']=$namekey;
|
||
$attributes[$name] = '';
|
||
... | ... | |
* @return array Analyse data.
|
||
*/
|
||
function checkTagTypeCounts($content,$blockTags='a,b,blockquote,body,div,em,font,form,h1,h2,h3,h4,h5,h6,i,li,map,ol,option,p,pre,select,span,strong,table,td,textarea,tr,u,ul', $soloTags='br,hr,img,input,area') {
|
||
$content = strtolower($content);
|
||
$content = t3lib_div::strtolower($content);
|
||
$analyzedOutput=array();
|
||
$analyzedOutput['counts']=array(); // Counts appearances of start-tags
|
||
$analyzedOutput['errors']=array(); // Lists ERRORS
|
||
... | ... | |
$endTag = $firstChar=='/' ? 1 : 0;
|
||
$tagContent = substr($tok,$endTag,$tagEnd-$endTag);
|
||
$tagParts = preg_split('/\s+/s',$tagContent,2);
|
||
$tagName = strtolower($tagParts[0]);
|
||
$tagName = t3lib_div::strtolower($tagParts[0]);
|
||
if (isset($tags[$tagName])) {
|
||
if (is_array($tags[$tagName])) { // If there is processing to do for the tag:
|
||
... | ... | |
$newTagAttrib = array();
|
||
if (!($tList = $tags[$tagName]['_allowedAttribs'])) {
|
||
// Just explode attribts for tag once
|
||
$tList = $tags[$tagName]['_allowedAttribs'] = t3lib_div::trimExplode(',',strtolower($tags[$tagName]['allowedAttribs']),1);
|
||
$tList = $tags[$tagName]['_allowedAttribs'] = t3lib_div::trimExplode(',',t3lib_div::strtolower($tags[$tagName]['allowedAttribs']),1);
|
||
}
|
||
foreach ($tList as $allowTag) {
|
||
if (isset($tagAttrib[0][$allowTag])) $newTagAttrib[$allowTag]=$tagAttrib[0][$allowTag];
|
||
... | ... | |
if ($params['always'] || isset($tagAttrib[0][$attr])) {
|
||
if ($params['trim']) {$tagAttrib[0][$attr]=trim($tagAttrib[0][$attr]);}
|
||
if ($params['intval']) {$tagAttrib[0][$attr]=intval($tagAttrib[0][$attr]);}
|
||
if ($params['lower']) {$tagAttrib[0][$attr]=strtolower($tagAttrib[0][$attr]);}
|
||
if ($params['upper']) {$tagAttrib[0][$attr]=strtoupper($tagAttrib[0][$attr]);}
|
||
if ($params['lower']) {$tagAttrib[0][$attr]=t3lib_div::strtolower($tagAttrib[0][$attr]);}
|
||
if ($params['upper']) {$tagAttrib[0][$attr]=t3lib_div::strtoupper($tagAttrib[0][$attr]);}
|
||
if ($params['range']) {
|
||
if (isset($params['range'][1])) {
|
||
$tagAttrib[0][$attr]=t3lib_div::intInRange($tagAttrib[0][$attr],intval($params['range'][0]),intval($params['range'][1]));
|
||
... | ... | |
$tagEnd = substr($v,-2)=='/>' ? ' />' : '>'; // Detect tag-ending so that it is re-applied correctly.
|
||
$firstTagName = $this->getFirstTagName($v); // The 'name' of the first tag
|
||
$somethingDone=0;
|
||
$prefix = isset($alternatives[strtoupper($firstTagName)]) ? $alternatives[strtoupper($firstTagName)] : $main_prefix;
|
||
switch(strtolower($firstTagName)) {
|
||
$prefix = isset($alternatives[t3lib_div::strtoupper($firstTagName)]) ? $alternatives[t3lib_div::strtoupper($firstTagName)] : $main_prefix;
|
||
switch(t3lib_div::strtolower($firstTagName)) {
|
||
// background - attribute:
|
||
case 'td':
|
||
case 'body':
|
||
... | ... | |
if ($somethingDone) {
|
||
$tagParts = preg_split('/\s+/s',$v,2);
|
||
$tagParts[1]=$this->compileTagAttribs($params[0],$params[1]);
|
||
$parts[$k] = '<'.trim(strtolower($firstTagName).' '.$tagParts[1]).$tagEnd;
|
||
$parts[$k] = '<'.trim(t3lib_div::strtolower($firstTagName).' '.$tagParts[1]).$tagEnd;
|
||
}
|
||
}
|
||
}
|
||
... | ... | |
$endTag = $firstChar=='/' ? 1 : 0;
|
||
$tagContent = substr($tok,$endTag,$tagEnd-$endTag);
|
||
$tagParts = preg_split('/\s+/s',$tagContent,2);
|
||
$tagName = strtolower($tagParts[0]);
|
||
$tagName = t3lib_div::strtolower($tagParts[0]);
|
||
if (!strcmp($tagList,'') || in_array($tagName,$tagsArray)) {
|
||
$contentParts[$k] = '<'.$subparts[0].'>'.$subparts[1];
|
||
} else $contentParts[$k] = '<'.$tok;
|
||
... | ... | |
reset($str);
|
||
foreach ($str as $k => $v) {
|
||
if (!$flag) {
|
||
$str[$k] = strtoupper($v);
|
||
$str[$k] = t3lib_div::strtoupper($v);
|
||
}
|
||
}
|
||
if ($cacheKey) $this->caseShift_cache[$cacheKey]=$str;
|
||
} else {
|
||
$str = $this->caseShift_cache[$cacheKey];
|
||
}
|
||
} elseif (!$flag) { $str = strtoupper($str); }
|
||
} elseif (!$flag) { $str = t3lib_div::strtoupper($str); }
|
||
return $str;
|
||
}
|
||
... | ... | |
$accu=array();
|
||
foreach ($tagAttrib as $k =>$v) {
|
||
if ($xhtmlClean) {
|
||
$attr=strtolower($k);
|
||
$attr=t3lib_div::strtolower($k);
|
||
if (strcmp($v,'') || isset($meta[$k]['dashType'])) {
|
||
$attr.='="'.htmlspecialchars($v).'"';
|
||
}
|
||
... | ... | |
*/
|
||
function HTMLparserConfig($TSconfig,$keepTags=array()) {
|
||
// Allow tags (base list, merged with incoming array)
|
||
$alTags = array_flip(t3lib_div::trimExplode(',',strtolower($TSconfig['allowTags']),1));
|
||
$alTags = array_flip(t3lib_div::trimExplode(',',t3lib_div::strtolower($TSconfig['allowTags']),1));
|
||
$keepTags = array_merge($alTags,$keepTags);
|
||
// Set config properties.
|
||
if (is_array($TSconfig['tags.'])) {
|
||
reset($TSconfig['tags.']);
|
||
while(list($key,$tagC)=each($TSconfig['tags.'])) {
|
||
if (!is_array($tagC) && $key==strtolower($key)) {
|
||
if (!is_array($tagC) && $key==t3lib_div::strtolower($key)) {
|
||
if (!strcmp($tagC,'0')) unset($keepTags[$key]);
|
||
if (!strcmp($tagC,'1') && !isset($keepTags[$key])) $keepTags[$key]=1;
|
||
}
|
||
... | ... | |
reset($TSconfig['tags.']);
|
||
foreach ($TSconfig['tags.'] as $key => $tagC) {
|
||
if (is_array($tagC) && $key==strtolower($key)) {
|
||
if (is_array($tagC) && $key==t3lib_div::strtolower($key)) {
|
||
$key=substr($key,0,-1);
|
||
if (!is_array($keepTags[$key])) $keepTags[$key]=array();
|
||
if (is_array($tagC['fixAttrib.'])) {
|
||
... | ... | |
}
|
||
// localNesting
|
||
if ($TSconfig['localNesting']) {
|
||
$lN = t3lib_div::trimExplode(',',strtolower($TSconfig['localNesting']),1);
|
||
$lN = t3lib_div::trimExplode(',',t3lib_div::strtolower($TSconfig['localNesting']),1);
|
||
while(list(,$tn)=each($lN)) {
|
||
if (isset($keepTags[$tn])) {
|
||
$keepTags[$tn]['nesting']=1;
|
||
... | ... | |
}
|
||
}
|
||
if ($TSconfig['globalNesting']) {
|
||
$lN = t3lib_div::trimExplode(',',strtolower($TSconfig['globalNesting']),1);
|
||
$lN = t3lib_div::trimExplode(',',t3lib_div::strtolower($TSconfig['globalNesting']),1);
|
||
while(list(,$tn)=each($lN)) {
|
||
if (isset($keepTags[$tn])) {
|
||
if (!is_array($keepTags[$tn])) $keepTags[$tn]=array();
|
||
... | ... | |
}
|
||
}
|
||
if ($TSconfig['rmTagIfNoAttrib']) {
|
||
$lN = t3lib_div::trimExplode(',',strtolower($TSconfig['rmTagIfNoAttrib']),1);
|
||
$lN = t3lib_div::trimExplode(',',t3lib_div::strtolower($TSconfig['rmTagIfNoAttrib']),1);
|
||
while(list(,$tn)=each($lN)) {
|
||
if (isset($keepTags[$tn])) {
|
||
if (!is_array($keepTags[$tn])) $keepTags[$tn]=array();
|
||
... | ... | |
}
|
||
}
|
||
if ($TSconfig['noAttrib']) {
|
||
$lN = t3lib_div::trimExplode(',',strtolower($TSconfig['noAttrib']),1);
|
||
$lN = t3lib_div::trimExplode(',',t3lib_div::strtolower($TSconfig['noAttrib']),1);
|
||
while(list(,$tn)=each($lN)) {
|
||
if (isset($keepTags[$tn])) {
|
||
if (!is_array($keepTags[$tn])) $keepTags[$tn]=array();
|
||
... | ... | |
}
|
||
}
|
||
if ($TSconfig['removeTags']) {
|
||
$lN = t3lib_div::trimExplode(',',strtolower($TSconfig['removeTags']),1);
|
||
$lN = t3lib_div::trimExplode(',',t3lib_div::strtolower($TSconfig['removeTags']),1);
|
||
while(list(,$tn)=each($lN)) {
|
||
$keepTags[$tn]=array();
|
||
$keepTags[$tn]['allowedAttribs']=0;
|
||
... | ... | |
// STILL VERY EXPERIMENTAL!!
|
||
if ($conf['xhtml']) {
|
||
if ($endTag) { // Endtags are just set lowercase right away
|
||
$value = strtolower($value);
|
||
$value = t3lib_div::strtolower($value);
|
||
} elseif (substr($value,0,4)!='<!--') { // ... and comments are ignored.
|
||
$inValue = substr($value,1,(substr($value,-2)=='/>'?-2:-1)); // Finding inner value with out < >
|
||
list($tagName,$tagP)=preg_split('/\s+/s',$inValue,2); // Separate attributes and tagname
|
||
$tagName = strtolower($tagName);
|
||
$tagName = t3lib_div::strtolower($tagName);
|
||
// Process attributes
|
||
$tagAttrib = $this->get_tag_attributes($tagP);
|
t3lib/class.t3lib_parsehtml_proc.php (working copy) | ||
---|---|---|
// Init:
|
||
$this->procOptions = $thisConfig['proc.'];
|
||
$this->preserveTags = strtoupper(implode(',',t3lib_div::trimExplode(',',$this->procOptions['preserveTags'])));
|
||
$this->preserveTags = t3lib_div::strtoupper(implode(',',t3lib_div::trimExplode(',',$this->procOptions['preserveTags'])));
|
||
|
||
// dynamic configuration of blockElementList
|
||
if ($this->procOptions['blockElementList']) {
|
||
... | ... | |
case 'ts_transform':
|
||
case 'css_transform':
|
||
$value = str_replace(chr(13),'',$value); // Has a very disturbing effect, so just remove all '13' - depend on '10'
|
||
$this->allowedClasses = t3lib_div::trimExplode(',',strtoupper($this->procOptions['allowedClasses']),1);
|
||
$this->allowedClasses = t3lib_div::trimExplode(',',t3lib_div::strtoupper($this->procOptions['allowedClasses']),1);
|
||
$value = $this->TS_transform_db($value,$cmd=='css_transform');
|
||
break;
|
||
case 'ts_strip':
|
||
... | ... | |
$pU = parse_url($absRef);
|
||
$pI=pathinfo($pU['path']);
|
||
if (t3lib_div::inList('gif,png,jpeg,jpg',strtolower($pI['extension']))) {
|
||
if (t3lib_div::inList('gif,png,jpeg,jpg',t3lib_div::strtolower($pI['extension']))) {
|
||
$filename = t3lib_div::shortMD5($absRef).'.'.$pI['extension'];
|
||
$origFilePath = PATH_site.$this->rteImageStorageDir().'RTEmagicP_'.$filename;
|
||
$C_origFilePath = PATH_site.$this->rteImageStorageDir().'RTEmagicC_'.$filename.'.'.$pI['extension'];
|
||
... | ... | |
$absRef = trim($attribArray['src']);
|
||
// Unless the src attribute is already pointing to an external URL:
|
||
if (strtolower(substr($absRef,0,4))!='http') {
|
||
if (t3lib_div::strtolower(substr($absRef,0,4))!='http') {
|
||
$attribArray['src'] = substr($attribArray['src'],strlen($this->relBackPath));
|
||
// if site is in a subpath (eg. /~user_jim/) this path needs to be removed because it will be added with $siteUrl
|
||
$attribArray['src'] = preg_replace('#^'.preg_quote($sitePath,'#').'#','',$attribArray['src']);
|
||
... | ... | |
// Detects if a file is found in site-root OR is a simulateStaticDocument.
|
||
list($rootFileDat) = explode('?',$link_param);
|
||
$rFD_fI = pathinfo($rootFileDat);
|
||
if (trim($rootFileDat) && !strstr($link_param,'/') && (@is_file(PATH_site.$rootFileDat) || t3lib_div::inList('php,html,htm',strtolower($rFD_fI['extension'])))) {
|
||
if (trim($rootFileDat) && !strstr($link_param,'/') && (@is_file(PATH_site.$rootFileDat) || t3lib_div::inList('php,html,htm',t3lib_div::strtolower($rFD_fI['extension'])))) {
|
||
$href = $siteUrl.$link_param;
|
||
} elseif($urlChar && (strstr($link_param,'//') || !$fileChar || $urlChar<$fileChar)) { // url (external): If doubleSlash or if a '.' comes before a '/'.
|
||
if (!ereg('^[a-z]*://',trim(strtolower($link_param)))) {$scheme='http://';} else {$scheme='';}
|
||
if (!ereg('^[a-z]*://',trim(t3lib_div::strtolower($link_param)))) {$scheme='http://';} else {$scheme='';}
|
||
$href = $scheme.$link_param;
|
||
} elseif($fileChar) { // file (internal)
|
||
$href = $siteUrl.$link_param;
|
||
... | ... | |
$page = t3lib_BEfunc::getRecord('pages', $idPart);
|
||
if (is_array($page)) { // Page must exist...
|
||
$href = $siteUrl.'?id='.$link_param;
|
||
} else if(strtolower(substr($link_param, 0, 7)) == 'record:') {
|
||
} else if(t3lib_div::strtolower(substr($link_param, 0, 7)) == 'record:') {
|
||
// linkHandler - allowing links to start with "record:"
|
||
$href = $link_param;
|
||
} else {
|
||
... | ... | |
// Init:
|
||
$tag=$this->getFirstTag($v);
|
||
$tagName=strtolower($this->getFirstTagName($v));
|
||
$tagName=t3lib_div::strtolower($this->getFirstTagName($v));
|
||
// Process based on the tag:
|
||
switch($tagName) {
|
||
... | ... | |
$parts[$k2]=preg_replace('/['.preg_quote(chr(10).chr(13)).']+/','',$parts[$k2]); // remove all linesbreaks!
|
||
$parts[$k2]=$this->defaultTStagMapping($parts[$k2],'db');
|
||
$parts[$k2]=$this->cleanFontTags($parts[$k2],0,0,0);
|
||
$parts[$k2] = $this->HTMLcleaner_db($parts[$k2],strtolower($this->procOptions['allowTagsInTypolists']?$this->procOptions['allowTagsInTypolists']:'br,font,b,i,u,a,img,span,strong,em'));
|
||
$parts[$k2] = $this->HTMLcleaner_db($parts[$k2],t3lib_div::strtolower($this->procOptions['allowTagsInTypolists']?$this->procOptions['allowTagsInTypolists']:'br,font,b,i,u,a,img,span,strong,em'));
|
||
}
|
||
if ($tagName=='ol') { $params=' type="1"'; } else { $params=''; }
|
||
$blockSplit[$k]='<typolist'.$params.'>'.chr(10).implode(chr(10),$parts).chr(10).'</typolist>'.$lastBR;
|
||
... | ... | |
// Init:
|
||
$tag = $this->getFirstTag($v);
|
||
$tagName = strtolower($this->getFirstTagName($v));
|
||
$tagName = t3lib_div::strtolower($this->getFirstTagName($v));
|
||
$attribArray = $this->get_tag_attributes_classic($tag);
|
||
// Based on tagname, we do transformations:
|
||
... | ... | |
} else { // Default is to get allowed/denied tags from internal array of processing options:
|
||
// Construct default list of tags to keep:
|
||
$typoScript_list = 'b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blockquote,strike,span';
|
||
$keepTags = array_flip(t3lib_div::trimExplode(',',$typoScript_list.','.strtolower($this->procOptions['allowTags']),1));
|
||
$keepTags = array_flip(t3lib_div::trimExplode(',',$typoScript_list.','.t3lib_div::strtolower($this->procOptions['allowTags']),1));
|
||
// For tags to deny, remove them from $keepTags array:
|
||
$denyTags = t3lib_div::trimExplode(',',$this->procOptions['denyTags'],1);
|
||
... | ... | |
if ($this->procOptions['internalizeFontTags']) {$value = $this->internalizeFontTags($value);}
|
||
// Setting configuration for processing:
|
||
$allowTagsOutside = t3lib_div::trimExplode(',',strtolower($this->procOptions['allowTagsOutside']?$this->procOptions['allowTagsOutside']:'img'),1);
|
||
$remapParagraphTag = strtoupper($this->procOptions['remapParagraphTag']);
|
||
$allowTagsOutside = t3lib_div::trimExplode(',',t3lib_div::strtolower($this->procOptions['allowTagsOutside']?$this->procOptions['allowTagsOutside']:'img'),1);
|
||
$remapParagraphTag = t3lib_div::strtoupper($this->procOptions['remapParagraphTag']);
|
||
$divSplit = $this->splitIntoBlock('div,p',$value,1); // Setting the third param to 1 will eliminate false end-tags. Maybe this is a good thing to do...?
|
||
if ($this->procOptions['keepPDIVattribs']) {
|
||
$keepAttribListArr = t3lib_div::trimExplode(',',strtolower($this->procOptions['keepPDIVattribs']),1);
|
||
$keepAttribListArr = t3lib_div::trimExplode(',',t3lib_div::strtolower($this->procOptions['keepPDIVattribs']),1);
|
||
} else {
|
||
$keepAttribListArr = array();
|
||
}
|
||
... | ... | |
// Get first tag, attributes etc:
|
||
$fTag = $this->getFirstTag($divSplit[$k]);
|
||
$tagName=strtolower($this->getFirstTagName($divSplit[$k]));
|
||
$tagName=t3lib_div::strtolower($this->getFirstTagName($divSplit[$k]));
|
||
$attribs=$this->get_tag_attributes($fTag);
|
||
// Keep attributes (lowercase)
|
||
... | ... | |
}
|
||
// ALIGN attribute:
|
||
if (!$this->procOptions['skipAlign'] && strcmp(trim($attribs[0]['align']),'') && strtolower($attribs[0]['align'])!='left') { // Set to value, but not 'left'
|
||
$newAttribs['align']=strtolower($attribs[0]['align']);
|
||
if (!$this->procOptions['skipAlign'] && strcmp(trim($attribs[0]['align']),'') && t3lib_div::strtolower($attribs[0]['align'])!='left') { // Set to value, but not 'left'
|
||
$newAttribs['align']=t3lib_div::strtolower($attribs[0]['align']);
|
||
}
|
||
// CLASS attribute:
|
||
if (!$this->procOptions['skipClass'] && strcmp(trim($attribs[0]['class']),'')) { // Set to whatever value
|
||
if (!count($this->allowedClasses) || in_array(strtoupper($attribs[0]['class']),$this->allowedClasses)) {
|
||
if (!count($this->allowedClasses) || in_array(t3lib_div::strtoupper($attribs[0]['class']),$this->allowedClasses)) {
|
||
$newAttribs['class']=$attribs[0]['class'];
|
||
}
|
||
}
|
||
... | ... | |
}
|
||
// Wrapping the line in <$dT> is not already wrapped:
|
||
$testStr = strtolower(trim($parts[$k]));
|
||
$testStr = t3lib_div::strtolower(trim($parts[$k]));
|
||
if (substr($testStr,0,4)!='<div' || substr($testStr,-6)!='</div>') {
|
||
if (substr($testStr,0,2)!='<p' || substr($testStr,-4)!='</p>') {
|
||
// Only set p-tags if there is not already div or p tags:
|
||
... | ... | |
function urlInfoForLinkTags($url) {
|
||
$info = array();
|
||
$url = trim($url);
|
||
if (substr(strtolower($url),0,7)=='mailto:') {
|
||
if (substr(t3lib_div::strtolower($url),0,7)=='mailto:') {
|
||
$info['url']=trim(substr($url,7));
|
||
$info['type']='email';
|
||
} else {
|
||
... | ... | |
// Checking if there is a scheme, and if not, prepend the current url.
|
||
if (strlen($attribArray['href'])) { // ONLY do this if href has content - the <a> tag COULD be an anchor and if so, it should be preserved...
|
||
$uP = parse_url(strtolower($attribArray['href']));
|
||
$uP = parse_url(t3lib_div::strtolower($attribArray['href']));
|
||
if (!$uP['scheme']) {
|
||
$attribArray['href'] = $this->siteUrl().substr($attribArray['href'],strlen($this->relBackPath));
|
||
}
|
t3lib/class.t3lib_readmail.php (working copy) | ||
---|---|---|
while(list(,$ppstr)=each($parts)) {
|
||
$mparts = explode('=',$ppstr,2);
|
||
if (count($mparts)>1) {
|
||
$cTypes[strtolower(trim($mparts[0]))]=ereg_replace('^"','',trim(ereg_replace('"$','',trim($mparts[1]))));
|
||
$cTypes[t3lib_div::strtolower(trim($mparts[0]))]=ereg_replace('^"','',trim(ereg_replace('"$','',trim($mparts[1]))));
|
||
} else {
|
||
$cTypes[]=$ppstr;
|
||
}
|
||
... | ... | |
$subparts =explode('?=',$encContent,2);
|
||
$encContent=$subparts[0];
|
||
switch(strtolower($encType)) {
|
||
switch(t3lib_div::strtolower($encType)) {
|
||
case 'q':
|
||
$encContent = quoted_printable_decode($encContent);
|
||
$encContent = str_replace('_',' ',$encContent);
|
||
... | ... | |
$reg='';
|
||
eregi('([^=]*)="(.*)"',$v,$reg);
|
||
if (trim($reg[1]) && trim($reg[2])) {
|
||
$outValue[strtolower($reg[1])] = $reg[2];
|
||
$outValue[t3lib_div::strtolower($reg[1])] = $reg[2];
|
||
}
|
||
}
|
||
return $outValue;
|
||
... | ... | |
$spaceParts = t3lib_div::trimExplode(' ',$dateStr,1);
|
||
$spaceParts[1]=$this->dateAbbrevs[strtoupper($spaceParts[1])];
|
||
$spaceParts[1]=$this->dateAbbrevs[t3lib_div::strtoupper($spaceParts[1])];
|
||
$timeParts = explode(':',$spaceParts[3]);
|
||
$timeStamp = mktime ($timeParts[0], $timeParts[1], $timeParts[2], $spaceParts[1], $spaceParts[0], $spaceParts[2]);
|
||
... | ... | |
if (!trim($str)) break; // header finished
|
||
$parts = explode(' ',$str,2);
|
||
if ($parts[0] && substr($parts[0],-1)==':') {
|
||
$p=strtolower(substr($parts[0],0,-1));
|
||
$p=t3lib_div::strtolower(substr($parts[0],0,-1));
|
||
if (isset($headers[$p])) {
|
||
$headers[$p.'.'][]=$headers[$p];
|
||
$headers[$p]='';
|
||
... | ... | |
$list = explode(',','from,to,reply-to,sender,return-path');
|
||
while(list(,$headerType)=each($list)) {
|
||
if (isset($mailParts[$headerType])) {
|
||
$mailParts['_'.strtoupper($headerType)]=$this->extractNameEmail($mailParts[$headerType]);
|
||
$mailParts['_'.t3lib_div::strtoupper($headerType)]=$this->extractNameEmail($mailParts[$headerType]);
|
||
}
|
||
}
|
||
// Decode date from human-readable format to unix-time (includes compensation for GMT CET)
|
||
$mailParts['_DATE']=$this->makeUnixDate($mailParts['date']);
|
||
// Transfer encodings of body content
|
||
switch(strtolower($mailParts['content-transfer-encoding'])) {
|
||
switch(t3lib_div::strtolower($mailParts['content-transfer-encoding'])) {
|
||
case 'quoted-printable':
|
||
$mailParts['CONTENT']=quoted_printable_decode($mailParts['CONTENT']);
|
||
break;
|
||
... | ... | |
// *************************
|
||
// PROCESSING the CONTENT part of the mail (the body)
|
||
// *************************
|
||
$cType = strtolower($mailParts['_CONTENT_TYPE_DAT']['_MIME_TYPE']);
|
||
$cType = t3lib_div::strtolower($mailParts['_CONTENT_TYPE_DAT']['_MIME_TYPE']);
|
||
$cType = substr($cType,0,9); // only looking for 'multipart' in string.
|
||
switch($cType) {
|
||
/* case 'multipart/mixed':
|
||
... | ... | |
} else $mailParts['CONTENT'] = 'ERROR: No boundary found.';
|
||
break;
|
||
default:
|
||
if (strtolower($mailParts['_CONTENT_TYPE_DAT']['charset'])=='utf-8') {
|
||
if (t3lib_div::strtolower($mailParts['_CONTENT_TYPE_DAT']['charset'])=='utf-8') {
|
||
$mailParts['CONTENT']=utf8_decode($mailParts['CONTENT']);
|
||
}
|
||
break;
|
||
... | ... | |
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_readmail.php']) {
|
||
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_readmail.php']);
|
||
}
|
||
?>
|
||
?>
|
t3lib/class.t3lib_softrefproc.php (working copy) | ||
---|---|---|
list($rootFileDat) = explode('?',rawurldecode($link_param));
|
||
$containsSlash = strstr($rootFileDat,'/');
|
||
$rFD_fI = pathinfo($rootFileDat);
|
||
if (trim($rootFileDat) && !$containsSlash && (@is_file(PATH_site.$rootFileDat) || t3lib_div::inList('php,html,htm',strtolower($rFD_fI['extension'])))) {
|
||
if (trim($rootFileDat) && !$containsSlash && (@is_file(PATH_site.$rootFileDat) || t3lib_div::inList('php,html,htm',t3lib_div::strtolower($rFD_fI['extension'])))) {
|
||
$isLocalFile = 1;
|
||
} elseif ($containsSlash) {
|
||
$isLocalFile = 2; // Adding this so realurl directories are linked right (non-existing).
|
t3lib/class.t3lib_sqlengine.php (working copy) | ||
---|---|---|
function processAccordingToConfig(&$value,$fInfo) {
|
||
$options = $this->parseFieldDef($fInfo['Type']);
|
||
switch(strtolower($options['fieldType'])) {
|
||
switch(t3lib_div::strtolower($options['fieldType'])) {
|
||
case 'int':
|
||
case 'smallint':
|
||
case 'tinyint':
|
||
... | ... | |
foreach($where as $config) {
|
||
if (strtoupper($config['operator'])=='OR') {
|
||
if (t3lib_div::strtoupper($config['operator'])=='OR') {
|
||
$OR_index++;
|
||
}
|
||
... | ... | |
$itemKeys = array_intersect($itemKeys, $subSelKeys);
|
||
}
|
||
} else {
|
||
$comp = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$config['comparator']));
|
||
$mod = strtoupper($config['modifier']);
|
||
$comp = t3lib_div::strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$config['comparator']));
|
||
$mod = t3lib_div::strtoupper($config['modifier']);
|
||
switch($comp) {
|
||
case 'NOTLIKE':
|
||
case 'LIKE':
|
||
$like_value = strtolower($config['value'][0]);
|
||
$like_value = t3lib_div::strtolower($config['value'][0]);
|
||
if (substr($like_value,0,1)=='%') {
|
||
$wildCard_begin = TRUE;
|
||
$like_value = substr($like_value,1);
|
||
... | ... | |
if (!strlen($like_value)) {
|
||
$bool = TRUE;
|
||
} elseif ($wildCard_begin && !$wildCard_end) {
|
||
$bool = !strcmp(substr(strtolower($field_value),-strlen($like_value)),$like_value);
|
||
$bool = !strcmp(substr(t3lib_div::strtolower($field_value),-strlen($like_value)),$like_value);
|
||
} elseif (!$wildCard_begin && $wildCard_end) {
|
||
$bool = !strcmp(substr(strtolower($field_value),0,strlen($like_value)),$like_value);
|
||
$bool = !strcmp(substr(t3lib_div::strtolower($field_value),0,strlen($like_value)),$like_value);
|
||
} elseif ($wildCard_begin && $wildCard_end) {
|
||
$bool = strstr($field_value,$like_value);
|
||
} else {
|
||
$bool = !strcmp(strtolower($field_value),$like_value);
|
||
$bool = !strcmp(t3lib_div::strtolower($field_value),$like_value);
|
||
}
|
||
if ($comp=='NOTLIKE') $bool = !$bool;
|
||
break;
|
t3lib/class.t3lib_sqlparser.php (working copy) | ||
---|---|---|
// Finding starting keyword of string:
|
||
$_parseString = $parseString; // Protecting original string...
|
||
$keyword = $this->nextPart($_parseString, '^(SELECT|UPDATE|INSERT[[:space:]]+INTO|DELETE[[:space:]]+FROM|EXPLAIN|DROP[[:space:]]+TABLE|CREATE[[:space:]]+TABLE|CREATE[[:space:]]+DATABASE|ALTER[[:space:]]+TABLE)[[:space:]]+');
|
||
$keyword = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$keyword));
|
||
$keyword = t3lib_div::strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$keyword));
|
||
switch($keyword) {
|
||
case 'SELECT':
|
||
... | ... | |
// While the parseString is not yet empty:
|
||
while(strlen($parseString)>0) {
|
||
if ($key = $this->nextPart($parseString, '^(KEY|PRIMARY KEY|UNIQUE KEY|UNIQUE)([[:space:]]+|\()')) { // Getting key
|
||
$key = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$key));
|
||
$key = t3lib_div::strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$key));
|
||
switch($key) {
|
||
case 'PRIMARYKEY':
|
||
... | ... | |
if ($result['TABLE']) {
|
||
if ($result['action'] = $this->nextPart($parseString, '^(CHANGE|DROP[[:space:]]+KEY|DROP[[:space:]]+PRIMARY[[:space:]]+KEY|ADD[[:space:]]+KEY|ADD[[:space:]]+PRIMARY[[:space:]]+KEY|DROP|ADD|RENAME)([[:space:]]+|\()')) {
|
||
$actionKey = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$result['action']));
|
||
$actionKey = t3lib_div::strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$result['action']));
|
||
// Getting field:
|
||
if (t3lib_div::inList('ADDPRIMARYKEY,DROPPRIMARYKEY',$actionKey) || $fieldKey = $this->nextPart($parseString, '^([[:alnum:]_]+)[[:space:]]+')) {
|
||
... | ... | |
// Looking for stop-keywords:
|
||
if ($stopRegex && $this->lastStopKeyWord = $this->nextPart($parseString, $stopRegex)) {
|
||
$this->lastStopKeyWord = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$this->lastStopKeyWord));
|
||
$this->lastStopKeyWord = t3lib_div::strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$this->lastStopKeyWord));
|
||
return $stack;
|
||
}
|
||
... | ... | |
if ($stack[$pnt]['table'] = $this->nextPart($parseString,'^([[:alnum:]_]+)(,|[[:space:]]+)')) {
|
||
// Looking for stop-keywords before fetching potential table alias:
|
||
if ($stopRegex && ($this->lastStopKeyWord = $this->nextPart($parseString, $stopRegex))) {
|
||
$this->lastStopKeyWord = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$this->lastStopKeyWord));
|
||
$this->lastStopKeyWord = t3lib_div::strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$this->lastStopKeyWord));
|
||
return $stack;
|
||
}
|
||
if(!preg_match('/^(LEFT|JOIN)[[:space:]]+/i',$parseString)) {
|
||
... | ... | |
// Looking for stop-keywords:
|
||
if ($stopRegex && $this->lastStopKeyWord = $this->nextPart($parseString, $stopRegex)) {
|
||
$this->lastStopKeyWord = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$this->lastStopKeyWord));
|
||
$this->lastStopKeyWord = t3lib_div::strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$this->lastStopKeyWord));
|
||
return $stack;
|
||
}
|
||
... | ... | |
// Looking for stop-keywords:
|
||
if ($stopRegex && $this->lastStopKeyWord = $this->nextPart($parseString, $stopRegex)) {
|
||
$this->lastStopKeyWord = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$this->lastStopKeyWord));
|
||
$this->lastStopKeyWord = t3lib_div::strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$this->lastStopKeyWord));
|
||
return $stack[0];
|
||
} else {
|
||
return $this->parseError('No operator, but parsing not finished in parseWhereClause().',$parseString);
|
||
... | ... | |
// Looking for keywords
|
||
while($keyword = $this->nextPart($parseString,'^(DEFAULT|NOT[[:space:]]+NULL|AUTO_INCREMENT|UNSIGNED)([[:space:]]+|,|\))')) {
|
||
$keywordCmp = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$keyword));
|
||
$keywordCmp = t3lib_div::strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$keyword));
|
||
$result['featureIndex'][$keywordCmp]['keyword'] = $keyword;
|
||
... | ... | |
function getValue(&$parseString,$comparator='') {
|
||
$value = '';
|
||
if (t3lib_div::inList('NOTIN,IN,_LIST',strtoupper(str_replace(array(' ',"\n","\r","\t"),'',$comparator)))) { // List of values:
|
||
if (t3lib_div::inList('NOTIN,IN,_LIST',t3lib_div::strtoupper(str_replace(array(' ',"\n","\r","\t"),'',$comparator)))) { // List of values:
|
||
if ($this->nextPart($parseString,'^([(])')) {
|
||
$listValues = array();
|
||
$comma=',';
|
||
... | ... | |
$query = 'ALTER TABLE '.$components['TABLE'].' '.$components['action'].' '.($components['FIELD']?$components['FIELD']:$components['KEY']);
|
||
// Based on action, add the final part:
|
||
switch(strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$components['action']))) {
|
||
switch(t3lib_div::strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$components['action']))) {
|
||
case 'ADD':
|
||
$query.=' '.$this->compileFieldCfg($components['definition']);
|
||
break;
|
||
... | ... | |
$output.=' '.$v['comparator'];
|
||
// Detecting value type; list or plain:
|
||
if (t3lib_div::inList('NOTIN,IN',strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$v['comparator'])))) {
|
||
if (t3lib_div::inList('NOTIN,IN',t3lib_div::strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$v['comparator'])))) {
|
||
$valueBuffer = array();
|
||
foreach($v['value'] as $realValue) {
|
||
$valueBuffer[]=$realValue[1].$this->compileAddslashes($realValue[0]).$realValue[1];
|
||
... | ... | |
*/
|
||
function debug_parseSQLpartCompare($str,$newStr,$caseInsensitive=FALSE) {
|
||
if ($caseInsensitive) {
|
||
$str1 = strtoupper($str);
|
||
$str2 = strtoupper($newStr);
|
||
$str1 = t3lib_div::strtoupper($str);
|
||
$str2 = t3lib_div::strtoupper($newStr);
|
||
} else {
|
||
$str1 = $str;
|
||
$str2 = $newStr;
|
t3lib/class.t3lib_stdgraphic.php (working copy) | ||
---|---|---|
function maskImageOntoImage(&$im,$conf,$workArea) {
|
||
if ($conf['file'] && $conf['mask']) {
|
||
$imgInf = pathinfo($conf['file']);
|
||
$imgExt = strtolower($imgInf['extension']);
|
||
$imgExt = t3lib_div::strtolower($imgInf['extension']);
|
||
if (!t3lib_div::inList($this->gdlibExtensions, $imgExt)) {
|
||
$BBimage = $this->imageMagickConvert($conf['file'],$this->gifExtension,'','','','','');
|
||
} else {
|
||
$BBimage = $this->getImageDimensions($conf['file']);
|
||
}
|
||
$maskInf = pathinfo($conf['mask']);
|
||
$maskExt = strtolower($maskInf['extension']);
|
||
$maskExt = t3lib_div::strtolower($maskInf['extension']);
|
||
if (!t3lib_div::inList($this->gdlibExtensions, $maskExt)) {
|
||
$BBmask = $this->imageMagickConvert($conf['mask'],$this->gifExtension,'','','','','');
|
||
} else {
|
||
... | ... | |
while(list(,$val)=each($effects)) {
|
||
$pairs=explode('=',$val,2);
|
||
$value = trim($pairs[1]);
|
||
$effect = strtolower(trim($pairs[0]));
|
||
$effect = t3lib_div::strtolower(trim($pairs[0]));
|
||
switch($effect) {
|
||
case 'gamma':
|
||
$commands.=' -gamma '.doubleval($value);
|
||
... | ... | |
while(list(,$val)=each($effects)) {
|
||
$pairs=explode('=',$val,2);
|
||
$value = trim($pairs[1]);
|
||
$effect = strtolower(trim($pairs[0]));
|
||
$effect = t3lib_div::strtolower(trim($pairs[0]));
|
||
switch($effect) {
|
||
case 'inputlevels': // low,high
|
||
$params = t3lib_div::intExplode(',',$value);
|
||
... | ... | |
*/
|
||
function IMreduceColors($file, $cols) {
|
||
$fI = t3lib_div::split_fileref($file);
|
||
$ext = strtolower($fI['fileext']);
|
||
$ext = t3lib_div::strtolower($fI['fileext']);
|
||
$result = $this->randomName().'.'.$ext;
|
||
if (($reduce = t3lib_div::intInRange($cols, 0, ($ext=='gif'?256:$this->truecolorColors), 0))>0) {
|
||
$params = ' -colors '.$reduce;
|
||
... | ... | |
$col[]=intval($strArr[1]);
|
||
$col[]=intval($strArr[2]);
|
||
} else {
|
||
$string = strtolower(trim($string));
|
||
$string = t3lib_div::strtolower(trim($string));
|
||
if ($this->colMap[$string]) {
|
||
$col = $this->colMap[$string];
|
||
} else {
|
||
... | ... | |
$h=$workArea[3];
|
||
$align = explode(',',$conf['align']);
|
||
$align[0] = strtolower(substr(trim($align[0]),0,1));
|
||
$align[1] = strtolower(substr(trim($align[1]),0,1));
|
||
$align[0] = t3lib_div::strtolower(substr(trim($align[0]),0,1));
|
||
$align[1] = t3lib_div::strtolower(substr(trim($align[1]),0,1));
|
||
switch($align[0]) {
|
||
case 'r':
|
||
... | ... | |
}
|
||
if($info=$this->getImageDimensions($imagefile)) {
|
||
$newExt=strtolower(trim($newExt));
|
||
$newExt=t3lib_div::strtolower(trim($newExt));
|
||
if (!$newExt) { // If no extension is given the original extension is used
|
||
$newExt = $info[2];
|
||
}
|
||
... | ... | |
*/
|
||
function getImageDimensions($imageFile) {
|
||
ereg('([^\.]*)$',$imageFile,$reg);
|
||
if (@file_exists($imageFile) && t3lib_div::inList($this->imageFileExt,strtolower($reg[0]))) {
|
||
if (@file_exists($imageFile) && t3lib_div::inList($this->imageFileExt,t3lib_div::strtolower($reg[0]))) {
|
||
if ($returnArr = $this->getCachedImageDimensions($imageFile)) {
|
||
return $returnArr;
|
||
} else {
|
||
if ($temp = @getImageSize($imageFile)) {
|
||
$returnArr = Array($temp[0], $temp[1], strtolower($reg[0]), $imageFile);
|
||
$returnArr = Array($temp[0], $temp[1], t3lib_div::strtolower($reg[0]), $imageFile);
|
||
} else {
|
||
$returnArr = $this->imageMagickIdentify($imageFile);
|
||
}
|
||
... | ... | |
// file has changed, delete the row
|
||
$TYPO3_DB->exec_DELETEquery ('cache_imagesizes', 'md5hash='.$TYPO3_DB->fullQuoteStr($row['md5hash'],'cache_imagesizes'));
|
||
} else {
|
||
return (array($row['imagewidth'], $row['imageheight'], strtolower($reg[0]), $imageFile));
|
||
return (array($row['imagewidth'], $row['imageheight'], t3lib_div::strtolower($reg[0]), $imageFile));
|
||
}
|
||
}
|
||
}
|
||
... | ... | |
}
|
||
}
|
||
if ($dim[0] && $dim[1]) {
|
||
return Array($dim[0], $dim[1], strtolower($reg[0]), $imagefile);
|
||
return Array($dim[0], $dim[1], t3lib_div::strtolower($reg[0]), $imagefile);
|
||
}
|
||
}
|
||
}
|
||
... | ... | |
if ($file) {
|
||
$reg = array();
|
||
ereg('([^\.]*)$',$file,$reg);
|
||
$ext=strtolower($reg[0]);
|
||
$ext=t3lib_div::strtolower($reg[0]);
|
||
switch($ext) {
|
||
case 'gif':
|
||
case 'png':
|
||
... | ... | |
*/
|
||
function ImageWrite($destImg, $theImage, $quality=0) {
|
||
imageinterlace ($destImg,0);
|
||
$ext = strtolower(substr($theImage, strrpos($theImage, '.')+1));
|
||
$ext = t3lib_div::strtolower(substr($theImage, strrpos($theImage, '.')+1));
|
||
switch ($ext) {
|
||
case 'jpg':
|
||
case 'jpeg':
|
||
... | ... | |
*/
|
||
function imageCreateFromFile($sourceImg) {
|
||
$imgInf = pathinfo($sourceImg);
|
||
$ext = strtolower($imgInf['extension']);
|
||
$ext = t3lib_div::strtolower($imgInf['extension']);
|
||
switch ($ext) {
|
||
case 'gif':
|
t3lib/class.t3lib_tceforms.php (working copy) | ||
---|---|---|
if (!count($tempFT)) {$info.='*';}
|
||
foreach($tempFT as $ext) {
|
||
if ($ext) {
|
||
$info.=strtoupper($ext).' ';
|
||
$info.=t3lib_div::strtoupper($ext).' ';
|
||
}
|
||
}
|
||
// Creating string, showing disallowed types:
|
||
... | ... | |
if (count($tempFT_dis)) {$info.='<br />';}
|
||
foreach($tempFT_dis as $ext) {
|
||
if ($ext) {
|
||
$info.='-'.strtoupper($ext).' ';
|
||
$info.='-'.t3lib_div::strtoupper($ext).' ';
|
||
}
|
||
}
|
||
... | ... | |
$absFilePath = t3lib_div::getFileAbsFileName($config['uploadfolder'].'/'.$imgPath);
|
||
$fI = pathinfo($imgPath);
|
||
$fileIcon = t3lib_BEfunc::getFileIcon(strtolower($fI['extension']));
|
||
$fileIcon = t3lib_BEfunc::getFileIcon(t3lib_div::strtolower($fI['extension']));
|
||
$fileIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/fileicons/'.$fileIcon,'width="18" height="16"').' class="absmiddle" title="'.htmlspecialchars($fI['basename'].($absFilePath && @is_file($absFilePath) ? ' ('.t3lib_div::formatSize(filesize($absFilePath)).'bytes)' : ' - FILE NOT FOUND!')).'" alt="" />';
|
||
$imgs[] = '<span class="nobr">'.t3lib_BEfunc::thumbCode($rowCopy,$table,$field,$this->backPath,'thumbs.php',$config['uploadfolder'],0,' align="middle"').
|
||
... | ... | |
// Get data:
|
||
$xmlData = $PA['itemFormElValue'];
|
||
$xmlHeaderAttributes = t3lib_div::xmlGetHeaderAttribs($xmlData);
|
||
$storeInCharset = strtolower($xmlHeaderAttributes['encoding']);
|
||
$storeInCharset = t3lib_div::strtolower($xmlHeaderAttributes['encoding']);
|
||
if ($storeInCharset) {
|
||
$currentCharset=$GLOBALS['LANG']->charSet;
|
||
$xmlData = $GLOBALS['LANG']->csConvObj->conv($xmlData,$storeInCharset,$currentCharset,1);
|
||
... | ... | |
if ($allowedExts) { // If there are a set of allowed extensions, filter the content:
|
||
foreach($elFromTable as $elValue) {
|
||
$pI = pathinfo($elValue);
|
||
$ext = strtolower($pI['extension']);
|
||
$ext = t3lib_div::strtolower($pI['extension']);
|
||
if (in_array($ext, $allowedExts)) {
|
||
$output[] = $elValue;
|
||
}
|
||
... | ... | |
function formWidthText($size=48,$wrap='') {
|
||
$wTags = $this->formWidth($size,1);
|
||
// Netscape 6+ seems to have this ODD problem where there WILL ALWAYS be wrapping with the cols-attribute set and NEVER without the col-attribute...
|
||
if (strtolower(trim($wrap))!='off' && $GLOBALS['CLIENT']['BROWSER']=='net' && $GLOBALS['CLIENT']['VERSION']>=5) {
|
||
if (t3lib_div::strtolower(trim($wrap))!='off' && $GLOBALS['CLIENT']['BROWSER']=='net' && $GLOBALS['CLIENT']['VERSION']>=5) {
|
||
$wTags.= ' cols="'.$size.'"';
|
||
}
|
||
return $wTags;
|
||
... | ... | |
foreach($fileArr as $fileRef) {
|
||
$fI = pathinfo($fileRef);
|
||
$icon = t3lib_div::inList('gif,png,jpeg,jpg', strtolower($fI['extension'])) ? '../'.substr($fileFolder,strlen(PATH_site)).$fileRef : '';
|
||
$icon = t3lib_div::inList('gif,png,jpeg,jpg', t3lib_div::strtolower($fI['extension'])) ? '../'.substr($fileFolder,strlen(PATH_site)).$fileRef : '';
|
||
$items[] = array(
|
||
$fileRef,
|
||
$fileRef,
|
||
... | ... | |
switch((string)$parts[2]) {
|
||
case 'REQ':
|
||
if (strtolower($parts[3])=='true') {
|
||
if (t3lib_div::strtolower($parts[3])=='true') {
|
||
$output = $theFieldValue ? TRUE : FALSE;
|
||
} elseif (strtolower($parts[3])=='false') {
|
||
} elseif (t3lib_div::strtolower($parts[3])=='false') {
|
||
$output = !$theFieldValue ? TRUE : FALSE;
|
||
}
|
||
break;
|
||
... | ... | |
case 'EXT':
|
||
switch((string)$parts[2]) {
|
||
case 'LOADED':
|
||
if (strtolower($parts[3])=='true') {
|
||
if (t3lib_div::strtolower($parts[3])=='true') {
|
||
$output = t3lib_extMgm::isLoaded($parts[1]) ? TRUE : FALSE;
|
||
} elseif (strtolower($parts[3])=='false') {
|
||
} elseif (t3lib_div::strtolower($parts[3])=='false') {
|
||
$output = !t3lib_extMgm::isLoaded($parts[1]) ? TRUE : FALSE;
|
||
}
|
||
break;
|
||
... | ... | |
case 'REC':
|
||
switch((string)$parts[1]) {
|
||
case 'NEW':
|
||
if (strtolower($parts[2])=='true') {
|
||
if (t3lib_div::strtolower($parts[2])=='true') {
|
||
$output = !(intval($row['uid']) > 0) ? TRUE : FALSE;
|
||
} elseif (strtolower($parts[2])=='false') {
|
||
} elseif (t3lib_div::strtolower($parts[2])=='false') {
|
||
$output = (intval($row['uid']) > 0) ? TRUE : FALSE;
|
||
}
|
||
break;
|
||
... | ... | |
case 'VERSION':
|
||
switch((string)$parts[1]) {
|
||
case 'IS':
|
||
if (strtolower($parts[2])=='true') {
|
||
if (t3lib_div::strtolower($parts[2])=='true') {
|
||
$output = intval($row['pid'])==-1 ? TRUE : FALSE;
|
||
} elseif (strtolower($parts[2])=='false') {
|
||
} elseif (t3lib_div::strtolower($parts[2])=='false') {
|
||
$output = !(intval($row['pid'])==-1) ? TRUE : FALSE;
|
||
}
|
||
break;
|
||
... | ... | |
$absFilePath = t3lib_div::getFileAbsFileName($config['config']['uploadfolder'].'/'.$imgPath);
|
||
$fI = pathinfo($imgPath);
|
||
$fileIcon = t3lib_BEfunc::getFileIcon(strtolower($fI['extension']));
|
||
$fileIcon = t3lib_BEfunc::getFileIcon(t3lib_div::strtolower($fI['extension']));
|
||
$fileIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/fileicons/'.$fileIcon,'width="18" height="16"').' class="absmiddle" title="'.htmlspecialchars($fI['basename'].($absFilePath && @is_file($absFilePath) ? ' ('.t3lib_div::formatSize(filesize($absFilePath)).'bytes)' : ' - FILE NOT FOUND!')).'" alt="" />';
|
||
$imgs[] = '<span class="nobr">'.t3lib_BEfunc::thumbCode($rowCopy,$table,$field,$this->backPath,'thumbs.php',$config['config']['uploadfolder'],0,' align="middle"').
|
t3lib/class.t3lib_tceforms_inline.php (working copy) | ||
---|---|---|
}
|
||
// we use '%AND' and '%OR' in uppercase
|
||
$type = strtoupper($type);
|
||
$type = t3lib_div::strtoupper($type);
|
||
// split regular elements from sub elements
|
||
foreach ($searchArray as $key => $value) {
|
||
... | ... | |
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tceforms_inline.php']) {
|
||
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tceforms_inline.php']);
|
||
}
|
||
?>
|
||
?>
|
t3lib/class.t3lib_tcemain.php (working copy) | ||
---|---|---|
// Clear cache for pages entered in TSconfig:
|
||
if ($TSConfig['clearCacheCmd']) {
|
||
$Commands = t3lib_div::trimExplode(',',strtolower($TSConfig['clearCacheCmd']),1);
|
||
$Commands = t3lib_div::trimExplode(',',t3lib_div::strtolower($TSConfig['clearCacheCmd']),1);
|
||
$Commands = array_unique($Commands);
|
||
foreach($Commands as $cmdPart) {
|
||
$this->clear_cacheCmd($cmdPart);
|
t3lib/class.t3lib_tsparser.php (working copy) | ||
---|---|---|
break;
|
||
}
|
||
if (strtoupper($pre)=='[GLOBAL]' || strtoupper($pre)=='[END]' || (!$this->lastConditionTrue && strtoupper($pre)=='[ELSE]')) {
|
||
if (t3lib_div::strtoupper($pre)=='[GLOBAL]' || t3lib_div::strtoupper($pre)=='[END]' || (!$this->lastConditionTrue && t3lib_div::strtoupper($pre)=='[ELSE]')) {
|
||
$pre = trim($this->parseSub($this->setup));
|
||
$this->lastConditionTrue=1;
|
||
} else {
|
||
if (strtoupper($pre)!='[ELSE]') {$this->sections[md5($pre)]=$pre;} // we're in a specific section. Therefore we log this section
|
||
if (t3lib_div::strtoupper($pre)!='[ELSE]') {$this->sections[md5($pre)]=$pre;} // we're in a specific section. Therefore we log this section
|
||
if ((is_object($matchObj) && $matchObj->match($pre)) || $this->syntaxHighLight) {
|
||
if (strtoupper($pre)!='[ELSE]') {$this->sectionsMatch[md5($pre)]=$pre;}
|
||
if (t3lib_div::strtoupper($pre)!='[ELSE]') {$this->sectionsMatch[md5($pre)]=$pre;}
|
||
$pre = trim($this->parseSub($this->setup));
|
||
$this->lastConditionTrue=1;
|
||
} else {
|
||
... | ... | |
if ($this->syntaxHighLight) $this->regHighLight("condition",$lineP);
|
||
return $line;
|
||
} else {
|
||
if (substr($line,0,1)=='[' && strtoupper(trim($line))=='[GLOBAL]') { // Return if GLOBAL condition is set - no matter what.
|
||
if (substr($line,0,1)=='[' && t3lib_div::strtoupper(trim($line))=='[GLOBAL]') { // Return if GLOBAL condition is set - no matter what.
|
||
if ($this->syntaxHighLight) $this->regHighLight("condition",$lineP);
|
||
$this->error('Line '.($this->lineNumberOffset+$this->rawP-1).': On return to [GLOBAL] scope, the script was short of '.$this->inBrace.' end brace(s)',1);
|
||
$this->inBrace=0;
|
||
... | ... | |
$params = t3lib_div::get_tag_attributes($subparts[0]);
|
||
if ($params['source']) {
|
||
$sourceParts = explode(':',$params['source'],2);
|
||
switch(strtolower(trim($sourceParts[0]))) {
|
||
switch(t3lib_div::strtolower(trim($sourceParts[0]))) {
|
||
case 'file':
|
||
$filename = t3lib_div::getFileAbsFileName(trim($sourceParts[1]));
|
||
if (strcmp($filename,'')) { // Must exist and must not contain '..' and must be relative
|
t3lib/class.t3lib_tsparser_ext.php (working copy) | ||
---|---|---|
while(list(,$par)=each($parts)) {
|
||
if (strstr($par,'=')) {
|
||
$keyValPair =explode('=',$par,2);
|
||
switch(trim(strtolower($keyValPair[0]))) {
|
||
switch(trim(t3lib_div::strtolower($keyValPair[0]))) {
|
||
case 'type':
|
||
// Type:
|
||
/*
|
||
... | ... | |
break;
|
||
case 'cat':
|
||
// list of categories.
|
||
$catSplit=explode('/',strtolower($keyValPair[1]));
|
||
$catSplit=explode('/',t3lib_div::strtolower($keyValPair[1]));
|
||
$editableComments[$const]['cat'] = trim($catSplit[0]);
|
||
$catSplit[1]=trim($catSplit[1]); // This is the subcategory. Must be a key in $this->subCategories[]. catSplit[2] represents the search-order within the subcat.
|
||
if ($catSplit[1] && isset($this->subCategories[$catSplit[1]])) {
|
||
... | ... | |
$retArr = array();
|
||
while(list($k,$v)=each($this->categories)) {
|
||
if (count($v)) {
|
||
$retArr[$k]=strtoupper($k).' ('.count($v).')';
|
||
$retArr[$k]=t3lib_div::strtoupper($k).' ('.count($v).')';
|
||
}
|
||
}
|
||
return $retArr;
|
||
... | ... | |
$retArr['type']='string';
|
||
} else {
|
||
$m=strcspn ($type,' [');
|
||
$retArr['type']=strtolower(substr($type,0,$m));
|
||
$retArr['type']=t3lib_div::strtolower(substr($type,0,$m));
|
||
if (t3lib_div::inList('int,options,file,boolean,offset,user', $retArr['type'])) {
|
||
$p=trim(substr($type,$m));
|
||
$reg = array();
|
||
... | ... | |
$p_field='';
|
||
while(list(,$val)=each($colorNames)) {
|
||
$sel='';
|
||
if ($val==strtolower($params['value'])) {
|
||
if ($val==t3lib_div::strtolower($params['value'])) {
|
||
$sel = ' selected';
|
||
}
|
||
$p_field.='<option value="'.htmlspecialchars($val).'"'.$sel.'>'.$val.'</option>';
|
||
... | ... | |
break;
|
||
case 'color':
|
- « Previous
- 1
- 2
- Next »