Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions components/com_contact/views/category/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ protected function prepareDocument()
$menu = $this->menu;
$id = (int) @$menu->query['id'];

if ($menu && ($menu->query['option'] != $this->extension || $menu->query['view'] == $this->viewName || $id != $this->category->id))
if ($menu && (!isset($menu->query['option']) || $menu->query['option'] != $this->extension || $menu->query['view'] == $this->viewName
|| $id != $this->category->id))
{
$path = array(array('title' => $this->category->title, 'link' => ''));
$category = $this->category->getParent();

while (($menu->query['option'] !== 'com_contact' || $menu->query['view'] === 'contact' || $id != $category->id) && $category->id > 1)
while ((!isset($menu->query['option']) || $menu->query['option'] !== 'com_contact' || $menu->query['view'] === 'contact'
|| $id != $category->id) && $category->id > 1)
{
$path[] = array('title' => $category->title, 'link' => ContactHelperRoute::getCategoryRoute($category->id));
$category = $category->getParent();
Expand Down
6 changes: 4 additions & 2 deletions components/com_contact/views/contact/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,8 @@ protected function _prepareDocument()
$id = (int) @$menu->query['id'];

// If the menu item does not concern this contact
if ($menu && ($menu->query['option'] !== 'com_contact' || $menu->query['view'] !== 'contact' || $id != $this->item->id))
if ($menu && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_contact' || $menu->query['view'] !== 'contact'
|| $id != $this->item->id))
{
// If this is not a single contact menu item, set the page title to the contact title
if ($this->item->name)
Expand All @@ -426,7 +427,8 @@ protected function _prepareDocument()
$path = array(array('title' => $this->contact->name, 'link' => ''));
$category = JCategories::getInstance('Contact')->get($this->contact->catid);

while ($category && ($menu->query['option'] !== 'com_contact' || $menu->query['view'] === 'contact' || $id != $category->id) && $category->id > 1)
while ($category && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_contact' || $menu->query['view'] === 'contact'
|| $id != $category->id) && $category->id > 1)
{
$path[] = array('title' => $category->title, 'link' => ContactHelperRoute::getCategoryRoute($this->contact->catid));
$category = $category->getParent();
Expand Down
6 changes: 4 additions & 2 deletions components/com_content/views/article/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,17 @@ protected function _prepareDocument()
$id = (int) @$menu->query['id'];

// If the menu item does not concern this article
if ($menu && ($menu->query['option'] !== 'com_content' || $menu->query['view'] !== 'article' || $id != $this->item->id))
if ($menu && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_content' || $menu->query['view'] !== 'article'
|| $id != $this->item->id))
{
// If a browser page title is defined, use that, then fall back to the article title if set, then fall back to the page_title option
$title = $this->item->params->get('article_page_title', $this->item->title ?: $title);

$path = array(array('title' => $this->item->title, 'link' => ''));
$category = JCategories::getInstance('Content')->get($this->item->catid);

while ($category && ($menu->query['option'] !== 'com_content' || $menu->query['view'] === 'article' || $id != $category->id) && $category->id > 1)
while ($category && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_content' || $menu->query['view'] === 'article'
|| $id != $category->id) && $category->id > 1)
{
$path[] = array('title' => $category->title, 'link' => ContentHelperRoute::getCategoryRoute($category->id));
$category = $category->getParent();
Expand Down
6 changes: 4 additions & 2 deletions components/com_content/views/category/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,14 @@ protected function prepareDocument()
$menu = $this->menu;
$id = (int) @$menu->query['id'];

if ($menu && ($menu->query['option'] !== 'com_content' || $menu->query['view'] === 'article' || $id != $this->category->id))
if ($menu && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_content' || $menu->query['view'] === 'article'
|| $id != $this->category->id))
{
$path = array(array('title' => $this->category->title, 'link' => ''));
$category = $this->category->getParent();

while (($menu->query['option'] !== 'com_content' || $menu->query['view'] === 'article' || $id != $category->id) && $category->id > 1)
while ((!isset($menu->query['option']) || $menu->query['option'] !== 'com_content' || $menu->query['view'] === 'article'
|| $id != $category->id) && $category->id > 1)
{
$path[] = array('title' => $category->title, 'link' => ContentHelperRoute::getCategoryRoute($category->id));
$category = $category->getParent();
Expand Down
6 changes: 4 additions & 2 deletions components/com_newsfeeds/views/category/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,14 @@ protected function prepareDocument()
$menu = $this->menu;
$id = (int) @$menu->query['id'];

if ($menu && ($menu->query['option'] !== 'com_newsfeeds' || $menu->query['view'] === 'newsfeed' || $id != $this->category->id))
if ($menu && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_newsfeeds' || $menu->query['view'] === 'newsfeed'
|| $id != $this->category->id))
{
$path = array(array('title' => $this->category->title, 'link' => ''));
$category = $this->category->getParent();

while (($menu->query['option'] !== 'com_newsfeeds' || $menu->query['view'] === 'newsfeed' || $id != $category->id) && $category->id > 1)
while ((!isset($menu->query['option']) || $menu->query['option'] !== 'com_newsfeeds' || $menu->query['view'] === 'newsfeed'
|| $id != $category->id) && $category->id > 1)
{
$path[] = array('title' => $category->title, 'link' => NewsfeedsHelperRoute::getCategoryRoute($category->id));
$category = $category->getParent();
Expand Down
6 changes: 4 additions & 2 deletions components/com_newsfeeds/views/newsfeed/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ protected function _prepareDocument()
$id = (int) @$menu->query['id'];

// If the menu item does not concern this newsfeed
if ($menu && ($menu->query['option'] !== 'com_newsfeeds' || $menu->query['view'] !== 'newsfeed' || $id != $this->item->id))
if ($menu && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_newsfeeds' || $menu->query['view'] !== 'newsfeed'
|| $id != $this->item->id))
{
// If this is not a single newsfeed menu item, set the page title to the newsfeed title
if ($this->item->name)
Expand All @@ -252,7 +253,8 @@ protected function _prepareDocument()
$path = array(array('title' => $this->item->name, 'link' => ''));
$category = JCategories::getInstance('Newsfeeds')->get($this->item->catid);

while (($menu->query['option'] !== 'com_newsfeeds' || $menu->query['view'] === 'newsfeed' || $id != $category->id) && $category->id > 1)
while ((!isset($menu->query['option']) || $menu->query['option'] !== 'com_newsfeeds' || $menu->query['view'] === 'newsfeed'
|| $id != $category->id) && $category->id > 1)
{
$path[] = array('title' => $category->title, 'link' => NewsfeedsHelperRoute::getCategoryRoute($category->id));
$category = $category->getParent();
Expand Down
4 changes: 2 additions & 2 deletions components/com_tags/views/tag/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ protected function _prepareDocument()
$app = JFactory::getApplication();
$menu = $app->getMenu()->getActive();
$this->tags_title = $this->getTagsTitle();
$pathway = $app->getPathway();
$pathway = $app->getPathway();
$title = '';

// Highest priority for "Browser Page Title".
Expand All @@ -278,7 +278,7 @@ protected function _prepareDocument()
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
$title = $title ?: $this->params->get('page_title', $menu->title);

if ($menu->query['option'] !== 'com_tags')
if (!isset($menu->query['option']) || $menu->query['option'] !== 'com_tags')
{
$this->params->set('page_subheading', $menu->title);
}
Expand Down
4 changes: 2 additions & 2 deletions components/com_tags/views/tags/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function display($tpl = null)
$active = JFactory::getApplication()->getMenu()->getActive();

// Load layout from active query (in case it is an alternative menu item)
if ($active && $active->query['option'] === 'com_tags' && $active->query['view'] === 'tags')
if ($active && isset($active->query['option']) && $active->query['option'] === 'com_tags' && $active->query['view'] === 'tags')
{
if (isset($active->query['layout']))
{
Expand Down Expand Up @@ -126,7 +126,7 @@ protected function _prepareDocument()
$this->params->def('page_heading', JText::_('COM_TAGS_DEFAULT_PAGE_TITLE'));
}

if ($menu && $menu->query['option'] !== 'com_tags')
if ($menu && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_tags'))
{
$this->params->set('page_subheading', $menu->title);
}
Expand Down