cvs: php-bugs-web / bug.php
| From: | Gabor Hojtsy | Date: | Sun, 05 Jan 2003 20:06:25 +0000 |
| Subject: | cvs: php-bugs-web / bug.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-14761@lists.php.net to get a copy of this message | ||
goba Sun Jan 5 15:06:25 2003 EDT
Modified files:
/php-bugs-web bug.php
Log:
Only display vote link if the bug is voteable...
Index: php-bugs-web/bug.php
diff -u php-bugs-web/bug.php:1.42 php-bugs-web/bug.php:1.43
--- php-bugs-web/bug.php:1.42 Sat Dec 21 06:03:51 2002
+++ php-bugs-web/bug.php Sun Jan 5 15:06:25 2003
@@ -368,7 +368,8 @@
<div class="explain">
Anyone can comment on a bug. Have a simpler test case? Does it work for you on
a different platform? Let us know! Just going to say 'Me too!'? Don't clutter
-the database with that — but make sure to <a href="<?php echo
"$PHP_SELF?id=$id"?>">vote on the bug</a>!
+the database with that please
+<?php if (canvote()) { echo " — but make sure to <a
href=\"$PHP_SELF?id=$id"\">vote on the bug</a>"; } ?>!
</div>
<?php }?>
<table>
@@ -384,7 +385,7 @@
</div>
</form>
<?php }?>
-<?php if (!$edit && $thanks != 4 && $thanks != 6 &&
$bug['status'] != "Closed" && $bug['status'] !=
"Bogus" && $bug['status'] != 'Duplicate') {?>
+<?php if (!$edit && canvote()) {?>
<form id="vote" method="post" action="vote.php">
<div class="sect">
<fieldset>
@@ -458,3 +459,8 @@
echo "</pre>\n";
echo "</div>";
}
+
+function canvote() {
+ global $thanks, $bug;
+ return ($thanks != 4 && $thanks != 6 && $bug['status'] !=
"Closed" && $bug['status'] != "Bogus" &&
$bug['status'] != 'Duplicate');
+}
\ No newline at end of file