Author: mike
Date: 2008-11-07 16:38:46 -0800 (Fri, 07 Nov 2008)
New Revision: 513
Log:
Use per-user PAGE_MAX.
Modified:
trunk/account.php
trunk/phplib/base-articles.php
trunk/search.php
Modified: trunk/account.php
===================================================================
--- trunk/account.php 2008-11-08 00:29:10 UTC (rev 512)
+++ trunk/account.php 2008-11-08 00:38:46 UTC (rev 513)
@@ -323,7 +323,7 @@
html_start_table(array("ID","Title","Last Modified", "Comment(s)"));
- for ($i = 0; $i < 5 && $row = db_next($result); $i ++)
+ for ($i = 0; $i < $PAGE_MAX && $row = db_next($result); $i ++)
{
$article = new article($row["id"]);
@@ -389,7 +389,7 @@
"Summary", "Version", "Last Updated",
"Assigned To"));
- for ($i = 0; $i < 5 && $row = db_next($result); $i ++)
+ for ($i = 0; $i < $PAGE_MAX && $row = db_next($result); $i ++)
{
$str = new str($row["id"]);
@@ -474,7 +474,7 @@
print("<ul>\n");
- for ($i = 0; $i < 5 && $row = db_next($result); $i ++)
+ for ($i = 0; $i < $PAGE_MAX && $row = db_next($result); $i ++)
{
$id = $row["id"];
$link = new link($id);
Modified: trunk/phplib/base-articles.php
===================================================================
--- trunk/phplib/base-articles.php 2008-11-08 00:29:10 UTC (rev 512)
+++ trunk/phplib/base-articles.php 2008-11-08 00:38:46 UTC (rev 513)
@@ -186,14 +186,9 @@
$search = $_POST["SEARCH"];
if (array_key_exists("STYPE", $_POST))
$stype = $_POST["STYPE"];
- if (array_key_exists("FPAGEMAX", $_POST))
- {
- $PAGE_MAX = (int)$_POST["FPAGEMAX"];
- setcookie("PAGE_MAX", $PAGE_MAX, time() + 365 * 86400);
- }
}
- $options = "+I$index+T" . urlencode($stype) . "+M$PAGE_MAX+P$link_id+Q" .
+ $options = "+I$index+T" . urlencode($stype) . "+P$link_id+Q" .
urlencode($search);
switch ($op)
@@ -320,7 +315,7 @@
else
{
$bookmark = "$PHP_URL?L+T" . urlencode($stype) .
- "+M$PAGE_MAX+P$link_id+Q" . urlencode($search);
+ "+P$link_id+Q" . urlencode($search);
html_header("Articles", $path, "", $links);
html_start_links(1);
@@ -359,17 +354,6 @@
print("</select>\n");
- $values = array(10, 20, 50, 100, 1000);
- print("Articles/Page: <select name='FPAGEMAX'>");
- for ($i = 0; $i < sizeof($values); $i ++)
- {
- if ($values[$i] == $PAGE_MAX)
- print("<option value='$values[$i]'
selected>$values[$i]</option>");
- else
- print("<option value='$values[$i]'>$values[$i]</option>");
- }
- print("</select>\n");
-
print("<br><i>Search supports 'and', 'or', 'not', and parenthesis. "
."<a href='${path}search-help.php'>More info...</a></i>"
."</p></form>\n");
Modified: trunk/search.php
===================================================================
--- trunk/search.php 2008-11-08 00:29:10 UTC (rev 512)
+++ trunk/search.php 2008-11-08 00:38:46 UTC (rev 513)
@@ -6,8 +6,6 @@
global $PHP_SELF;
-// Matches per page...
-$PAGE_MAX = 10;
// Max text per listing...
$TEXT_MAX = 200;
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit