cvs: phpweb / bugs.php
| From: | Rasmus Lerdorf | Date: | Fri, 20 Jul 2001 19:19:38 +0000 |
| Subject: | cvs: phpweb / bugs.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-5635@lists.php.net to get a copy of this message | ||
rasmus Fri Jul 20 15:19:38 2001 EDT
Modified files:
/phpweb bugs.php
Log:
Add an "All" option to the entries/page dropdown
Index: phpweb/bugs.php
diff -u phpweb/bugs.php:1.167 phpweb/bugs.php:1.168
--- phpweb/bugs.php:1.167 Fri Jul 20 15:11:15 2001
+++ phpweb/bugs.php Fri Jul 20 15:19:37 2001
@@ -181,9 +181,9 @@
$query .= " ORDER BY $order_by $direction";
if (!$begin) $begin = 0;
- if (!$limit) $limit = 30;
+ if (!isset($limit)) $limit = 30;
- $query .= " LIMIT $begin,$limit";
+ if($limit!='All') $query .= " LIMIT $begin,$limit";
$res = @mysql_query($query);
if (!$res) die(htmlspecialchars($query)."<br>".mysql_error());
@@ -193,7 +193,7 @@
echo "<h2 class=\"error\">No bugs with the specified criteria were
found.</h2>";
}
else {
- $link =
"$PHP_SELF?cmd=display&bug_type=$bug_type&status=$status&search_for=".htmlspecialchars(stripslashes($search_for))."&php_os=".htmlspecialchars(stripslashes($php_os))."&bug_age=$bug_age&by=$by&order_by=$order_by&direction=$direction&phpver=$phpver";
+ $link =
"$PHP_SELF?cmd=display&bug_type=$bug_type&status=$status&search_for=".htmlspecialchars(stripslashes($search_for))."&php_os=".htmlspecialchars(stripslashes($php_os))."&bug_age=$bug_age&by=$by&order_by=$order_by&direction=$direction&phpver=$phpver&limit=$limit";
?>
<table align="center" border="0" cellspacing="2"
width="95%">
<?php show_prev_next($begin,$rows,$link,$limit);?>
@@ -530,6 +530,7 @@
echo "<option value=\"$i\"", ($limit==$i ? " selected" :
""),">$i</option>\n";
$i=$i+10;
}
+ echo '<option value="All"', $limit=='All' ? "
selected": ""),">All</option>\n";
}
function show_state_options($state, $user_mode=0, $default="")
@@ -738,6 +739,7 @@
function show_prev_next($begin,$rows,$link,$limit)
{
+ if($limit=='All') return;
if ($begin == 0 && $rows < $limit) return;
echo "<tr bgcolor=\"#cccccc\"><td align=\"center\"
colspan=\"9\">";
echo '<table border="0" cellspacing="0" cellpadding="0"
width="100%"><tr>';