$post conflict.

git-svn-id: http://svn.automattic.com/wordpress/trunk@173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-06-05 21:47:18 +00:00
parent 22d5889475
commit f9ed08d4c8
1 changed files with 14 additions and 14 deletions

View File

@ -3,12 +3,12 @@
require_once('../b2config.php'); require_once('../b2config.php');
if (!$posts) { if (!$showposts) {
if ($posts_per_page) { if ($posts_per_page) {
$posts=$posts_per_page; $showposts=$posts_per_page;
} else { } else {
$posts=10; $showposts=10;
$posts_per_page=$posts; $posts_per_page=$showposts;
} }
} }
@ -20,17 +20,17 @@ if ((!empty($poststart)) && (!empty($postend)) && ($poststart == $postend)) {
if (!$poststart) { if (!$poststart) {
$poststart=0; $poststart=0;
$postend=$posts; $postend=$showposts;
} }
$nextXstart=$postend; $nextXstart=$postend;
$nextXend=$postend+$posts; $nextXend=$postend+$showposts;
$previousXstart=($poststart-$posts); $previousXstart=($poststart-$showposts);
$previousXend=$poststart; $previousXend=$poststart;
if ($previousXstart < 0) { if ($previousXstart < 0) {
$previousXstart=0; $previousXstart=0;
$previousXend=$posts; $previousXend=$showposts;
} }
?> ?>
@ -50,7 +50,7 @@ if ($previousXstart > 0) {
?> ?>
<input type="hidden" name="poststart" value="<?php echo $previousXstart; ?>" /> <input type="hidden" name="poststart" value="<?php echo $previousXstart; ?>" />
<input type="hidden" name="postend" value="<?php echo $previousXend; ?>" /> <input type="hidden" name="postend" value="<?php echo $previousXend; ?>" />
<input type="submit" name="submitprevious" class="search" value="< <?php echo $posts ?>" /> <input type="submit" name="submitprevious" class="search" value="< <?php echo $showposts ?>" />
<?php <?php
} }
?> ?>
@ -60,7 +60,7 @@ if ($previousXstart > 0) {
<form name="nextXposts" method="get" action=""> <form name="nextXposts" method="get" action="">
<input type="hidden" name="poststart" value="<?php echo $nextXstart; ?>" /> <input type="hidden" name="poststart" value="<?php echo $nextXstart; ?>" />
<input type="hidden" name="postend" value="<?php echo $nextXend; ?>" /> <input type="hidden" name="postend" value="<?php echo $nextXend; ?>" />
<input type="submit" name="submitnext" class="search" value="<?php echo $posts ?> >" /> <input type="submit" name="submitnext" class="search" value="<?php echo $showposts ?> >" />
</form> </form>
</td> </td>
</tr> </tr>
@ -70,7 +70,7 @@ if ($previousXstart > 0) {
<tr> <tr>
<td valign="top" width="200"><!-- show X first/last posts --> <td valign="top" width="200"><!-- show X first/last posts -->
<form name="showXfirstlastposts" method="get" action=""> <form name="showXfirstlastposts" method="get" action="">
<input type="text" name="posts" value="<?php echo $posts ?>" style="width:40px;" /?> <input type="text" name="posts" value="<?php echo $showposts ?>" style="width:40px;" /?>
<?php <?php
if (!isset($order)) if (!isset($order))
$order="DESC"; $order="DESC";
@ -336,7 +336,7 @@ if ($previousXstart > -1) {
?> ?>
<input type="hidden" name="poststart" value="<?php echo $previousXstart; ?>" /> <input type="hidden" name="poststart" value="<?php echo $previousXstart; ?>" />
<input type="hidden" name="postend" value="<?php echo $previousXend; ?>" /> <input type="hidden" name="postend" value="<?php echo $previousXend; ?>" />
<input type="submit" name="submitprevious" class="search" value="< Previous <?php echo $posts ?>" /><?php <input type="submit" name="submitprevious" class="search" value="< Previous <?php echo $showposts ?>" /><?php
} }
?> ?>
</form> </form>
@ -345,7 +345,7 @@ if ($previousXstart > -1) {
<form name="nextXposts" method="get"> <form name="nextXposts" method="get">
<input type="hidden" name="poststart" value="<?php echo $nextXstart; ?>" /> <input type="hidden" name="poststart" value="<?php echo $nextXstart; ?>" />
<input type="hidden" name="postend" value="<?php echo $nextXend; ?>" /> <input type="hidden" name="postend" value="<?php echo $nextXend; ?>" />
<input type="submit" name="submitnext" class="search" value="Next <?php echo $posts ?> >" /> <input type="submit" name="submitnext" class="search" value="Next <?php echo $showposts ?> >" />
</form> </form>
</td> </td>
</tr> </tr>
@ -355,7 +355,7 @@ if ($previousXstart > -1) {
<tr> <tr>
<td valign="top" width="200"><!-- show X first/last posts --> <td valign="top" width="200"><!-- show X first/last posts -->
<form name="showXfirstlastposts" method="get"> <form name="showXfirstlastposts" method="get">
<input type="text" name="posts" value="<?php echo $posts ?>" style="width:40px;" /?> <input type="text" name="posts" value="<?php echo $showposts ?>" style="width:40px;" /?>
<select name="order">&nbsp;<option value="DESC" <?php <select name="order">&nbsp;<option value="DESC" <?php
$i = $order; $i = $order;
if ($i == "DESC") if ($i == "DESC")