diff --git a/e107_core/templates/header_default.php b/e107_core/templates/header_default.php index d69593873..73bcb9789 100644 --- a/e107_core/templates/header_default.php +++ b/e107_core/templates/header_default.php @@ -163,7 +163,8 @@ if ($e_headers && is_array($e_headers)) } unset($e_headers); -echo e107::getUrl()->response()->renderMeta()."\n"; // render all the e107::meta() entries. +// echo e107::getUrl()->response()->renderMeta()."\n"; // render all the e107::meta() entries. +echo e107::getSingleton('eResponse')->renderMeta()."\n"; echo "".(defined('e_PAGETITLE') ? e_PAGETITLE.' - ' : (defined('PAGE_NAME') ? PAGE_NAME.' - ' : "")).SITENAME."\n\n"; @@ -490,8 +491,15 @@ function render_meta($type) } // legay meta-tag checks. +/* $isKeywords = e107::getUrl()->response()->getMetaKeywords(); $isDescription = e107::getUrl()->response()->getMetaDescription(); +*/ + +$isKeywords = e107::getSingleton('eResponse')->getMetaKeywords(); +$isDescription = e107::getSingleton('eResponse')->getMetaDescription(); + + if(empty($isKeywords)) { echo (defined("META_KEYWORDS")) ? "\n\n" : render_meta('keywords'); diff --git a/e107_handlers/application.php b/e107_handlers/application.php index edda9f97a..3a5f3b85b 100644 --- a/e107_handlers/application.php +++ b/e107_handlers/application.php @@ -389,7 +389,8 @@ class eFront $router = new eRouter(); $this->setRouter($router); - $response = new eResponse(); + // $response = new eResponse(); + $response = e107::getSingleton('eResponse'); $this->setResponse($response); return $this; @@ -4273,8 +4274,8 @@ class eResponse $attrData = ''; e107::getEvent()->trigger('system_meta_pre'); - - foreach ($this->_meta as $attr) + + foreach ($this->_meta as $attr) { $attrData .= ' $v) diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index d7f012f5d..9b6658235 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -2276,17 +2276,20 @@ class e107 */ public static function meta($name = null, $content = null, $extended = array()) { + $response = self::getSingleton('eResponse'); + if($name === 'description') { - self::getUrl()->response()->addMetaDescription($content); //Cam: TBD + $response->addMetaDescription($content); //Cam: TBD } if($name === 'keywords') { - self::getUrl()->response()->addMetaKeywords($content); //Cam: TBD + $response->addMetaKeywords($content); //Cam: TBD } - - return self::getUrl()->response()->addMeta($name, $content, $extended); + + return $response->addMeta($name, $content, $extended); + // return self::getUrl()->response()->addMeta($name, $content, $extended); } /** diff --git a/e107_plugins/social/e_shortcode.php b/e107_plugins/social/e_shortcode.php index e95a9b092..0a6616fd3 100644 --- a/e107_plugins/social/e_shortcode.php +++ b/e107_plugins/social/e_shortcode.php @@ -234,7 +234,8 @@ class social_shortcodes extends e_shortcode $defaultUrl = vartrue($this->var['url'], e_REQUEST_URL); $defaultTitle = vartrue($this->var['title'], deftrue('e_PAGETITLE'). " | ". SITENAME); - $defaultDiz = vartrue($this->var['description'], e107::getUrl()->response()->getMetaDescription()); + // $defaultDiz = vartrue($this->var['description'], e107::getUrl()->response()->getMetaDescription()); + $defaultDiz = vartrue($this->var['description'], e107::getSingleton('eResponse')->getMetaDescription()); $defaultTags = vartrue($this->var['tags'],''); $tp = e107::getParser();