Commit:    6a9b1139665ed875901d05cf43b6ad842ea06818
Author:    Sherif Ramadan <[email protected]>         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;


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to