mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 04:38:27 +01:00
Fix: Admin Area > Meta Tags > Keywords to be considered as global keywords to append to all pages of the site as originally intended. Leave blank to disable.
This commit is contained in:
parent
845b489f70
commit
20e15a4ac0
@ -3979,7 +3979,7 @@ class eResponse
|
||||
'jsonNoTitle' => false,
|
||||
'jsonRender' => false,
|
||||
);
|
||||
|
||||
|
||||
public function setParam($key, $value)
|
||||
{
|
||||
$this->_params[$key] = $value;
|
||||
@ -4048,8 +4048,8 @@ class eResponse
|
||||
|
||||
/**
|
||||
* Append content
|
||||
* @param str $body
|
||||
* @param str $ns namespace
|
||||
* @param string $body
|
||||
* @param string $ns namespace
|
||||
* @return eResponse
|
||||
*/
|
||||
public function appendBody($body, $ns = 'default')
|
||||
@ -4065,8 +4065,8 @@ class eResponse
|
||||
|
||||
/**
|
||||
* Set content
|
||||
* @param str $body
|
||||
* @param str $ns namespace
|
||||
* @param string $body
|
||||
* @param string $ns namespace
|
||||
* @return eResponse
|
||||
*/
|
||||
public function setBody($body, $ns = 'default')
|
||||
@ -4128,8 +4128,8 @@ class eResponse
|
||||
|
||||
/**
|
||||
* Prepend content
|
||||
* @param str $body
|
||||
* @param str $ns namespace
|
||||
* @param string $body
|
||||
* @param string $ns namespace
|
||||
* @return eResponse
|
||||
*/
|
||||
function prependBody($body, $ns = 'default')
|
||||
@ -4138,7 +4138,7 @@ class eResponse
|
||||
{
|
||||
$this->_body[$ns] = '';
|
||||
}
|
||||
$this->_body[$ns] = $content.$this->_body[$ns];
|
||||
// $this->_body[$ns] = $content.$this->_body[$ns];
|
||||
|
||||
return $this;
|
||||
}
|
||||
@ -4337,6 +4337,19 @@ class eResponse
|
||||
|
||||
e107::getEvent()->trigger('system_meta_pre', $this->_meta);
|
||||
|
||||
$pref = e107::getPref();
|
||||
|
||||
if(!empty($pref['meta_keywords'][e_LANGUAGE])) // Always append (global) meta keywords to the end.
|
||||
{
|
||||
$tmp1 = (array) explode(",", $this->getMetaKeywords());
|
||||
$tmp2 = (array) explode(",", $pref['meta_keywords'][e_LANGUAGE]);
|
||||
|
||||
$tmp3 = array_unique(array_merge($tmp1,$tmp2));
|
||||
|
||||
$this->setMeta('keywords', implode(',',$tmp3));
|
||||
}
|
||||
|
||||
|
||||
foreach ($this->_meta as $attr)
|
||||
{
|
||||
$attrData .= '<meta';
|
||||
@ -4562,7 +4575,7 @@ class eResponse
|
||||
$override = array_merge(array(
|
||||
'header' => $title,
|
||||
'body' => $content,
|
||||
'footer' => $statusText,
|
||||
// 'footer' => $statusText, // FIXME $statusText has no value.
|
||||
), $override);
|
||||
echo $jshelper->buildJsonResponse($override);
|
||||
$jshelper->sendJsonResponse(null);
|
||||
|
@ -2365,6 +2365,7 @@ class e107
|
||||
*/
|
||||
public static function meta($name = null, $content = null, $extended = array())
|
||||
{
|
||||
/** @var eResponse $response */
|
||||
$response = self::getSingleton('eResponse');
|
||||
|
||||
if($name === 'description')
|
||||
|
Loading…
x
Reference in New Issue
Block a user