mirror of
https://github.com/e107inc/e107.git
synced 2025-08-11 17:14:42 +02:00
Issue #4783 Site name was still being appended to the <title> tag. Site name has now been removed when using news_meta_title.
This commit is contained in:
@@ -4093,7 +4093,8 @@ class eResponse
|
||||
{
|
||||
protected $_body = array('default' => '');
|
||||
protected $_title = array('default' => array());
|
||||
protected $_e_PAGETITLE = array();
|
||||
protected $_e_PAGETITLE = array(); // partial <title> tag.
|
||||
protected $_e_PAGETITLE_OVERRIDE = array(); // Full <title> tag
|
||||
protected $_META_DESCRIPTION = array();
|
||||
protected $_META_KEYWORDS = array();
|
||||
protected $_render_mod = array('default' => 'default');
|
||||
@@ -4600,7 +4601,7 @@ class eResponse
|
||||
{
|
||||
$content = str_replace('&', '&', $content);
|
||||
|
||||
if($meta !== '_e_PAGETITLE')
|
||||
if($meta !== '_e_PAGETITLE' && $meta !== '_e_PAGETITLE_OVERRIDE')
|
||||
{
|
||||
$content = htmlspecialchars((string) $content, ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
@@ -4642,23 +4643,40 @@ class eResponse
|
||||
* @param string $title
|
||||
* @return eResponse
|
||||
*/
|
||||
public function addMetaTitle($title, $reset=false)
|
||||
public function addMetaTitle($title, $reset=false, $override=false)
|
||||
{
|
||||
if($reset)
|
||||
{
|
||||
$this->_e_PAGETITLE = array();
|
||||
if($override)
|
||||
{
|
||||
$this->_e_PAGETITLE_OVERRIDE = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_e_PAGETITLE = array();
|
||||
}
|
||||
}
|
||||
|
||||
$title = str_replace([''','''], "'", $title);
|
||||
|
||||
if($override)
|
||||
{
|
||||
return $this->addMetaData('e_PAGETITLE_OVERRIDE', $title);
|
||||
}
|
||||
|
||||
return $this->addMetaData('e_PAGETITLE', $title);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getMetaTitle()
|
||||
public function getMetaTitle($override = false)
|
||||
{
|
||||
if($override)
|
||||
{
|
||||
return $this->getMetaData('e_PAGETITLE_OVERRIDE', $this->_meta_title_separator);
|
||||
}
|
||||
|
||||
return $this->getMetaData('e_PAGETITLE', $this->_meta_title_separator);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user