diff --git a/admin/admin_attach_cp.php b/admin/admin_attach_cp.php index c7efa9a77..7a065c8af 100644 --- a/admin/admin_attach_cp.php +++ b/admin/admin_attach_cp.php @@ -76,7 +76,7 @@ if ($view === 'username') { } // Pagination ? -$do_pagination = ($view !== 'stats' && $view !== 'search') ? true : false; +$do_pagination = ($view !== 'stats' && $view !== 'search'); // Set Order $order_by = ''; @@ -319,7 +319,7 @@ if ($view === 'username') { // Attachments if ($view === 'attachments') { $user_based = ($uid) ? true : false; - $search_based = (isset($_POST['search']) && $_POST['search']) ? true : false; + $search_based = (isset($_POST['search']) && $_POST['search']); $hidden_fields = ''; diff --git a/index.php b/index.php index 330a627f9..805d2681b 100644 --- a/index.php +++ b/index.php @@ -211,7 +211,7 @@ foreach ($cat_forums as $cid => $c) { )); $template->assign_vars(array( - 'H_C_AL_MESS' => ($hide_cat_opt && !$showhide) ? true : false, + 'H_C_AL_MESS' => ($hide_cat_opt && !$showhide), )); if (!$showhide && isset($hide_cat_user[$cid]) && !$viewcat) { diff --git a/library/attach_mod/includes/functions_attach.php b/library/attach_mod/includes/functions_attach.php index 19924163b..54c4d951e 100644 --- a/library/attach_mod/includes/functions_attach.php +++ b/library/attach_mod/includes/functions_attach.php @@ -259,7 +259,7 @@ function physical_filename_already_stored($filename) $num_rows = DB()->num_rows($result); DB()->sql_freeresult($result); - return ($num_rows == 0) ? false : true; + return $num_rows != 0; } /** diff --git a/library/includes/template.php b/library/includes/template.php index 65dc4219f..bbf0d7af2 100644 --- a/library/includes/template.php +++ b/library/includes/template.php @@ -774,7 +774,7 @@ class template if (!$count_if) { $keyword_type = XS_TAG_IF; } - $str = $this->compile_tag_if($params_str, $keyword_type == XS_TAG_IF ? false : true); + $str = $this->compile_tag_if($params_str, $keyword_type != XS_TAG_IF); if ($str) { $compiled[] = ''; if ($keyword_type == XS_TAG_IF) {