Use BaseURL::redirect instead of deprecated App->internalRedirect in Search\Index
This commit is contained in:
parent
1c9cb42d98
commit
016507f346
|
@ -3,6 +3,7 @@
|
||||||
namespace Friendica\Module\Search;
|
namespace Friendica\Module\Search;
|
||||||
|
|
||||||
use Friendica\App\Arguments;
|
use Friendica\App\Arguments;
|
||||||
|
use Friendica\App\BaseURL;
|
||||||
use Friendica\Content\Nav;
|
use Friendica\Content\Nav;
|
||||||
use Friendica\Content\Pager;
|
use Friendica\Content\Pager;
|
||||||
use Friendica\Content\Text\HTML;
|
use Friendica\Content\Text\HTML;
|
||||||
|
@ -96,11 +97,15 @@ class Index extends BaseSearchModule
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parse_url($search, PHP_URL_SCHEME) != '') {
|
if (parse_url($search, PHP_URL_SCHEME) != '') {
|
||||||
$id = Item::fetchByLink($search);
|
/** @var BaseURL $baseURL */
|
||||||
if (!empty($id)) {
|
$baseURL = self::getClass(BaseURL::class);
|
||||||
$item = Item::selectFirst(['guid'], ['id' => $id]);
|
|
||||||
|
// Post URL search
|
||||||
|
$item_id = Item::fetchByLink($search);
|
||||||
|
if (!empty($item_id)) {
|
||||||
|
$item = Item::selectFirst(['guid'], ['id' => $item_id]);
|
||||||
if (DBA::isResult($item)) {
|
if (DBA::isResult($item)) {
|
||||||
self::getApp()->internalRedirect('display/' . $item['guid']);
|
$baseURL->redirect('display/' . $item['guid']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user