From ef5b7de2b2998600afe2d0148e680b38b17d9073 Mon Sep 17 00:00:00 2001 From: Kenji ITO Date: Mon, 9 Jan 2017 11:46:24 +0900 Subject: [PATCH] Fixed errors with MySQL-5.7 --- plugins/staticpages/functions.inc | 2 ++ plugins/staticpages/services.inc.php | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/staticpages/functions.inc b/plugins/staticpages/functions.inc index 4ef07fd13..9906a42e1 100755 --- a/plugins/staticpages/functions.inc +++ b/plugins/staticpages/functions.inc @@ -302,6 +302,7 @@ function SP_countVisiblePages() * @param array $A static page data * @param string $comment_order sorting of comments * @param string $comment_mode comment mode (nested, flat, etc.) + * @param int $comment_page * @param int $msg optional message number * @param string $query optional search query string to highlight * @return string HTML for the static page @@ -1742,6 +1743,7 @@ function SP_render_content($sp_id, $sp_content, $sp_php, $cache_time = 0, $templ foreach ($tag as &$value) { $value = PLG_replaceTags($value); } + unset($value); $args = array( 'sp_id' => $template_id, diff --git a/plugins/staticpages/services.inc.php b/plugins/staticpages/services.inc.php index 16e6e8a53..1af2f28af 100644 --- a/plugins/staticpages/services.inc.php +++ b/plugins/staticpages/services.inc.php @@ -745,7 +745,10 @@ function service_get_staticpages($args, &$output, &$svc_msg) $topic_perms .= " OR (ta.tid = '" . TOPIC_HOMEONLY_OPTION . "' OR ta.tid = '" . TOPIC_ALL_OPTION . "'))"; } } - $topic_perms .= " GROUP BY sp_id"; + $topic_perms .= " GROUP BY sp_id, sp_title, sp_page_title, sp_content, sp_onhits, sp_onlastupdate, sp_hits, " + . "created, modified, sp_format, commentcode, meta_description, meta_keywords, template_flag, template_id, " + . "draft_flag, owner_id, group_id, perm_owner, perm_group, perm_members, perm_anon, sp_help, sp_php, " + . "sp_inblock,cache_time"; $sql = array(); $sql['mysql'] = "SELECT sp_id,sp_title,sp_page_title,sp_content,sp_onhits,sp_onlastupdate,sp_hits,created,modified,sp_format,"