com web/master: Previous needs an exception for the second page otherwise we can't go back from there.: manage/user-notes.php
| From: | Sherif Ramadan | Date: | Sat, 15 Dec 2012 21:52:26 +0000 |
| Subject: | com web/master: Previous needs an exception for the second page otherwise we can't go back from there.: manage/user-notes.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-15104@lists.php.net to get a copy of this message | ||
Commit: 6a9b1139665ed875901d05cf43b6ad842ea06818
Author: Sherif Ramadan <googleguy@php.net> Sat, 15 Dec 2012 16:52:26 -0500
Parents: e1a89ec17a304f1f834a9ea2010313ddb08824ec
Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=6a9b1139665ed875901d05cf43b6ad842ea06818
Log:
Previous needs an exception for the second page otherwise we can't go back from there.
Changed paths:
M manage/user-notes.php
Diff:
diff --git a/manage/user-notes.php b/manage/user-notes.php
index f0e7c10..7761ecf 100644
--- a/manage/user-notes.php
+++ b/manage/user-notes.php
@@ -92,6 +92,7 @@ if (!$action) {
$limit = $page * 10; $page++;
$limitVotes = $NextPage * 25; $NextPage++;
$PrevPage = ($NextPage - 2) > -1 ? $NextPage - 2 : 0;
+ if ($NextPage == 2) $PrevPage = 1;
/* Added new voting information to be included in note from votes table. */
/* First notes */
@@ -651,8 +652,8 @@ case 'deletevotes':
$ids = implode(',',$ids);
if (db_query("DELETE FROM votes WHERE id IN ($ids)")) {
header('Location: user-notes.php?id=1&view=notes&was=' . urlencode($action) .
- (isset($_GET['type']) ? ('&type=' .
urlencode($_GET['type'])) : null) .
- (isset($_GET['votessearch']) ? '&votessearch=' .
urlencode($_GET['votessearch']) : null)
+ (isset($_REQUEST['type']) ? ('&type=' .
urlencode($_REQUEST['type'])) : null) .
+ (isset($_REQUEST['votessearch']) ? '&votessearch=' .
urlencode($_REQUEST['votessearch']) : null)
);
}
exit;