Skip to content

Commit

Permalink
Fix code style: do not echo empty strings in quick php
Browse files Browse the repository at this point in the history
Signed-off-by: dimkalinux <dimka.linux@gmail.com>
  • Loading branch information
NikolayFrantsev authored and dimkalinux committed Jan 14, 2012
1 parent 2f4ff80 commit 74c1804
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion admin/groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@
?>
<div class="ct-set set<?php echo ++$forum_page['item_count'] ?>">
<div class="ct-box">
<h3 class="ct-legend hn"><span><?php echo forum_htmlencode($cur_group['g_title']) ?> <?php echo ($cur_group['g_id'] == $forum_config['o_default_user_group']) ? $lang_admin_groups['default'] : '' ?></span></h3>
<h3 class="ct-legend hn"><span><?php echo forum_htmlencode($cur_group['g_title']) ?> <?php if ($cur_group['g_id'] == $forum_config['o_default_user_group']) echo $lang_admin_groups['default']; ?></span></h3>
<p class="options"><?php echo implode(' ', $forum_page['group_options']) ?></p>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions login.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
<div class="sf-box text required">
<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_login['E-mail address'] ?></span> <small><?php echo $lang_login['E-mail address help'] ?></small></label><br />
<span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="email" name="req_email" value="<?php echo isset($_POST['req_email']) ? forum_htmlencode($_POST['req_email']) : '' ?>" size="35" maxlength="80" required spellcheck="false" /></span>
<span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="email" name="req_email" value="<?php if (isset($_POST['req_email'])) echo forum_htmlencode($_POST['req_email']); ?>" size="35" maxlength="80" required spellcheck="false" /></span>
</div>
</div>
<?php ($hook = get_hook('li_forgot_pass_pre_group_end')) ? eval($hook) : null; ?>
Expand Down Expand Up @@ -436,20 +436,20 @@
<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
<div class="sf-box text required">
<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_login['Username'] ?></span></label><br />
<span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_username" value="<?php echo isset($_POST['req_username']) ? forum_htmlencode($_POST['req_username']) : '' ?>" size="35" maxlength="25" required spellcheck="false" /></span>
<span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_username" value="<?php if (isset($_POST['req_username'])) echo forum_htmlencode($_POST['req_username']); ?>" size="35" maxlength="25" required spellcheck="false" /></span>
</div>
</div>
<?php ($hook = get_hook('li_login_pre_pass')) ? eval($hook) : null; ?>
<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
<div class="sf-box text required">
<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_login['Password'] ?></span></label><br />
<span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_password" value="<?php echo isset($_POST['req_password']) ? forum_htmlencode($_POST['req_password']) : '' ?>" size="35" required /></span>
<span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_password" value="<?php if (isset($_POST['req_password'])) echo forum_htmlencode($_POST['req_password']); ?>" size="35" required /></span>
</div>
</div>
<?php ($hook = get_hook('li_login_pre_remember_me_checkbox')) ? eval($hook) : null; ?>
<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
<div class="sf-box checkbox">
<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="save_pass" value="1" <?php echo isset($_POST['save_pass']) ? 'checked="checked" ' : '' ?>/></span>
<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="save_pass" value="1" <?php if (isset($_POST['save_pass'])) echo 'checked="checked" '; ?>/></span>
<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_login['Remember me'] ?></label>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion post.php
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@
($hook = get_hook('po_topic_review_row_pre_display')) ? eval($hook) : null;

?>
<div class="post<?php echo ($forum_page['item_count'] == 1) ? ' firstpost' : '' ?><?php echo ($forum_page['item_total'] == $forum_page['item_count']) ? ' lastpost' : '' ?>">
<div class="post<?php if ($forum_page['item_count'] == 1) echo ' firstpost'; ?><?php if ($forum_page['item_total'] == $forum_page['item_count']) echo ' lastpost'; ?>">
<div class="posthead">
<h3 class="hn post-ident"><?php echo implode(' ', $forum_page['post_ident']) ?></h3>
<?php ($hook = get_hook('po_topic_review_new_post_head_option')) ? eval($hook) : null; ?>
Expand Down
16 changes: 8 additions & 8 deletions profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,15 @@
<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
<div class="sf-box text required">
<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['New password'] ?></span> <small><?php echo $lang_profile['Password help'] ?></small></label><br />
<span class="fld-input"><input type="<?php echo($forum_config['o_mask_passwords'] == '1' ? 'password' : 'text') ?>" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password1" size="35" value="<?php echo (isset($_POST['req_new_password1'])) ? forum_htmlencode($_POST['req_new_password1']) : '' ?>" required autocomplete="off" /></span><br />
<span class="fld-input"><input type="<?php echo($forum_config['o_mask_passwords'] == '1' ? 'password' : 'text') ?>" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password1" size="35" value="<?php if (isset($_POST['req_new_password1'])) echo forum_htmlencode($_POST['req_new_password1']); ?>" required autocomplete="off" /></span><br />
</div>
</div>
<?php ($hook = get_hook('pf_change_pass_key_pre_new_password_confirm')) ? eval($hook) : null; ?>
<?php if ($forum_config['o_mask_passwords'] == '1'): ?>
<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
<div class="sf-box text required">
<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Confirm new password'] ?></span> <small><?php echo $lang_profile['Confirm password help'] ?></small></label><br />
<span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password2" size="35" value="<?php echo (isset($_POST['req_new_password2'])) ? forum_htmlencode($_POST['req_new_password2']) : '' ?>" required autocomplete="off" /></span><br />
<span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password2" size="35" value="<?php if (isset($_POST['req_new_password2'])) echo forum_htmlencode($_POST['req_new_password2']); ?>" required autocomplete="off" /></span><br />
</div>
</div>
<?php endif; ?>
Expand Down Expand Up @@ -348,22 +348,22 @@
<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
<div class="sf-box text required">
<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Old password'] ?></span> <small><?php echo $lang_profile['Old password help'] ?></small></label><br />
<span class="fld-input"><input type="<?php echo($forum_config['o_mask_passwords'] == '1' ? 'password' : 'text') ?>" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_old_password" size="35" value="<?php echo (isset($_POST['req_old_password'])) ? forum_htmlencode($_POST['req_old_password']) : '' ?>" required /></span>
<span class="fld-input"><input type="<?php echo($forum_config['o_mask_passwords'] == '1' ? 'password' : 'text') ?>" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_old_password" size="35" value="<?php if (isset($_POST['req_old_password'])) echo forum_htmlencode($_POST['req_old_password']); ?>" required /></span>
</div>
</div>
<?php endif; ($hook = get_hook('pf_change_pass_normal_pre_new_password')) ? eval($hook) : null; ?>
<div class="sf-set set<?php echo ++$forum_page['item_count']; echo ($forum_config['o_mask_passwords'] == '1') ? ' prepend-top' : '' ?>">
<div class="sf-set set<?php echo ++$forum_page['item_count']; if ($forum_config['o_mask_passwords'] == '1') echo ' prepend-top'; ?>">
<div class="sf-box text required">
<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['New password'] ?></span> <small><?php echo $lang_profile['Password help'] ?></small></label><br />
<span class="fld-input"><input type="<?php echo($forum_config['o_mask_passwords'] == '1' ? 'password' : 'text') ?>" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password1" size="35" value="<?php echo (isset($_POST['req_new_password1'])) ? forum_htmlencode($_POST['req_new_password1']) : '' ?>" required /></span><br />
<span class="fld-input"><input type="<?php echo($forum_config['o_mask_passwords'] == '1' ? 'password' : 'text') ?>" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password1" size="35" value="<?php if (isset($_POST['req_new_password1'])) echo forum_htmlencode($_POST['req_new_password1']); ?>" required /></span><br />
</div>
</div>
<?php ($hook = get_hook('pf_change_pass_normal_pre_new_password_confirm')) ? eval($hook) : null; ?>
<?php if ($forum_config['o_mask_passwords'] == '1'): ?>
<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
<div class="sf-box text required">
<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Confirm new password'] ?></span> <small><?php echo $lang_profile['Confirm password help'] ?></small></label><br />
<span class="fld-input"><input type="<?php echo($forum_config['o_mask_passwords'] == '1' ? 'password' : 'text') ?>" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password2" size="35" value="<?php echo (isset($_POST['req_new_password2'])) ? forum_htmlencode($_POST['req_new_password2']) : '' ?>" required /></span><br />
<span class="fld-input"><input type="<?php echo($forum_config['o_mask_passwords'] == '1' ? 'password' : 'text') ?>" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password2" size="35" value="<?php if (isset($_POST['req_new_password2'])) echo forum_htmlencode($_POST['req_new_password2']); ?>" required /></span><br />
</div>
</div>
<?php endif; ?>
Expand Down Expand Up @@ -617,14 +617,14 @@
<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
<div class="sf-box text required">
<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['New e-mail'] ?></span></label><br />
<span class="fld-input"><input type="email" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_email" size="35" maxlength="80" value="<?php echo (isset($_POST['req_new_email'])) ? forum_htmlencode($_POST['req_new_email']) : '' ?>" required /></span>
<span class="fld-input"><input type="email" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_email" size="35" maxlength="80" value="<?php if (isset($_POST['req_new_email'])) echo forum_htmlencode($_POST['req_new_email']); ?>" required /></span>
</div>
</div>
<?php ($hook = get_hook('pf_change_email_normal_pre_password')) ? eval($hook) : null; ?>
<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
<div class="sf-box text required">
<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Password'] ?></span><small><?php echo $lang_profile['Old password help'] ?></small></label><br />
<span class="fld-input"><input type="<?php echo($forum_config['o_mask_passwords'] == '1' ? 'password' : 'text') ?>" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_password" size="35" value="<?php echo (isset($_POST['req_password'])) ? forum_htmlencode($_POST['req_password']) : '' ?>" required autocomplete="off" /></span>
<span class="fld-input"><input type="<?php echo($forum_config['o_mask_passwords'] == '1' ? 'password' : 'text') ?>" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_password" size="35" value="<?php if (isset($_POST['req_password'])) echo forum_htmlencode($_POST['req_password']); ?>" required autocomplete="off" /></span>
</div>
</div>
<?php ($hook = get_hook('pf_change_email_normal_pre_fieldset_end')) ? eval($hook) : null; ?>
Expand Down
4 changes: 2 additions & 2 deletions register.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,15 +391,15 @@
<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
<div class="sf-box text required">
<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Password'] ?></span> <small><?php echo $lang_profile['Password help'] ?></small></label><br />
<span class="fld-input"><input type="<?php echo($forum_config['o_mask_passwords'] == '1' ? 'password' : 'text') ?>" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_password1" size="35" value="<?php echo (isset($_POST['req_password1'])) ? forum_htmlencode($_POST['req_password1']) : '' ?>" required autocomplete="off" /></span>
<span class="fld-input"><input type="<?php echo($forum_config['o_mask_passwords'] == '1' ? 'password' : 'text') ?>" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_password1" size="35" value="<?php if (isset($_POST['req_password1'])) echo forum_htmlencode($_POST['req_password1']); ?>" required autocomplete="off" /></span>
</div>
</div>
<?php ($hook = get_hook('rg_register_pre_confirm_password')) ? eval($hook) : null; ?>
<?php if ($forum_config['o_mask_passwords'] == '1'): ?>
<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
<div class="sf-box text required">
<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Confirm password'] ?></span> <small><?php echo $lang_profile['Confirm password help'] ?></small></label><br />
<span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_password2" size="35" value="<?php echo (isset($_POST['req_password2'])) ? forum_htmlencode($_POST['req_password2']) : '' ?>" required autocomplete="off" /></span>
<span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_password2" size="35" value="<?php if (isset($_POST['req_password2'])) echo forum_htmlencode($_POST['req_password2']); ?>" required autocomplete="off" /></span>
</div>
</div>
<?php endif; ?>
Expand Down
2 changes: 1 addition & 1 deletion userlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
($hook = get_hook('ul_results_row_pre_data_output')) ? eval($hook) : null;

