Gazelle/sections/bookmarks/index.php
What.CD 27da8d54c4 34 changes from Wed Aug 10 07:46:49 2011 -0400 to Fri Aug 12 14:53:11 2011 -0500
rules typo
featured album text change
fixed spacing issue on user edit page
remove time limit
file name changes
don't run blank searches
fixing email history ip
syntax fix
restrict re-scoring to EAC 0.95 logs, extension of previous commit to this file
fix per http://what.cd/forums.php?action=viewthread&threadid=137863&postid=3422033#post3422033
extend probable fix for http://what.cd/forums.php?action=viewthread&threadid=115673
probable fix for http://what.cd/forums.php?action=viewthread&threadid=115673
Revert "probable fix for http://what.cd/forums.php?action=viewthread&threadid=115673"
implemented suggestion per http://what.cd/forums.php?action=viewthread&threadid=137863
Revert "implemented suggestion per http://what.cd/forums.php?action=viewthread&threadid=137863"
fix per http://what.cd/forums.php?action=viewthread&threadid=136996
typo
notify of disabling remove snatched
I suck at grammar
collage rule update
2011-08-12 21:42:06 +00:00

57 lines
1.6 KiB
PHP

<?
enforce_login();
include(SERVER_ROOT.'/sections/bookmarks/functions.php');
// Number of users per page
define('BOOKMARKS_PER_PAGE', '20');
if (empty($_REQUEST['action'])) { $_REQUEST['action'] = 'view'; }
switch($_REQUEST['action']) {
case 'add':
require(SERVER_ROOT.'/sections/bookmarks/add.php');
break;
case 'remove':
require(SERVER_ROOT.'/sections/bookmarks/remove.php');
break;
case 'remove_snatched':
header('Location: bookmarks.php');
die();
error(0); // disable this for now as it's the heaviest part of the entire site
authorize();
$DB->query("DELETE b FROM bookmarks_torrents AS b WHERE b.UserID='".$LoggedUser['ID']."' AND b.GroupID IN(SELECT DISTINCT t.GroupID FROM torrents AS t INNER JOIN xbt_snatched AS s ON s.fid=t.ID AND s.uid='".$LoggedUser['ID']."')");
$Cache->delete_value('bookmarks_torrents_'.$UserID);
$Cache->delete_value('bookmarks_torrents_'.$UserID.'_full');
header('Location: bookmarks.php');
die();
break;
case 'view':
if (empty($_REQUEST['type'])) { $_REQUEST['type'] = 'torrents'; }
switch ($_REQUEST['type']) {
case 'torrents':
require(SERVER_ROOT.'/sections/bookmarks/torrents.php');
break;
case 'artists':
require(SERVER_ROOT.'/sections/bookmarks/artists.php');
break;
case 'collages':
$_GET['bookmarks'] = 1;
require(SERVER_ROOT.'/sections/collages/browse.php');
break;
case 'requests':
include(SERVER_ROOT.'/sections/requests/functions.php');
$_GET['type'] = 'bookmarks';
require(SERVER_ROOT.'/sections/requests/requests.php');
break;
default:
error(404);
}
break;
default:
error(404);
}
?>