Merge pull request #8821 from MrPetovan/bug/fix-item-source-route
Improve Module\Admin\Item\Source
This commit is contained in:
commit
77e0d8c7bc
|
@ -33,15 +33,7 @@ class Source extends BaseAdmin
|
|||
{
|
||||
parent::content($parameters);
|
||||
|
||||
$a = DI::app();
|
||||
|
||||
$guid = null;
|
||||
// @TODO: Replace with parameter from router
|
||||
if (!empty($a->argv[3])) {
|
||||
$guid = $a->argv[3];
|
||||
}
|
||||
|
||||
$guid = $_REQUEST['guid'] ?? $guid;
|
||||
$guid = basename($_REQUEST['guid'] ?? '') ?: $parameters['guid'];
|
||||
|
||||
$source = '';
|
||||
$item_uri = '';
|
||||
|
@ -50,12 +42,14 @@ class Source extends BaseAdmin
|
|||
if (!empty($guid)) {
|
||||
$item = Model\Item::selectFirst(['id', 'uri-id', 'guid', 'uri'], ['guid' => $guid]);
|
||||
|
||||
$conversation = Model\Conversation::getByItemUri($item['uri']);
|
||||
if ($item) {
|
||||
$conversation = Model\Conversation::getByItemUri($item['uri']);
|
||||
|
||||
$item_id = $item['id'];
|
||||
$item_uri = $item['uri'];
|
||||
$source = $conversation['source'];
|
||||
$terms = Model\Tag::getByURIId($item['uri-id'], [Model\Tag::HASHTAG, Model\Tag::MENTION, Model\Tag::IMPLICIT_MENTION]);
|
||||
$item_id = $item['id'];
|
||||
$item_uri = $item['uri'];
|
||||
$source = $conversation['source'];
|
||||
$terms = Model\Tag::getByURIId($item['uri-id'], [Model\Tag::HASHTAG, Model\Tag::MENTION, Model\Tag::IMPLICIT_MENTION]);
|
||||
}
|
||||
}
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('admin/item/source.tpl');
|
||||
|
|
Loading…
Reference in New Issue
Block a user