From 6f42d26dd587f44fcae267e9582fa148e611f082 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 2 Oct 2017 13:59:09 -0700 Subject: [PATCH] Fix Comment menu caption. --- e107_plugins/comment_menu/comment_menu.php | 21 +++++++++++++++++++++ e107_plugins/comment_menu/config.php | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/e107_plugins/comment_menu/comment_menu.php b/e107_plugins/comment_menu/comment_menu.php index cca3b78be..8fd2cab79 100644 --- a/e107_plugins/comment_menu/comment_menu.php +++ b/e107_plugins/comment_menu/comment_menu.php @@ -19,6 +19,21 @@ if (!defined('e107_INIT')) exit; } + /** + * @todo upgrade prefs usage and use e_menu.php instead of config.php + */ + +/* + if(is_string($parm)) + { + parse_str($parm, $parms); + } + else + { + $parms = $parm; + } +*/ + require_once (e_PLUGIN."comment_menu/comment_menu_shortcodes.php"); $cobj = e107::getObject('comment'); @@ -37,6 +52,8 @@ else } global $menu_pref; + + $data = $cobj->getCommentData(intval($menu_pref['comment_display'])); $text = ''; @@ -79,6 +96,10 @@ if(!empty($title[e_LANGUAGE])) { $title = $title[e_LANGUAGE]; } +elseif(!empty($title[e_LANGUAGE][e_LANGUAGE])) // fix for saving bug. +{ + $title = $title[e_LANGUAGE][e_LANGUAGE]; +} if(empty($title)) { diff --git a/e107_plugins/comment_menu/config.php b/e107_plugins/comment_menu/config.php index 730b5b13b..15e237c73 100644 --- a/e107_plugins/comment_menu/config.php +++ b/e107_plugins/comment_menu/config.php @@ -41,8 +41,8 @@ if (isset($_POST['update_menu'])) { if($key == "comment_caption") { - $temp['comment_caption'][e_LANGUAGE] = $tp->toDB($value); - continue; + // $temp['comment_caption'][e_LANGUAGE] = $tp->toDB($value); + // continue; }