diff --git a/e107_plugins/faqs/faqs.php b/e107_plugins/faqs/faqs.php index 9464bfaf0..0716bd739 100644 --- a/e107_plugins/faqs/faqs.php +++ b/e107_plugins/faqs/faqs.php @@ -25,7 +25,7 @@ require_once (e_HANDLER."userclass_class.php"); require_once (e_HANDLER."ren_help.php"); require_once (e_HANDLER."comment_class.php"); -if (!$FAQ_VIEW_TEMPLATE) +if (!vartrue($FAQ_VIEW_TEMPLATE)) { if (file_exists(THEME."faqs_template.php")) { diff --git a/e107_plugins/forum/forum_class.php b/e107_plugins/forum/forum_class.php index 26e03fd85..17ad3b28e 100644 --- a/e107_plugins/forum/forum_class.php +++ b/e107_plugins/forum/forum_class.php @@ -1198,7 +1198,7 @@ class e107forum $threadInfo['thread_id'] = intval($threadInfo['thread_id']); $search = array('{THREAD_TITLE}', '{THREAD_HREF}'); - $replace = array($threadInfo['thread_name'], $e107->url->create('forum/thread/view', $threadInfo)); // $thread->threadInfo - no reference found + $replace = array(vartrue($threadInfo['thread_name']), $e107->url->create('forum/thread/view', $threadInfo)); // $thread->threadInfo - no reference found $FORUM_CRUMB['thread']['value'] = str_replace($search, $replace, $FORUM_CRUMB['thread']['value']); $FORUM_CRUMB['fieldlist'] = 'sitename,forums,parent,subparent,forum,thread'; diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index 865255a79..38a09671a 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -83,7 +83,7 @@ define('MODERATOR', USER && $forum->isModerator(USERID)); require_once(e_HANDLER.'ren_help.php'); e107::getScBatch('view', 'forum'); -e107::getScBatch('post', 'forum')->setScVar('forum', $forum)->setScVar('threadInfo', $threadInfo); +e107::getScBatch('post', 'forum')->setScVar('forum', $forum)->setScVar('threadInfo', vartrue($threadInfo)); $gen = new convert; $fp = new floodprotect; @@ -437,7 +437,7 @@ if (isset($_POST['update_reply'])) require_once(HEADERF); -if ($error) +if (vartrue($error)) { $ns->tablerender(LAN_20, $error); } @@ -491,7 +491,7 @@ if ($action == 'edit' || $action == 'quote') // ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- //Load forumpost template -if (!$FORUMPOST) +if (!vartrue($FORUMPOST)) { if (is_readable(THEME.'forum_post_template.php')) { diff --git a/e107_plugins/forum/forum_viewforum.php b/e107_plugins/forum/forum_viewforum.php index f7b97668e..accf1b72d 100644 --- a/e107_plugins/forum/forum_viewforum.php +++ b/e107_plugins/forum/forum_viewforum.php @@ -64,7 +64,7 @@ if (!$forum->checkPerm($forumId, 'view')) $forumInfo = $forum->forumGet($forumId); $threadsViewed = $forum->threadGetUserViewed(); -if (!$FORUM_VIEW_START) +if (!vartrue($FORUM_VIEW_START)) { if (file_exists(THEME.'forum_viewforum_template.php')) { @@ -233,7 +233,7 @@ $reg_threads = 0; $unstuck = false; $threadList = $forum->forumGetThreads($forumId, $threadFrom, $view); -$subList = $forum->forumGetSubs($forum_id); +$subList = $forum->forumGetSubs(vartrue($forum_id)); $gen = new convert; $fVars->SUBFORUMS = ''; diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index 57af9c1f7..054caf76f 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -138,7 +138,7 @@ if (file_exists(THEME . 'forum_design.php')) { include_once (THEME . 'forum_design.php'); } -if (!$FORUMSTART) +if (!vartrue($FORUMSTART)) { if (file_exists(THEME . 'forum_viewtopic_template.php')) { @@ -215,7 +215,7 @@ if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'thread')) $tVars->BUTTONS .= " $thread->threadInfo['thread_forum_id'])) . "'>" . IMAGE_newthread . ""; } -$tVars->POLL = $pollstr; +$tVars->POLL = vartrue($pollstr); $tVars->FORUMJUMP = forumjump(); @@ -265,14 +265,14 @@ foreach ($postList as $postInfo) { $postInfo['thread_start'] = true; e107::getScBatch('view', 'forum')->setScVar('postInfo', $postInfo); - $forthr = $e107->tp->parseTemplate($FORUMTHREADSTYLE, true, $forum_shortcodes) . "\n"; + $forthr = $e107->tp->parseTemplate($FORUMTHREADSTYLE, true, vartrue($forum_shortcodes)) . "\n"; } } unset($loop_uid); if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread->threadInfo['thread_active']) { - if (!$forum_quickreply) + if (!vartrue($forum_quickreply)) { $tVars->QUICKREPLY = "
$thread->threadId)) . "' method='post'> @@ -293,7 +293,7 @@ if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread $forend = $tp->simpleParse($FORUMEND, $tVars); -$forumstring = $forstr . $forthr . $forrep . $forend; +$forumstring = $forstr . $forthr . vartrue($forrep) . $forend; //If last post came after USERLV and not yet marked as read, mark the thread id as read $threadsViewed = explode(',', $currentUser['user_plugin_forum_viewed']); diff --git a/e107_plugins/forum/shortcodes/batch/post_shortcodes.php b/e107_plugins/forum/shortcodes/batch/post_shortcodes.php index a940372ca..69d782727 100644 --- a/e107_plugins/forum/shortcodes/batch/post_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/post_shortcodes.php @@ -130,7 +130,7 @@ class plugin_forum_post_shortcodes extends e_shortcode global $action, $threadInfo; if (MODERATOR && $action == "nt") { - $thread_sticky = (isset($_POST['threadtype']) ? $_POST['threadtype'] : $threadInfo['thread_sticky']); // no reference of 'head' $threadInfo['head']['thread_sticky'] + $thread_sticky = (isset($_POST['threadtype']) ? $_POST['threadtype'] : vartrue($threadInfo['thread_sticky'])); // no reference of 'head' $threadInfo['head']['thread_sticky'] return "
".LAN_400."".LAN_1." ".LAN_2." ".LAN_3.""; } return ''; @@ -147,7 +147,7 @@ class plugin_forum_post_shortcodes extends e_shortcode function sc_noemotes() { - if($eaction == true) { return ; } + if(vartrue($eaction) == true) { return ; } return " ".LAN_FORUMPOST_EMOTES.''; } @@ -158,7 +158,7 @@ class plugin_forum_post_shortcodes extends e_shortcode $pref = e107::getPlugPref('forum'); if($eaction == true) { return ; } - if ($pref['notify'] && $action == 'nt' && USER) + if (vartrue($pref['notify']) && $action == 'nt' && USER) { if(isset($_POST['fpreview'])) { diff --git a/e107_plugins/forum/templates/forum_post_template.php b/e107_plugins/forum/templates/forum_post_template.php index 98e825599..a8a1c971b 100644 --- a/e107_plugins/forum/templates/forum_post_template.php +++ b/e107_plugins/forum/templates/forum_post_template.php @@ -16,28 +16,28 @@ if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:95%"); } // the user box and subject box are not always displayed, therefore we need to define them /in case/ they are, if not they'll be ignored. -if(!$userbox) +if(!vartrue($userbox)) { $userbox = " ".LAN_61." - + "; } -if(!$subjectbox) +if(!vartrue($subjectbox)) { $subjectbox = " ".LAN_62." - + "; } // the poll is optional, be careful when changing the values here, only change if you know what you're doing ... -if(!$poll_form) +if(!vartrue($poll_form)) { if(is_readable(e_PLUGIN.'poll/poll_class.php')) { require_once(e_PLUGIN.'poll/poll_class.php'); @@ -47,7 +47,7 @@ if(!$poll_form) } // finally, file attach is optional, again only change this if you know what you're doing ... -if(!$fileattach) +if(!vartrue($fileattach)) { $fileattach = " @@ -55,7 +55,7 @@ $fileattach = " ".LAN_392." - ".LAN_393." | ".$allowed_filetypes." |
".LAN_394."
".LAN_395.": ".($max_upload_size ? $max_upload_size.LAN_396 : ini_get('upload_max_filesize'))." + ".LAN_393." | ".vartrue($allowed_filetypes)." |
".LAN_394."
".LAN_395.": ".(vartrue($max_upload_size) ? $max_upload_size.LAN_396 : ini_get('upload_max_filesize'))."
@@ -70,7 +70,7 @@ $fileattach = " // } // If the upload directory is not writable, we need to alert the user about this. -if(!$fileattach_alert) +if(!vartrue($fileattach_alert)) { $fileattach_alert = " @@ -126,7 +126,7 @@ $FORUMPOST = " "; } -if(!$FORUMPOST_REPLY) +if(!vartrue($FORUMPOST_REPLY)) { $FORUMPOST_REPLY = "
@@ -176,7 +176,7 @@ $FORUMPOST_REPLY = " "; } -if(!$LATESTPOSTS_START) +if(!vartrue($LATESTPOSTS_START)) { $LATESTPOSTS_START = " @@ -187,7 +187,7 @@ LAN_101."{LATESTPOSTSCOUNT}".LAN_102." "; } -if(!$LATESTPOSTS_POST) +if(!vartrue($LATESTPOSTS_POST)) { $LATESTPOSTS_POST = " @@ -200,14 +200,14 @@ $LATESTPOSTS_POST = " "; } -if(!$LATESTPOSTS_END) +if(!vartrue($LATESTPOSTS_END)) { $LATESTPOSTS_END = "
"; } -if(!$THREADTOPIC_REPLY) +if(!vartrue($THREADTOPIC_REPLY)) { $THREADTOPIC_REPLY = " diff --git a/e107_plugins/log/stats.php b/e107_plugins/log/stats.php index c1b2b488c..d9f2eeb3d 100644 --- a/e107_plugins/log/stats.php +++ b/e107_plugins/log/stats.php @@ -1034,7 +1034,7 @@ class siteStats if ($do_errors XOR !$found) { $totalArray[$k] = $v; - $total += $v['ttlv']; + $total += vartrue($v['ttlv']); } } $totalArray = $this -> arraySort($totalArray, "ttl"); diff --git a/e107_plugins/newsfeed/newsfeed.php b/e107_plugins/newsfeed/newsfeed.php index 8402571eb..d30cb5e08 100644 --- a/e107_plugins/newsfeed/newsfeed.php +++ b/e107_plugins/newsfeed/newsfeed.php @@ -79,7 +79,7 @@ if (count($newsFeed->feedList)) } } -$text = $NEWSFEED_LIST_START . $data . $NEWSFEED_LIST_END; +$text = $NEWSFEED_LIST_START . vartrue($data) . $NEWSFEED_LIST_END; $ns->tablerender(NFLAN_29, $text); require_once(FOOTERF); diff --git a/e107_plugins/poll/poll_class.php b/e107_plugins/poll/poll_class.php index 5c4c3a7c9..6e8b775e9 100644 --- a/e107_plugins/poll/poll_class.php +++ b/e107_plugins/poll/poll_class.php @@ -504,9 +504,9 @@ class poll ".LAN_386." - "; + "; - $option_count = (count($_POST['poll_option']) ? count($_POST['poll_option']) : 1); + $option_count = (count(vartrue($_POST['poll_option'])) ? count($_POST['poll_option']) : 1); $text .= " @@ -538,7 +538,7 @@ class poll diff --git a/user.php b/user.php index 01d8798e5..65f1318d3 100644 --- a/user.php +++ b/user.php @@ -110,7 +110,7 @@ else } } } -if ($records > 30) +if (vartrue($records) > 30) { $records = 30; }
".LAN_5."
".LAN_5."
".LAN_391." @@ -530,7 +530,7 @@ class poll
".POLL_506." - ".POLL_507."   + ".POLL_507."   ".POLL_508."
".POLLAN_16." - ".POLLAN_17."
+ ".POLLAN_17."
".POLLAN_18."
".POLLAN_19."