From 668ab7f235fdf520890722269288536bfd3761b8 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Sat, 28 Nov 2020 16:10:05 +0100 Subject: [PATCH] Fixed all unchecked usages of possibly undefined constant BOOTSTRAP --- e107_core/shortcodes/batch/bbcode_shortcodes.php | 2 +- e107_handlers/comment_class.php | 2 +- e107_handlers/form_handler.php | 2 +- e107_plugins/forum/shortcodes/batch/view_shortcodes.php | 4 ++-- e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php | 5 +++-- e107_plugins/news/news.php | 2 +- search.php | 2 +- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/e107_core/shortcodes/batch/bbcode_shortcodes.php b/e107_core/shortcodes/batch/bbcode_shortcodes.php index f1cfd05f9d..7412784b56 100644 --- a/e107_core/shortcodes/batch/bbcode_shortcodes.php +++ b/e107_core/shortcodes/batch/bbcode_shortcodes.php @@ -43,7 +43,7 @@ function bb_format($id) ); - if(BOOTSTRAP) + if(defined('BOOTSTRAP') && BOOTSTRAP) { $text = '
'; $text .= ''; diff --git a/e107_handlers/comment_class.php b/e107_handlers/comment_class.php index 73997c1d67..c6ef678442 100644 --- a/e107_handlers/comment_class.php +++ b/e107_handlers/comment_class.php @@ -1153,7 +1153,7 @@ function compose_comment($table, $action, $id, $width, $subject, $rate = FALSE, } else { - if(BOOTSTRAP) + if(defined('BOOTSTRAP') && BOOTSTRAP) { $comment = e107::getMessage()->addInfo(COMLAN_328)->render(); } diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 335e15a19f..269f22eb9c 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -2103,7 +2103,7 @@ public function pagination($url='', $total=0, $from=0, $perPage=10, $options=arr return ''; } - if(BOOTSTRAP === 4) + if(defined('BOOTSTRAP') && BOOTSTRAP === 4) { return ''.$total.''; } diff --git a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php index cb81819e61..0f42ff82b7 100644 --- a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php @@ -848,7 +848,7 @@ function sc_postoptions() "; }