Skip to content

Commit

Permalink
Merge pull request #322 from apghalsasi25/Bug#154919
Browse files Browse the repository at this point in the history
Bug #321 fix: Local Site>> Getting some technical message once user installed the latest package on local site.
  • Loading branch information
ankush-maherwal committed Jan 13, 2020
2 parents 5e788f2 + 2d468d6 commit 8f2cfa1
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/components/com_tjucm/site/views/itemform/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ class TjucmViewItemform extends JViewLegacy
*/
protected $copyRecId;

/**
* The Title of view
*
* @var String
*
* @since 1.2.4
*/
protected $title;

/**
* Display the view
*
Expand Down Expand Up @@ -307,7 +316,7 @@ protected function _prepareDocument()
{
$app = Factory::getApplication();
$menus = $app->getMenu();
$title = null;
$this->title = null;

// Because the application sets a default page title,
// we need to get it from the menu item itself
Expand All @@ -322,22 +331,22 @@ protected function _prepareDocument()
$this->params->def('page_heading', Text::_('COM_TJUCM_DEFAULT_PAGE_TITLE'));
}

$title = $this->params->get('page_title', '');
$this->title = $this->params->get('page_title', '');

if (empty($title))
if (empty($this->title))
{
$title = $app->get('sitename');
$this->title = $app->get('sitename');
}
elseif ($app->get('sitename_pagetitles', 0) == 1)
{
$title = Text::sprintf('JPAGETITLE', $app->get('sitename'), $title);
$this->title = Text::sprintf('JPAGETITLE', $app->get('sitename'), $this->title);
}
elseif ($app->get('sitename_pagetitles', 0) == 2)
{
$title = Text::sprintf('JPAGETITLE', $title, $app->get('sitename'));
$this->title = Text::sprintf('JPAGETITLE', $this->title, $app->get('sitename'));
}

$this->document->setTitle($title);
$this->document->setTitle($this->title);

if ($this->params->get('menu-meta_description'))
{
Expand Down

0 comments on commit 8f2cfa1

Please sign in to comment.