mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-12 01:04:27 +02:00
normalise_link calls
implement normaliseLink function
This commit is contained in:
parent
5276c28a78
commit
ffc406d819
54 changed files with 248 additions and 222 deletions
|
@ -816,12 +816,12 @@ class App
|
|||
public function removeBaseURL($origURL)
|
||||
{
|
||||
// Remove the hostname from the url if it is an internal link
|
||||
$nurl = normalise_link($origURL);
|
||||
$base = normalise_link($this->getBaseURL());
|
||||
$nurl = Util\Strings::normaliseLink($origURL);
|
||||
$base = Util\Strings::normaliseLink($this->getBaseURL());
|
||||
$url = str_replace($base . '/', '', $nurl);
|
||||
|
||||
// if it is an external link return the orignal value
|
||||
if ($url == normalise_link($origURL)) {
|
||||
if ($url == Util\Strings::normaliseLink($origURL)) {
|
||||
return $origURL;
|
||||
} else {
|
||||
return $url;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue