function advSortResortAllGroupNames() { /* * Grab all categories active on the tracker... */ $rstCategoryList = @mysql_query("SELECT DISTINCT `category` FROM `namemap`"); if ($rstCategoryList === false) { return false; } /* * Run through each category, resorting everything */ while ($rowCategory = mysql_fetch_row($rstCategoryList)) { if (!advSortResortGroupNames($rowCategory[0])) { return false; } } return true; }
exit; break; case "grpsortall": /* * Sorts torrents and group names */ advSortResortCategory($category); advSortResortGroupNames($category); admShowMsg("Resorting complete", "Redirecting to advanced sorting page.", "Redirecting", true, "bta_advsort.php", 3); exit; break; case "grponlysort": /* * Sorts group names only */ advSortResortGroupNames($category); admShowMsg("Resorting of group headings complete", "Redirecting to advanced sorting page.", "Redirecting", true, "bta_advsort.php", 3); exit; break; case "mvtorrent": /* * Requires the info hash to be specified. */ if (!isset($_GET["info_hash"]) || strpos($_GET["info_hash"], " ") !== false) { admShowMsg("Invalid info_hash specified", "Redirecting to advanced sorting page.", "Redirecting", true, "bta_advsort.php", 3); exit; } /* * Let's grab some information on the torrent. */ $rstTorrent = @mysql_query("SELECT `grouping`, `sorting`, `filename` FROM `namemap` WHERE `info_hash` = \"" . $_GET["info_hash"] . "\"");