summary refs log tree commit diff stats
path: root/pages
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2008-12-19 20:49:10 -0500
committerStarla Insigna <hatkirby@fourisland.com>2008-12-19 20:49:10 -0500
commit7c7a1832c679729e7e97657be90a6d5de0cd37db (patch)
tree17cdc14554a6cb6c1494bfb17f0055c9dbb3bb0c /pages
parentc9968db2dddd42760e7adba2e9e5475925c4996c (diff)
downloadfourisland-7c7a1832c679729e7e97657be90a6d5de0cd37db.tar.gz
fourisland-7c7a1832c679729e7e97657be90a6d5de0cd37db.tar.bz2
fourisland-7c7a1832c679729e7e97657be90a6d5de0cd37db.zip
Fixed Admin's movePending EIIEOIAFOA syndrome
The admin panel's movePending was suffering the same Every Item Is Exactly One ID Away From One Another syndrome that the main blog was facing in
changeset 8c0096629f88 (Fixed blog post Next/Previous links)
Diffstat (limited to 'pages')
-rwxr-xr-xpages/admin.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/pages/admin.php b/pages/admin.php index 50e7abc..a3dbffc 100755 --- a/pages/admin.php +++ b/pages/admin.php
@@ -364,11 +364,11 @@ if (isLoggedIn())
364 { 364 {
365 if ($_GET['dir'] == 'up') 365 if ($_GET['dir'] == 'up')
366 { 366 {
367 $get2pending = "SELECT * FROM pending WHERE id = " . ($_GET['id']-1); 367 $get2pending = "SELECT * FROM pending WHERE id < " . $_GET['id'] . " LIMIT 0,1";
368 $get2pending2 = mysql_query($get2pending); 368 $get2pending2 = mysql_query($get2pending);
369 $get2pending3 = mysql_fetch_array($get2pending2); 369 $get2pending3 = mysql_fetch_array($get2pending2);
370 370
371 if ($get2pending3['id'] == ($_GET['id']-1)) 371 if (isset($get2pending3['id']))
372 { 372 {
373 $otherPending = $get2pending3; 373 $otherPending = $get2pending3;
374 } else { 374 } else {
@@ -379,11 +379,11 @@ if (isLoggedIn())
379 } 379 }
380 } else if ($_GET['dir'] == 'down') 380 } else if ($_GET['dir'] == 'down')
381 { 381 {
382 $get2pending = "SELECT * FROM pending WHERE id = " . ($_GET['id']+1); 382 $get2pending = "SELECT * FROM pending WHERE id > " . $_GET['id'] . " LIMIT 0,1";
383 $get2pending2 = mysql_query($get2pending); 383 $get2pending2 = mysql_query($get2pending);
384 $get2pending3 = mysql_fetch_array($get2pending2); 384 $get2pending3 = mysql_fetch_array($get2pending2);
385 385
386 if ($get2pending3['id'] == ($_GET['id']+1)) 386 if (isset($get2pending3['id']))
387 { 387 {
388 $otherPending = $get2pending3; 388 $otherPending = $get2pending3;
389 } else { 389 } else {