DevHeads.net

com web/bugs: Collapse an } else { if (...) to an } elseif (...): www/bug.php

Link: <a href="http://git.php.net/?p=web/bugs.git;a=commitdiff;h=4174e1cafd756799274938edd76a9cae3eced395" title="http://git.php.net/?p=web/bugs.git;a=commitdiff;h=4174e1cafd756799274938edd76a9cae3eced395">http://git.php.net/?p=web/bugs.git;a=commitdiff;h=4174e1cafd756799274938...</a>

Log:
Collapse an } else { if (...) to an } elseif (...)

Changed paths:
M www/bug.php

Diff:
diff --git a/www/bug.php b/www/bug.php
index 76ac0e1..f8374ca 100644
--- a/www/bug.php
+++ b/www/bug.php
@@ -792,32 +792,33 @@ if ($edit == 1 || $edit == 2) { ?>
</table>
</div>
<?php
+ } elseif ($logged_in == 'developer') {
+?>
+ <div class="explain">
+ Welcome back, <?php echo $user; ?>! (Not <?php echo $user; ?>?
+ <a href="logout.php">Log out.</a>)
+ </div>
+<?php
} else {
- if ($logged_in == 'developer') {
?>
- <div class="explain">
- Welcome back, <?php echo $user; ?>! (Not <?php echo $user; ?>?
- <a href="logout.php">Log out.</a>)
- </div>
-<?php } else { ?>
- <div class="explain">
- Welcome! If you don't have a Git account, you can't do anything here.<br>
- You can <a href="bug.php?id=<?php echo $bug_id; ?>&amp;edit=3">add a comment by following this link</a>
- or if you reported this bug, you can <a href="bug.php?id=<?php echo $bug_id; ?>&amp;edit=2">edit this bug over here</a>.
- <div class="details">
- <label for="svnuser">php.net Username:</label>
- <input type="text" id="svnuser" name="user" value="<?php echo htmlspecialchars($user); ?>" size="10" maxlength="20">
- <label for="svnpw">php.net Password:</label>
- <input type="password" id="svnpw" name="pw" value="<?php echo htmlspecialchars($pw); ?>" size="10">
- <!--<label for="save">Remember:</label><input style="vertical-align:middle;" type="checkbox" id="save" name="save" <?php echo !empty($_POST['save']) ? 'checked="checked"' : ''; ?>>-->
- <?php if (!$show_bug_info) { ?>
- <input type="submit" value="Submit">
- <?php } ?>
- </div>
+ <div class="explain">
+ Welcome! If you don't have a Git account, you can't do anything here.<br>
+ You can <a href="bug.php?id=<?php echo $bug_id; ?>&amp;edit=3">add a comment by following this link</a>
+ or if you reported this bug, you can <a href="bug.php?id=<?php echo $bug_id; ?>&amp;edit=2">edit this bug over here</a>.
+ <div class="details">
+ <label for="svnuser">php.net Username:</label>
+ <input type="text" id="svnuser" name="user" value="<?php echo htmlspecialchars($user); ?>" size="10" maxlength="20">
+ <label for="svnpw">php.net Password:</label>
+ <input type="password" id="svnpw" name="pw" value="<?php echo htmlspecialchars($pw); ?>" size="10">
+ <!--<label for="save">Remember:</label><input style="vertical-align:middle;" type="checkbox" id="save" name="save" <?php echo !empty($_POST['save']) ? 'checked="checked"' : ''; ?>>-->
+ <?php if (!$show_bug_info) { ?>
+ <input type="submit" value="Submit">
+ <?php } ?>
</div>
+ </div>
<?php
- }
}
+
echo $preview;
?>
<table>