From 0d3e4e8e4dc008c0be9587cc15791aab35c97367 Mon Sep 17 00:00:00 2001 From: secretr Date: Fri, 29 Apr 2011 11:15:47 +0000 Subject: [PATCH] news preview only in admin area --- e107_core/shortcodes/batch/news_shortcodes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php index 1cb662fa2..322bafa3d 100644 --- a/e107_core/shortcodes/batch/news_shortcodes.php +++ b/e107_core/shortcodes/batch/news_shortcodes.php @@ -29,7 +29,7 @@ class news_shortcodes extends e_shortcode //protected $news_item; - shouldn't be set - see __set/__get methods of e_shortcode & news::render_newsitem() protected $e107; //protected $param; - shouldn't be set - see __set/__get methods of e_shortcode & news::render_newsitem() - + function __construct($eVars = null) { parent::__construct($eVars); @@ -225,7 +225,7 @@ class news_shortcodes extends e_shortcode { $es2 = POST_EXTENDEDSTRING; } - if (isset($_POST['preview'])) + if (deftrue('ADMIN_AREA') && isset($_POST['preview'])) { return $es1.EXTENDEDSTRING.$es2."
".$this->news_item['news_extended']; }