Project

General

Profile

Actions

Bug #15400

closed

False return-value in class recordList, method linkUrlMail

Added by old_heldenschreck almost 19 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2006-01-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

This error causes the removing of all human-readable-formatting by the method getProcessedValue in class t3lib_BEfunc when rendering the record values in list-view.

In my opinion the method linkUrlMail should return the parameter $code not $testString, in case the $value is no url. The return of $testString removes all formatting of the value done before.

(issue imported from #M2244)


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #15476: Plain timestamps in "Web" > "List"?ClosedMichael Stucki2006-01-21

Actions
Actions #1

Updated by Michael Stucki almost 19 years ago

I agree that it needs to be changed, but I don't know if it's a good idea if the URL is just removed. Suggestion: "$code ($testString)"

What do you think?

Actions #2

Updated by old_heldenschreck almost 19 years ago

In my opinion the return of $code at the end of the function does not remove the Url, because there are two returns already if an Url is found. So the return of $code is only done if no link or mail is found.
I have c&p the changed method as example:

function linkUrlMail($code,$testString)    {
// Check for URL:
$schema = parse_url($testString);
if ($schema['scheme'] && t3lib_div::inList('http,https,ftp',$schema['scheme'])) {
return '<a href="'.htmlspecialchars($testString).'" target="_blank">'.$code.'</a>';
}
// check for email:
if (t3lib_div::validEmail($testString)) {
return '<a href="mailto:'.htmlspecialchars($testString).'" target="_blank">'.$code.'</a>';
}
// Return if nothing else...
return $code;
// instead of return $testString;
}
Actions

Also available in: Atom PDF