diff --git a/administrator/components/com_actionlogs/tmpl/actionlogs/default.php b/administrator/components/com_actionlogs/tmpl/actionlogs/default.php index 9679d1023061a..5173028b1aca8 100644 --- a/administrator/components/com_actionlogs/tmpl/actionlogs/default.php +++ b/administrator/components/com_actionlogs/tmpl/actionlogs/default.php @@ -9,7 +9,6 @@ defined('_JEXEC') or die; -use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; @@ -22,13 +21,13 @@ $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); -Factory::getDocument()->addScriptDeclaration(' +$this->document->addScriptDeclaration(' Joomla.submitbutton = function(task) { if (task == "actionlogs.exportLogs") { Joomla.submitform(task, document.getElementById("exportForm")); - + return; } diff --git a/administrator/components/com_associations/View/Association/HtmlView.php b/administrator/components/com_associations/View/Association/HtmlView.php index a2eb8f6c5878a..b1aae58ee9156 100644 --- a/administrator/components/com_associations/View/Association/HtmlView.php +++ b/administrator/components/com_associations/View/Association/HtmlView.php @@ -174,8 +174,7 @@ public function display($tpl = null) * Let's put the target src into a variable to use in the javascript code * to avoid race conditions when the reference iframe loads. */ - $document = Factory::getDocument(); - $document->addScriptOptions('targetSrc', Route::_($this->editUri . '&task=' . $task . '&id=' . (int) $this->targetId)); + $this->document->addScriptOptions('targetSrc', Route::_($this->editUri . '&task=' . $task . '&id=' . (int) $this->targetId)); $this->form->setValue('itemlanguage', '', $this->targetLanguage . ':' . $this->targetId . ':' . $this->targetAction); } diff --git a/administrator/components/com_associations/tmpl/associations/modal.php b/administrator/components/com_associations/tmpl/associations/modal.php index ed7c320393274..f85f881a12bd5 100644 --- a/administrator/components/com_associations/tmpl/associations/modal.php +++ b/administrator/components/com_associations/tmpl/associations/modal.php @@ -38,7 +38,7 @@ 2 => 'icon-archive', ); -Factory::getDocument()->addScriptOptions('assosiations-modal', ['func' => $function]); +$this->document->addScriptOptions('assosiations-modal', ['func' => $function]); HTMLHelper::_('script', 'com_associations/admin-associations-modal.min.js', ['version' => 'auto', 'relative' => true]); ?>
setMimeEncoding($mimeType); + $this->document->setMimeEncoding($mimeType); /** @var CMSApplication $app */ $app = Factory::getApplication(); diff --git a/administrator/components/com_contact/tmpl/contacts/modal.php b/administrator/components/com_contact/tmpl/contacts/modal.php index e1fa25cc5135f..f6863be4e8c46 100644 --- a/administrator/components/com_contact/tmpl/contacts/modal.php +++ b/administrator/components/com_contact/tmpl/contacts/modal.php @@ -38,7 +38,7 @@ if (!empty($editor)) { // This view is used also in com_menus. Load the xtd script only if the editor is set! - Factory::getDocument()->addScriptOptions('xtd-contacts', array('editor' => $editor)); + $this->document->addScriptOptions('xtd-contacts', array('editor' => $editor)); $onclick = "jSelectContact"; } ?> diff --git a/administrator/components/com_content/View/Articles/HtmlView.php b/administrator/components/com_content/View/Articles/HtmlView.php index f0bec5e16a4a5..e559d2da3f80e 100644 --- a/administrator/components/com_content/View/Articles/HtmlView.php +++ b/administrator/components/com_content/View/Articles/HtmlView.php @@ -146,7 +146,7 @@ public function display($tpl = null) } } - Factory::getDocument()->addScriptOptions('articles.transitions', $transitions); + $this->document->addScriptOptions('articles.transitions', $transitions); $articles = []; @@ -155,7 +155,7 @@ public function display($tpl = null) $articles['article-' . (int) $item->id] = Text::sprintf('COM_CONTENT_STAGE_ARTICLE_TITLE', $this->escape($item->title), (int) $item->id); } - Factory::getDocument()->addScriptOptions('articles.items', $articles); + $this->document->addScriptOptions('articles.items', $articles); Text::script('COM_CONTENT_ERROR_CANNOT_PUBLISH'); Text::script('COM_CONTENT_ERROR_CANNOT_UNPUBLISH'); diff --git a/administrator/components/com_content/View/Featured/HtmlView.php b/administrator/components/com_content/View/Featured/HtmlView.php index 622da9bb22b70..fefe976b1cb34 100644 --- a/administrator/components/com_content/View/Featured/HtmlView.php +++ b/administrator/components/com_content/View/Featured/HtmlView.php @@ -125,7 +125,7 @@ public function display($tpl = null) } } - Factory::getDocument()->addScriptOptions('articles.transitions', $transitions); + $this->document->addScriptOptions('articles.transitions', $transitions); $articles = []; @@ -134,7 +134,7 @@ public function display($tpl = null) $articles['article-' . (int) $item->id] = Text::sprintf('COM_CONTENT_STAGE_ARTICLE_TITLE', $this->escape($item->title), (int) $item->id); } - Factory::getDocument()->addScriptOptions('articles.items', $articles); + $this->document->addScriptOptions('articles.items', $articles); Text::script('COM_CONTENT_ERROR_CANNOT_PUBLISH'); Text::script('COM_CONTENT_ERROR_CANNOT_UNPUBLISH'); diff --git a/administrator/components/com_content/tmpl/article/pagebreak.php b/administrator/components/com_content/tmpl/article/pagebreak.php index 8163f75a13d93..31e8927619911 100644 --- a/administrator/components/com_content/tmpl/article/pagebreak.php +++ b/administrator/components/com_content/tmpl/article/pagebreak.php @@ -16,11 +16,10 @@ HTMLHelper::_('behavior.core'); HTMLHelper::_('script', 'com_content/admin-article-pagebreak.min.js', array('version' => 'auto', 'relative' => true)); -$document = Factory::getDocument(); $this->eName = Factory::getApplication()->input->getCmd('e_name', ''); $this->eName = preg_replace('#[^A-Z0-9\-\_\[\]]#i', '', $this->eName); +$this->document->setTitle(Text::_('COM_CONTENT_PAGEBREAK_DOC_TITLE')); -$document->setTitle(Text::_('COM_CONTENT_PAGEBREAK_DOC_TITLE')); ?>
diff --git a/administrator/components/com_content/tmpl/articles/default.php b/administrator/components/com_content/tmpl/articles/default.php index 6f27da8c79593..eff5b8a60ce0c 100644 --- a/administrator/components/com_content/tmpl/articles/default.php +++ b/administrator/components/com_content/tmpl/articles/default.php @@ -69,7 +69,7 @@ JS; // @todo move the script to a file -Factory::getDocument()->addScriptDeclaration($js); +$this->document->addScriptDeclaration($js); $collection = new \stdClass; diff --git a/administrator/components/com_content/tmpl/articles/modal.php b/administrator/components/com_content/tmpl/articles/modal.php index dadab3e9edcb2..5ee1cd6692a8a 100644 --- a/administrator/components/com_content/tmpl/articles/modal.php +++ b/administrator/components/com_content/tmpl/articles/modal.php @@ -37,7 +37,7 @@ if (!empty($editor)) { // This view is used also in com_menus. Load the xtd script only if the editor is set! - Factory::getDocument()->addScriptOptions('xtd-articles', array('editor' => $editor)); + $this->document->addScriptOptions('xtd-articles', array('editor' => $editor)); $onclick = "jSelectArticle"; } ?> diff --git a/administrator/components/com_content/tmpl/featured/default.php b/administrator/components/com_content/tmpl/featured/default.php index e114e65df07bc..ca1eb0d57b54b 100644 --- a/administrator/components/com_content/tmpl/featured/default.php +++ b/administrator/components/com_content/tmpl/featured/default.php @@ -64,7 +64,7 @@ JS; // @todo mode the script to a file -Factory::getDocument()->addScriptDeclaration($js); +$this->document->addScriptDeclaration($js); $featuredButton = (new ActionButton(['tip_title' => 'JGLOBAL_TOGGLE_FEATURED'])) ->addState(0, 'articles.featured', 'unfeatured', 'COM_CONTENT_UNFEATURED') diff --git a/administrator/components/com_fields/tmpl/field/modal.php b/administrator/components/com_fields/tmpl/field/modal.php index df012e29b3da2..42ff5993a88b4 100644 --- a/administrator/components/com_fields/tmpl/field/modal.php +++ b/administrator/components/com_fields/tmpl/field/modal.php @@ -22,7 +22,7 @@ $this->useCoreUI = true; -Factory::getDocument()->addScriptDeclaration(" +$this->document->addScriptDeclaration(" Joomla.submitbutton = function(task) { if (task == 'field.cancel' || document.formvalidator.isValid(document.getElementById('item-form'))) diff --git a/administrator/components/com_finder/tmpl/indexer/default.php b/administrator/components/com_finder/tmpl/indexer/default.php index 0ae26697975a7..7a4cef625958d 100644 --- a/administrator/components/com_finder/tmpl/indexer/default.php +++ b/administrator/components/com_finder/tmpl/indexer/default.php @@ -15,7 +15,7 @@ HTMLHelper::_('behavior.keepalive'); HTMLHelper::_('script', 'com_finder/indexer.min.js', array('version' => 'auto', 'relative' => true)); -Factory::getDocument()->addScriptDeclaration('var msg = "' . Text::_('COM_FINDER_INDEXER_MESSAGE_COMPLETE') . '";'); +$this->document->addScriptDeclaration('var msg = "' . Text::_('COM_FINDER_INDEXER_MESSAGE_COMPLETE') . '";'); ?>
diff --git a/administrator/components/com_joomlaupdate/tmpl/update/default.php b/administrator/components/com_joomlaupdate/tmpl/update/default.php index e85c98ec70eec..c2eede236be90 100644 --- a/administrator/components/com_joomlaupdate/tmpl/update/default.php +++ b/administrator/components/com_joomlaupdate/tmpl/update/default.php @@ -28,7 +28,7 @@ HTMLHelper::_('script', 'com_joomlaupdate/admin-update-default.js', ['version' => 'auto', 'relative' => true]); -Factory::getDocument()->addScriptOptions( +$this->document->addScriptOptions( 'joomlaupdate', [ 'password' => $password, diff --git a/administrator/components/com_media/tmpl/file/default.php b/administrator/components/com_media/tmpl/file/default.php index 62a3bcf8598ca..c6b74577d5e45 100644 --- a/administrator/components/com_media/tmpl/file/default.php +++ b/administrator/components/com_media/tmpl/file/default.php @@ -51,7 +51,7 @@ 'contents' => $this->file->content, ]; -Factory::getDocument()->addScriptOptions('com_media', $config); +$this->document->addScriptOptions('com_media', $config); $this->useCoreUI = true; ?> diff --git a/administrator/components/com_media/tmpl/media/default.php b/administrator/components/com_media/tmpl/media/default.php index abbc9a6be6345..6317ea8d9d55b 100644 --- a/administrator/components/com_media/tmpl/media/default.php +++ b/administrator/components/com_media/tmpl/media/default.php @@ -15,7 +15,6 @@ use Joomla\CMS\Toolbar\Toolbar; use Joomla\CMS\Uri\Uri; -$doc = Factory::getDocument(); $params = ComponentHelper::getParams('com_media'); // Make sure core.js is loaded before media scripts @@ -53,6 +52,6 @@ 'currentPath' => $this->currentPath, 'isModal' => Factory::getApplication()->input->getCmd('tmpl', '') === 'component' ? true : false, ); -$doc->addScriptOptions('com_media', $config); +$this->document->addScriptOptions('com_media', $config); ?>
diff --git a/administrator/components/com_menus/tmpl/item/edit.php b/administrator/components/com_menus/tmpl/item/edit.php index 8810438a9bd21..9ffae5e2e7745 100644 --- a/administrator/components/com_menus/tmpl/item/edit.php +++ b/administrator/components/com_menus/tmpl/item/edit.php @@ -26,7 +26,7 @@ Text::script('ERROR'); Text::script('JGLOBAL_VALIDATION_FORM_FAILED'); -Factory::getDocument()->addScriptOptions('menu-item', ['itemId' => (int) $this->item->id]); +$this->document->addScriptOptions('menu-item', ['itemId' => (int) $this->item->id]); HTMLHelper::_('script', 'com_menus/admin-item-edit.min.js', ['version' => 'auto', 'relative' => true]); // Ajax for parent items diff --git a/administrator/components/com_menus/tmpl/item/edit_modules.php b/administrator/components/com_menus/tmpl/item/edit_modules.php index 73864a17b67cf..62c3a06e57ea0 100644 --- a/administrator/components/com_menus/tmpl/item/edit_modules.php +++ b/administrator/components/com_menus/tmpl/item/edit_modules.php @@ -21,7 +21,7 @@ $allLevels[$value->id] = $value->title; } -Factory::getDocument()->addScriptOptions('menus-edit-modules', ['viewLevels' => $allLevels, 'itemId' => $this->item->id]); +$this->document->addScriptOptions('menus-edit-modules', ['viewLevels' => $allLevels, 'itemId' => $this->item->id]); HTMLHelper::_('stylesheet', 'com_menus/admin-item-edit_modules.css', array('version' => 'auto', 'relative' => true)); HTMLHelper::_('script', 'com_menus/admin-item-edit_modules.min.js', array('version' => 'auto', 'relative' => true)); diff --git a/administrator/components/com_menus/tmpl/items/modal.php b/administrator/components/com_menus/tmpl/items/modal.php index 83e86eb6fe6f4..a12ee960cbb4b 100644 --- a/administrator/components/com_menus/tmpl/items/modal.php +++ b/administrator/components/com_menus/tmpl/items/modal.php @@ -37,7 +37,7 @@ if (!empty($editor)) { // This view is used also in com_menus. Load the xtd script only if the editor is set! - Factory::getDocument()->addScriptOptions('xtd-menus', array('editor' => $editor)); + $this->document->addScriptOptions('xtd-menus', array('editor' => $editor)); $onclick = "jSelectMenuItem"; $link = 'index.php?option=com_menus&view=items&layout=modal&tmpl=component&editor=' . $editor . '&' . Session::getFormToken() . '=1'; } diff --git a/administrator/components/com_menus/tmpl/menus/default.php b/administrator/components/com_menus/tmpl/menus/default.php index 595dad9186b54..d113cf78e4922 100644 --- a/administrator/components/com_menus/tmpl/menus/default.php +++ b/administrator/components/com_menus/tmpl/menus/default.php @@ -33,7 +33,7 @@ } } -Factory::getDocument()->addScriptOptions('menus-default', ['items' => $itemIds]); +$this->document->addScriptOptions('menus-default', ['items' => $itemIds]); HTMLHelper::_('jquery.framework'); HTMLHelper::_('script', 'com_menus/admin-menus-default.min.js', array('version' => 'auto', 'relative' => true)); ?> diff --git a/administrator/components/com_modules/tmpl/module/edit.php b/administrator/components/com_modules/tmpl/module/edit.php index 491d38c051820..f2fe205165c98 100644 --- a/administrator/components/com_modules/tmpl/module/edit.php +++ b/administrator/components/com_modules/tmpl/module/edit.php @@ -38,7 +38,7 @@ Text::script('JALL'); Text::script('JTRASHED'); -Factory::getDocument()->addScriptOptions('module-edit', ['itemId' => $this->item->id, 'state' => (int) $this->item->id == 0 ? 'Add' : 'Edit']); +$this->document->addScriptOptions('module-edit', ['itemId' => $this->item->id, 'state' => (int) $this->item->id == 0 ? 'Add' : 'Edit']); HTMLHelper::_('script', 'com_modules/admin-module-edit.min.js', array('version' => 'auto', 'relative' => true)); $input = Factory::getApplication()->input; diff --git a/administrator/components/com_modules/tmpl/modules/default_batch_body.php b/administrator/components/com_modules/tmpl/modules/default_batch_body.php index 62b105e5d2828..bad7cef12a815 100644 --- a/administrator/components/com_modules/tmpl/modules/default_batch_body.php +++ b/administrator/components/com_modules/tmpl/modules/default_batch_body.php @@ -32,7 +32,7 @@ Text::script('JGLOBAL_SELECT_NO_RESULTS_MATCH'); Text::script('JGLOBAL_SELECT_PRESS_TO_SELECT'); -Factory::getDocument()->getWebAssetManager()->enableAsset('choicesjs'); +$this->document->getWebAssetManager()->enableAsset('choicesjs'); HTMLHelper::_('webcomponent', 'system/fields/joomla-field-fancy-select.min.js', ['version' => 'auto', 'relative' => true]); ?> diff --git a/administrator/components/com_modules/tmpl/select/default.php b/administrator/components/com_modules/tmpl/select/default.php index 7bdbf69f4bf79..a6ace9a62bdd5 100644 --- a/administrator/components/com_modules/tmpl/select/default.php +++ b/administrator/components/com_modules/tmpl/select/default.php @@ -14,8 +14,6 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; -$document = Factory::getDocument(); - $app = Factory::getApplication(); $function = $app->input->getCmd('function'); diff --git a/administrator/components/com_postinstall/tmpl/messages/default.php b/administrator/components/com_postinstall/tmpl/messages/default.php index ffe788fb05321..28cf8260b7a68 100644 --- a/administrator/components/com_postinstall/tmpl/messages/default.php +++ b/administrator/components/com_postinstall/tmpl/messages/default.php @@ -16,7 +16,7 @@ use Joomla\CMS\Router\Route; $lang = Factory::getLanguage(); -$renderer = Factory::getDocument()->loadRenderer('module'); +$renderer = $this->document->loadRenderer('module'); $options = array('style' => 'raw'); $mod = ModuleHelper::getModule('mod_feed'); $param = array( diff --git a/administrator/components/com_privacy/tmpl/request/default.php b/administrator/components/com_privacy/tmpl/request/default.php index 1c108b9d9784b..7f04a25feb17e 100644 --- a/administrator/components/com_privacy/tmpl/request/default.php +++ b/administrator/components/com_privacy/tmpl/request/default.php @@ -30,7 +30,7 @@ }; JS; -Factory::getDocument()->addScriptDeclaration($js); +$this->document->addScriptDeclaration($js); ?> diff --git a/administrator/components/com_templates/tmpl/template/default.php b/administrator/components/com_templates/tmpl/template/default.php index 8b643443a138e..b2d3bfedb4601 100644 --- a/administrator/components/com_templates/tmpl/template/default.php +++ b/administrator/components/com_templates/tmpl/template/default.php @@ -49,7 +49,7 @@ if ($this->type == 'font') { - Factory::getDocument()->addStyleDeclaration(" + $this->document->addStyleDeclaration(" @font-face { font-family: previewFont; src: url('" . $this->font['address'] . "') diff --git a/components/com_contact/View/Contact/VcfView.php b/components/com_contact/View/Contact/VcfView.php index 416f8e08a951a..62e4cf01888f4 100644 --- a/components/com_contact/View/Contact/VcfView.php +++ b/components/com_contact/View/Contact/VcfView.php @@ -47,7 +47,7 @@ public function display($tpl = null) throw new GenericDataException(implode("\n", $errors), 500); } - Factory::getDocument()->setMimeEncoding('text/directory', true); + $this->document->setMimeEncoding('text/directory', true); // Compute lastname, firstname and middlename $item->name = trim($item->name); diff --git a/components/com_content/View/Featured/FeedView.php b/components/com_content/View/Featured/FeedView.php index 1a383190a58cc..b73a2016d672c 100644 --- a/components/com_content/View/Featured/FeedView.php +++ b/components/com_content/View/Featured/FeedView.php @@ -37,11 +37,11 @@ public function display($tpl = null) { // Parameters $app = Factory::getApplication(); - $doc = Factory::getDocument(); $params = $app->getParams(); $feedEmail = $app->get('feed_email', 'none'); $siteEmail = $app->get('mailfrom'); - $doc->link = Route::_('index.php?option=com_content&view=featured'); + + $this->document->link = Route::_('index.php?option=com_content&view=featured'); // Get some data from the model $app->input->set('limit', $app->get('feed_limit')); @@ -123,7 +123,7 @@ public function display($tpl = null) $item->description = '
' . $description . '
'; // Loads item info into rss array - $doc->addItem($item); + $this->document->addItem($item); } } } diff --git a/components/com_content/tmpl/categories/default.php b/components/com_content/tmpl/categories/default.php index d6415c01fd167..9bfd55e597d4f 100644 --- a/components/com_content/tmpl/categories/default.php +++ b/components/com_content/tmpl/categories/default.php @@ -9,7 +9,6 @@ defined('_JEXEC') or die; -use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; @@ -49,7 +48,7 @@ JS; // @todo move script to a file -Factory::getDocument()->addScriptDeclaration($js); +$this->document->addScriptDeclaration($js); ?>
params->get('opensearch_name', Text::_('COM_FINDER_OPENSEARCH_NAME') . ' ' . Factory::getApplication()->get('sitename') ); - Factory::getDocument()->addHeadLink( + $this->document->addHeadLink( Uri::getInstance()->toString(array('scheme', 'host', 'port')) . Route::_('index.php?option=com_finder&view=search&format=opensearch'), 'search', 'rel', array('title' => $ostitle, 'type' => 'application/opensearchdescription+xml') ); diff --git a/components/com_finder/View/Search/OpensearchView.php b/components/com_finder/View/Search/OpensearchView.php index 57ee00ac3a9d5..5c66cb3420e2e 100644 --- a/components/com_finder/View/Search/OpensearchView.php +++ b/components/com_finder/View/Search/OpensearchView.php @@ -36,12 +36,11 @@ class OpensearchView extends AbstractView */ public function display($tpl = null) { - $doc = Factory::getDocument(); $app = Factory::getApplication(); $params = ComponentHelper::getParams('com_finder'); - $doc->setShortName($params->get('opensearch_name', $app->get('sitename'))); - $doc->setDescription($params->get('opensearch_description', $app->get('MetaDesc'))); + $this->document->setShortName($params->get('opensearch_name', $app->get('sitename'))); + $this->document->setDescription($params->get('opensearch_description', $app->get('MetaDesc'))); // Prevent any output when OpenSearch Support is disabled if (!$params->get('opensearch', 1)) @@ -64,19 +63,19 @@ public function display($tpl = null) // Add the HTML result view $htmlSearch = new OpenSearchUrl; $htmlSearch->template = $baseUrl . Route::_($searchUri, false); - $doc->addUrl($htmlSearch); + $this->document->addUrl($htmlSearch); // Add the RSS result view $htmlSearch = new OpenSearchUrl; $htmlSearch->template = $baseUrl . Route::_($searchUri . '&format=feed&type=rss', false); $htmlSearch->type = 'application/rss+xml'; - $doc->addUrl($htmlSearch); + $this->document->addUrl($htmlSearch); // Add the Atom result view $htmlSearch = new OpenSearchUrl; $htmlSearch->template = $baseUrl . Route::_($searchUri . '&format=feed&type=atom', false); $htmlSearch->type = 'application/atom+xml'; - $doc->addUrl($htmlSearch); + $this->document->addUrl($htmlSearch); // Add suggestions URL if ($params->get('show_autosuggest', 1)) @@ -84,7 +83,7 @@ public function display($tpl = null) $htmlSearch = new OpenSearchUrl; $htmlSearch->template = $baseUrl . Route::_($suggestionsUri, false); $htmlSearch->type = 'application/x-suggestions+json'; - $doc->addUrl($htmlSearch); + $this->document->addUrl($htmlSearch); } } } diff --git a/components/com_tags/View/Tag/FeedView.php b/components/com_tags/View/Tag/FeedView.php index ee9be79dc685a..71eecbc3bf8db 100644 --- a/components/com_tags/View/Tag/FeedView.php +++ b/components/com_tags/View/Tag/FeedView.php @@ -33,12 +33,11 @@ class FeedView extends BaseHtmlView */ public function display($tpl = null) { - $app = Factory::getApplication(); - $document = Factory::getDocument(); - $ids = $app->input->get('id', array(), 'array'); - $i = 0; - $tagIds = ''; - $filter = new InputFilter; + $app = Factory::getApplication(); + $ids = $app->input->get('id', array(), 'array'); + $i = 0; + $tagIds = ''; + $filter = new InputFilter; foreach ($ids as $id) { @@ -52,17 +51,18 @@ public function display($tpl = null) $i++; } - $document->link = Route::_('index.php?option=com_tags&view=tag&' . $tagIds); + $this->document->link = Route::_('index.php?option=com_tags&view=tag&' . $tagIds); $app->input->set('limit', $app->get('feed_limit')); - $siteEmail = $app->get('mailfrom'); - $fromName = $app->get('fromname'); - $feedEmail = $app->get('feed_email', 'none'); - $document->editor = $fromName; + $siteEmail = $app->get('mailfrom'); + $fromName = $app->get('fromname'); + $feedEmail = $app->get('feed_email', 'none'); + + $this->document->editor = $fromName; if ($feedEmail !== 'none') { - $document->editorEmail = $siteEmail; + $this->document->editorEmail = $siteEmail; } // Get some data from the model @@ -100,7 +100,7 @@ public function display($tpl = null) } // Loads item info into RSS array - $document->addItem($feeditem); + $this->document->addItem($feeditem); } } } diff --git a/components/com_tags/View/Tags/FeedView.php b/components/com_tags/View/Tags/FeedView.php index bdec1576a68c7..6420c6d005c29 100644 --- a/components/com_tags/View/Tags/FeedView.php +++ b/components/com_tags/View/Tags/FeedView.php @@ -32,19 +32,19 @@ class FeedView extends BaseHtmlView */ public function display($tpl = null) { - $app = Factory::getApplication(); - $document = Factory::getDocument(); - $document->link = Route::_('index.php?option=com_tags&view=tags'); + $app = Factory::getApplication(); + $this->document->link = Route::_('index.php?option=com_tags&view=tags'); $app->input->set('limit', $app->get('feed_limit')); - $siteEmail = $app->get('mailfrom'); - $fromName = $app->get('fromname'); - $feedEmail = $app->get('feed_email', 'none'); - $document->editor = $fromName; + $siteEmail = $app->get('mailfrom'); + $fromName = $app->get('fromname'); + $feedEmail = $app->get('feed_email', 'none'); + + $this->document->editor = $fromName; if ($feedEmail !== 'none') { - $document->editorEmail = $siteEmail; + $this->document->editorEmail = $siteEmail; } // Get some data from the model @@ -81,7 +81,7 @@ public function display($tpl = null) } // Loads item info into RSS array - $document->addItem($feeditem); + $this->document->addItem($feeditem); } } }