mirror of
https://github.com/torrentpier/torrentpier
synced 2025-07-08 14:01:17 -07:00
Ternary operator could be simplified.
This commit is contained in:
parent
72f9ddd620
commit
57f0cd7614
4 changed files with 5 additions and 5 deletions
|
@ -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 = '';
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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[] = '<?php ' . $str . ' ?>';
|
||||
if ($keyword_type == XS_TAG_IF) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue