From 65595056f321b2b5232b1de84a1479fd8ef09d25 Mon Sep 17 00:00:00 2001 From: mcfly Date: Mon, 26 Apr 2010 18:40:27 +0000 Subject: [PATCH] Few more changes due to shortcode changes --- .../core/shortcodes/batch/post_shortcodes.php | 3 +- .../core/shortcodes/batch/view_shortcodes.php | 1 + e107_plugins/forum/forum_post.php | 36 ++----------------- 3 files changed, 5 insertions(+), 35 deletions(-) diff --git a/e107_plugins/forum/core/shortcodes/batch/post_shortcodes.php b/e107_plugins/forum/core/shortcodes/batch/post_shortcodes.php index 559e7b85f..926d358e1 100644 --- a/e107_plugins/forum/core/shortcodes/batch/post_shortcodes.php +++ b/e107_plugins/forum/core/shortcodes/batch/post_shortcodes.php @@ -1,12 +1,13 @@ e107 = e107::getInstance(); } diff --git a/e107_plugins/forum/core/shortcodes/batch/view_shortcodes.php b/e107_plugins/forum/core/shortcodes/batch/view_shortcodes.php index 6c61195c6..c8b645b1d 100644 --- a/e107_plugins/forum/core/shortcodes/batch/view_shortcodes.php +++ b/e107_plugins/forum/core/shortcodes/batch/view_shortcodes.php @@ -7,6 +7,7 @@ class plugin_forum_view_shortcodes extends e_shortcode function __construct() { + parent::__construct(); $this->e107 = e107::getInstance(); } diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index 15830df9c..3befe846a 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -71,9 +71,8 @@ if (!$forum->checkPerm($forumId, 'post')) define('MODERATOR', USER && $forum->isModerator(USERID)); require_once(e_HANDLER.'ren_help.php'); -//require_once(e_HANDLER.'forum_include.php'); -e107::getScBatch('forum', 'forum'); -e107::getScBatch('forum_post', 'forum')->setScVar('forum', $forum)->setScVar('threadInfo', $threadInfo); +e107::getScBatch('view', 'forum'); +e107::getScBatch('post', 'forum')->setScVar('forum', $forum)->setScVar('threadInfo', $threadInfo); $gen = new convert; $fp = new floodprotect; @@ -490,42 +489,12 @@ if (!$FORUMPOST) } } -/* check post access (bugtracker #1424) */ -//if($action == "rp" && !$sql -> db_Select("forum_t", "*", "thread_id='{$id}'")) -//{ -// $ns -> tablerender(LAN_20, "
".LAN_399."
"); -// require_once(FOOTERF); -// exit; -//} -//elseif($action == "nt") -//{ -// if (!$sact && !$sql -> db_Select("forum", "*", "forum_id='{$id}'")) -// { -// $ns -> tablerender(LAN_20, "
".LAN_399."
"); -// require_once(FOOTERF); -// exit; -// } -//} -//else -//{ -// // DB access should pass - after all, the thread should exist -// $sql->db_Select_gen("SELECT t.*, p.forum_postclass FROM #forum_t AS t -// LEFT JOIN #forum AS p ON t.thread_forum_id=p.forum_id WHERE thread_id='{$id}'"); -// $fpr = $sql -> db_Fetch(); -// if(!check_class($fpr['forum_postclass'])) -// { -// $ns -> tablerender(LAN_20, "
".LAN_399."
"); -// require_once(FOOTERF); -// exit; -// } -//} if($action == 'rp') { $FORUMPOST = $FORUMPOST_REPLY; } $text = $tp->parseTemplate($FORUMPOST, true); -//$text = $tp->parseTemplate($FORUMPOST, FALSE, $forum_post_shortcodes); // ------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -542,7 +511,6 @@ else function isAuthor() { global $postInfo; -// print_a($postInfo); return ((USERID === $postInfo['post_user']) || MODERATOR); }