mirror of
https://github.com/friendica/friendica
synced 2024-11-10 07:42:53 +00:00
Merge pull request #5575 from annando/issue-5541
5541: Don't do magic things when the remote site doesn't support it
This commit is contained in:
commit
82cef6c9e7
2 changed files with 6 additions and 2 deletions
|
@ -107,7 +107,7 @@ if (x($_SESSION, 'language') && ($_SESSION['language'] !== $lang)) {
|
|||
L10n::loadTranslationTable($lang);
|
||||
}
|
||||
|
||||
if ((x($_GET,'zrl')) && $a->mode == App::MODE_NORMAL) {
|
||||
if (!empty($_GET['zrl']) && $a->mode == App::MODE_NORMAL) {
|
||||
$a->query_string = Profile::stripZrls($a->query_string);
|
||||
if (!local_user()) {
|
||||
// Only continue when the given profile link seems valid
|
||||
|
|
|
@ -1050,7 +1050,11 @@ class Profile
|
|||
$basepath = $urlarr[0];
|
||||
|
||||
if ($basepath != System::baseUrl() && !strstr($dest, '/magic') && !strstr($dest, '/rmagic')) {
|
||||
goaway($basepath . '/magic' . '?f=&owa=1&dest=' . $dest);
|
||||
$magic_path = $basepath . '/magic' . '?f=&owa=1&dest=' . $dest;
|
||||
$serverret = Network::curl($magic_path);
|
||||
if (!empty($serverret['success'])) {
|
||||
goaway($magic_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue