1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00

Fixed all unchecked usages of possibly undefined constant BOOTSTRAP

This commit is contained in:
Nick Liu 2020-11-28 16:10:05 +01:00
parent b3cc2cf117
commit f20052fa77
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637
7 changed files with 10 additions and 9 deletions

View File

@ -43,7 +43,7 @@ class bbcode_shortcodes extends e_shortcode
);
if(BOOTSTRAP)
if(defined('BOOTSTRAP') && BOOTSTRAP)
{
$text = '<div class="btn-group">';
$text .= '<a class="btn btn-default btn-secondary dropdown-toggle" data-toggle="dropdown" href="#" title="">';

View File

@ -1153,7 +1153,7 @@ class comment
}
else
{
if(BOOTSTRAP)
if(defined('BOOTSTRAP') && BOOTSTRAP)
{
$comment = e107::getMessage()->addInfo(COMLAN_328)->render();
}

View File

@ -2103,7 +2103,7 @@ class e_form
return '';
}
if(BOOTSTRAP === 4)
if(defined('BOOTSTRAP') && BOOTSTRAP === 4)
{
return '<a class="pager-button btn btn-primary" href="'.$url.'">'.$total.'</a>';
}

View File

@ -848,7 +848,7 @@
<button class="btn btn-default btn-secondary btn-sm btn-small dropdown-toggle" data-toggle="dropdown">
' . LAN_FORUM_8013 . '
';
if(BOOTSTRAP !== 4)
if(defined('BOOTSTRAP') && BOOTSTRAP !== 4)
{
$text .= '<span class="caret"></span>';
}
@ -1144,7 +1144,7 @@
' . $replyUrl . '
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
';
if(BOOTSTRAP !== 4)
if(defined('BOOTSTRAP') && BOOTSTRAP !== 4)
{
$text .= '<span class="caret"></span>';
}

View File

@ -71,8 +71,9 @@
function sc_newthreadbuttonx()
{
$bootstrap = defined('BOOTSTRAP') ? BOOTSTRAP : false;
if(!BOOTSTRAP)
if(!$bootstrap)
{
return $this->sc_newthreadbutton();
}
@ -103,7 +104,7 @@
'.($this->var['ntUrl'] ?"":"<span>&nbsp;</span>").'
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
';
if(BOOTSTRAP !== 4)
if($bootstrap !== 4)
{
$text .= '<span class="caret"></span>';
}

View File

@ -1308,7 +1308,7 @@ class news_front
// Only show message if global comments are enabled, but current news item comments are disabled
if(e107::getPref('comments_disabled') == 0 && $news['news_allow_comments'] == 1)
{
if(BOOTSTRAP)
if(defined('BOOTSTRAP') && BOOTSTRAP)
{
return e107::getMessage()->addInfo(LAN_NEWS_13)->render();
}

View File

@ -166,7 +166,7 @@ class search extends e_shortcode
<button class='btn btn-primary dropdown-toggle' tabindex='-1' data-toggle='dropdown' type='button'>
";
if(BOOTSTRAP !== 4)
if(defined('BOOTSTRAP') && BOOTSTRAP !== 4)
{
$text .= "<span class='caret'></span></button>";
}