?>
<tr class="<?php echo ($forum_page['item_count'] % 2 != 0) ? 'odd' : 'even' ?><?php echo ($forum_page['item_count'] == 1) ? ' row1' : '' ?>">
<tr class="<?php echo ($forum_page['item_count'] % 2 != 0) ? 'odd' : 'even' ?><?php if ($forum_page['item_count'] == 1) echo ' row1'; ?>">
<?php echo implode("\n\t\t\t\t\t\t", $forum_page['table_row'])."\n" ?>
</tr>
<?php
Expand Down
2 changes: 1 addition & 1 deletion viewtopic.php
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@
<div id="p<?php echo $cur_post['id'] ?>" class="posthead">
<h3 class="hn post-ident"><?php echo implode(' ', $forum_page['post_ident']) ?></h3>
</div>
<div class="postbody<?php echo ($cur_post['is_online'] == $cur_post['poster_id']) ? ' online' : '' ?>">
<div class="postbody<?php if ($cur_post['is_online'] == $cur_post['poster_id']) echo ' online'; ?>">
<div class="post-author">
<ul class="author-ident">
<?php echo implode("\n\t\t\t\t\t\t", $forum_page['author_ident'])."\n" ?>
Expand Down

0 comments on commit 74c1804

Please sign in to comment.