Empty commit

This commit is contained in:
Git 2012-02-23 08:00:18 +00:00
parent 5d9b6c6406
commit e28f670791
10 changed files with 119 additions and 86 deletions

View File

@ -896,8 +896,8 @@ CREATE TABLE `torrents_artists` (
`ArtistID` int(10) NOT NULL, `ArtistID` int(10) NOT NULL,
`AliasID` int(10) NOT NULL, `AliasID` int(10) NOT NULL,
`UserID` int(10) unsigned NOT NULL DEFAULT '0', `UserID` int(10) unsigned NOT NULL DEFAULT '0',
`Importance` enum('1','2','3','4','5','6','7') DEFAULT NULL, `Importance` enum('1','2','3','4','5','6','7') NOT NULL DEFAULT '1',
PRIMARY KEY (`GroupID`,`AliasID`), PRIMARY KEY (`GroupID`,`ArtistID`,`Importance`),
KEY `ArtistID` (`ArtistID`), KEY `ArtistID` (`ArtistID`),
KEY `AliasID` (`AliasID`), KEY `AliasID` (`AliasID`),
KEY `Importance` (`Importance`), KEY `Importance` (`Importance`),

View File

@ -102,7 +102,7 @@ function compare($X, $Y){
$LastReleaseType = 0; $LastReleaseType = 0;
if(empty($Importances) || empty($TorrentList)) { if(empty($Importances) || empty($TorrentList)) {
$DB->query("SELECT $DB->query("SELECT
DISTINCT ta.GroupID, ta.Importance, tg.VanityHouse DISTINCTROW ta.GroupID, ta.Importance, tg.VanityHouse
FROM torrents_artists AS ta FROM torrents_artists AS ta
JOIN torrents_group AS tg ON tg.ID=ta.GroupID JOIN torrents_group AS tg ON tg.ID=ta.GroupID
WHERE ta.ArtistID='$ArtistID' WHERE ta.ArtistID='$ArtistID'
@ -110,7 +110,8 @@ function compare($X, $Y){
tg.Year DESC, tg.Name DESC"); tg.Year DESC, tg.Name DESC");
$GroupIDs = $DB->collect('GroupID'); $GroupIDs = $DB->collect('GroupID');
$Importances = $DB->to_array('GroupID', MYSQLI_BOTH, false); $Importances = $DB->to_array(false, MYSQLI_BOTH, false);
if(count($GroupIDs)>0) { if(count($GroupIDs)>0) {
$TorrentList = get_groups($GroupIDs, true,true); $TorrentList = get_groups($GroupIDs, true,true);
$TorrentList = $TorrentList['matches']; $TorrentList = $TorrentList['matches'];
@ -128,26 +129,39 @@ function compare($X, $Y){
//Get list of used release types //Get list of used release types
$UsedReleases = array(); $UsedReleases = array();
foreach($TorrentList as $GroupID=>$Group) { foreach($Importances as $ID=>$Group) {
if($Importances[$GroupID]['Importance'] == '2') { switch ($Importances[$ID]['Importance']) {
$TorrentList[$GroupID]['ReleaseType'] = 1024; case '2':
$GuestAlbums = true; $Importances[$ID]['ReleaseType'] = 1024;
} //$TorrentList[$GroupID]['ReleaseType'] = 1024;
if($Importances[$GroupID]['Importance'] == '3') { $GuestAlbums = true;
$TorrentList[$GroupID]['ReleaseType'] = 1023; break;
$RemixerAlbums = true;
} case '3':
if($Importances[$GroupID]['Importance'] == '4') { $Importances[$ID]['ReleaseType'] = 1023;
$TorrentList[$GroupID]['ReleaseType'] = 1022; //$TorrentList[$GroupID]['ReleaseType'] = 1023;
$ComposerAlbums = true; $RemixerAlbums = true;
} break;
if($Importances[$GroupID]['Importance'] == '7') {
$TorrentList[$GroupID]['ReleaseType'] = 1021; case '4':
$ProducerAlbums = true; $Importances[$ID]['ReleaseType'] = 1022;
} //$TorrentList[$GroupID]['ReleaseType'] = 1022;
if(!in_array($TorrentList[$GroupID]['ReleaseType'], $UsedReleases)) { $ComposerAlbums = true;
$UsedReleases[] = $TorrentList[$GroupID]['ReleaseType']; break;
case '7':
$Importances[$ID]['ReleaseType'] = 1021;
//$TorrentList[$GroupID]['ReleaseType'] = 1021;
$ProducerAlbums = true;
break;
default:
$Importances[$ID]['ReleaseType'] = $TorrentList[$Group['GroupID']]['ReleaseType'];
} }
if(!in_array($Importances[$ID]['ReleaseType'], $UsedReleases)) {
$UsedReleases[] = $Importances[$ID]['ReleaseType'];
}
} }
if(!empty($GuestAlbums)) { if(!empty($GuestAlbums)) {
@ -208,10 +222,20 @@ function compare($X, $Y){
$OpenTable = false; $OpenTable = false;
$ShowGroups = !isset($LoggedUser['TorrentGrouping']) || $LoggedUser['TorrentGrouping'] == 0; $ShowGroups = !isset($LoggedUser['TorrentGrouping']) || $LoggedUser['TorrentGrouping'] == 0;
$HideTorrents = ($ShowGroups ? '' : ' hidden'); $HideTorrents = ($ShowGroups ? '' : ' hidden');
$OldGroupID = 0;
$ReleaseType = 0;
foreach ($TorrentList as $GroupID=>$Group) { foreach ($Importances as $Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists) = array_values($Group); list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists) = array_values($TorrentList[$Group['GroupID']]);
$GroupVanityHouse = $Importances[$GroupID]['VanityHouse']; $ReleaseType = $Group['ReleaseType'];
$GroupVanityHouse = $Group['VanityHouse'];
if ($GroupID == $OldGroupID && $ReleaseType == $OldReleaseType) {
continue;
} else {
$OldGroupID = $GroupID;
$OldReleaseType = $ReleaseType;
}
$TagList = explode(' ',str_replace('_','.',$TagList)); $TagList = explode(' ',str_replace('_','.',$TagList));

View File

@ -110,9 +110,11 @@
} }
}*/ }*/
//WEB has no ripping log. //WEB has no ripping log. Ditto Vinyl - Actually ditto everything but CD
$WEBOverride = ((strpos($MediaList, "WEB") !== false) && $Media == "WEB"); //$WEBOverride = ((strpos($MediaList, "WEB") !== false) && $Media == "WEB");
if($Format == "FLAC" && $LogCue && !$WEBOverride) { //$VinylOverride = ((strpos($MediaList, "Vinyl") !== false) && $Media == "Vinyl");
//if($Format == "FLAC" && $LogCue && !$WEBOverride && !$VinylOverride) {
if($Format == "FLAC" && $LogCue && $Media == 'CD') {
if(strpos($LogCue, "Log") && !$HasLog) { if(strpos($LogCue, "Log") && !$HasLog) {
$Err = "This request requires a log"; $Err = "This request requires a log";
} }

View File

@ -41,15 +41,13 @@
$DB->query("SELECT Name FROM artists_group WHERE ArtistID=".$ArtistID); $DB->query("SELECT Name FROM artists_group WHERE ArtistID=".$ArtistID);
list($ArtistName) = $DB->next_record(); list($ArtistName) = $DB->next_record();
$DB->query("SELECT AliasID FROM torrents_artists WHERE GroupID='$GroupID' AND ArtistID='$ArtistID'");
if($DB->record_count() == 0) { $DB->query("INSERT IGNORE INTO torrents_artists
(GroupID, ArtistID, AliasID, Importance, UserID) VALUES
('$GroupID', '$ArtistID', '$AliasID', '$Importance', '$UserID')");
if ($DB->affected_rows()) {
$Changed = true; $Changed = true;
$DB->query("INSERT INTO torrents_artists
(GroupID, ArtistID, AliasID, Importance, UserID) VALUES
('$GroupID', '$ArtistID', '$AliasID', '$Importance', '$UserID')");
$DB->query("INSERT INTO torrents_group (ID, NumArtists) $DB->query("INSERT INTO torrents_group (ID, NumArtists)
SELECT ta.GroupID, COUNT(ta.ArtistID) SELECT ta.GroupID, COUNT(ta.ArtistID)
FROM torrents_artists AS ta FROM torrents_artists AS ta
@ -59,14 +57,8 @@
ON DUPLICATE KEY UPDATE ON DUPLICATE KEY UPDATE
NumArtists=VALUES(NumArtists);"); NumArtists=VALUES(NumArtists);");
write_log("Artist ".$ArtistID." (".$ArtistName.") was added to the group ".$GroupID." (".$GroupName.") by user ".$LoggedUser['ID']." (".$LoggedUser['Username'].")"); write_log("Artist ".$ArtistID." (".$ArtistName.") was added to the group ".$GroupID." (".$GroupName.") as ".$ArtistTypes[$Importance]." by user ".$LoggedUser['ID']." (".$LoggedUser['Username'].")");
write_group_log($GroupID, 0, $LoggedUser['ID'], "added artist ".$ArtistName, 0); write_group_log($GroupID, 0, $LoggedUser['ID'], "added artist ".$ArtistName." as ".$ArtistTypes[$Importance], 0);
} else {
list($OldAliasID) = $DB->next_record();
if($OldAliasID == 0) {
$Changed = true;
$DB->query('UPDATE torrents_artists SET AliasID='.$AliasID.' WHERE GroupID='.$GroupID.' AND ArtistID='.$ArtistID);
}
} }
} }
} }

View File

@ -1,15 +1,16 @@
<? <?
$ArtistID = db_string($_GET['artistid']); $ArtistID = db_string($_GET['artistid']);
$GroupID = db_string($_GET['groupid']); $GroupID = db_string($_GET['groupid']);
$Importance = db_string($_GET['importance']);
if(!is_number($ArtistID) || !is_number($GroupID)) { if(!is_number($ArtistID) || !is_number($GroupID) || !is_number($Importance)) {
error(404); error(404);
} }
if(!check_perms('torrents_edit')) { if(!check_perms('torrents_edit')) {
error(403); error(403);
} }
$DB->query("DELETE FROM torrents_artists WHERE GroupID='$GroupID' AND ArtistID='$ArtistID'"); $DB->query("DELETE FROM torrents_artists WHERE GroupID='$GroupID' AND ArtistID='$ArtistID' AND Importance='$Importance'");
$DB->query("SELECT Name FROM artists_group WHERE ArtistID=".$ArtistID); $DB->query("SELECT Name FROM artists_group WHERE ArtistID=".$ArtistID);
list($ArtistName) = $DB->next_record(); list($ArtistName) = $DB->next_record();
@ -48,8 +49,8 @@
$Cache->delete_value('torrents_details_'.$GroupID); // Delete torrent group cache $Cache->delete_value('torrents_details_'.$GroupID); // Delete torrent group cache
$Cache->delete_value('groups_artists_'.$GroupID); // Delete group artist cache $Cache->delete_value('groups_artists_'.$GroupID); // Delete group artist cache
write_log("Artist ".$ArtistID." (".$ArtistName.") was removed from the group ".$GroupID." (".$GroupName.") by user ".$LoggedUser['ID']." (".$LoggedUser['Username'].")"); write_log("Artist (".$ArtistTypes[$Importance].") ".$ArtistID." (".$ArtistName.") was removed from the group ".$GroupID." (".$GroupName.") by user ".$LoggedUser['ID']." (".$LoggedUser['Username'].")");
write_group_log($GroupID, 0, $LoggedUser['ID'], "removed artist ".$ArtistName, 0); write_group_log($GroupID, 0, $LoggedUser['ID'], "removed artist ".$ArtistName." (".$ArtistTypes[$Importance].")", 0);
update_hash($GroupID); update_hash($GroupID);

View File

@ -151,7 +151,7 @@ function compare($X, $Y){
} }
?> ?>
&nbsp;(<?=$AliasID?>)&nbsp; &nbsp;(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>');this.parentNode.parentNode.style.display = 'none';">[X]</a></span> <span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=4');this.parentNode.parentNode.style.display = 'none';">[X]</a></span>
<? } ?> <? } ?>
</li> </li>
<? } <? }
@ -170,7 +170,7 @@ function compare($X, $Y){
} }
?> ?>
&nbsp;(<?=$AliasID?>)&nbsp; &nbsp;(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>');this.parentNode.parentNode.style.display = 'none';">[X]</a></span> <span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=6');this.parentNode.parentNode.style.display = 'none';">[X]</a></span>
<? } ?> <? } ?>
</li> </li>
<? <?
@ -192,7 +192,7 @@ function compare($X, $Y){
} }
?> ?>
&nbsp;(<?=$AliasID?>)&nbsp; &nbsp;(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>');this.parentNode.parentNode.style.display = 'none';">[X]</a></span> <span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=1');this.parentNode.parentNode.style.display = 'none';">[X]</a></span>
<? } ?> <? } ?>
</li> </li>
<? <?
@ -211,7 +211,7 @@ function compare($X, $Y){
} }
?> ?>
&nbsp;(<?=$AliasID?>)&nbsp; &nbsp;(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>');this.parentNode.parentNode.style.display = 'none';">[X]</a></span> <span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=2');this.parentNode.parentNode.style.display = 'none';">[X]</a></span>
<? } ?> <? } ?>
</li> </li>
<? <?
@ -231,7 +231,7 @@ function compare($X, $Y){
} }
?> ?>
&nbsp;(<?=$AliasID?>)&nbsp; &nbsp;(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>');this.parentNode.parentNode.style.display = 'none';">[X]</a></span> <span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=5');this.parentNode.parentNode.style.display = 'none';">[X]</a></span>
<? } ?> <? } ?>
</li> </li>
<? <?
@ -251,7 +251,7 @@ function compare($X, $Y){
} }
?> ?>
&nbsp;(<?=$AliasID?>)&nbsp; &nbsp;(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>');this.parentNode.parentNode.style.display = 'none';">[X]</a></span> <span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=3');this.parentNode.parentNode.style.display = 'none';">[X]</a></span>
<? } ?> <? } ?>
</li> </li>
<? <?
@ -271,7 +271,7 @@ function compare($X, $Y){
} }
?> ?>
&nbsp;(<?=$AliasID?>)&nbsp; &nbsp;(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>');this.parentNode.parentNode.style.display = 'none';">[X]</a></span> <span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=7');this.parentNode.parentNode.style.display = 'none';">[X]</a></span>
<? } ?> <? } ?>
</li> </li>
<? <?

View File

@ -14,6 +14,9 @@ function js_pages($Action, $TorrentID, $NumResults, $CurrentPage) {
return implode(' | ',$PageLinks); return implode(' | ',$PageLinks);
} }
// This gets used in a few places
$ArtistTypes = array(1 => 'Main', 2 => 'Guest', 3 => 'Remixer', 4 => 'Composer', 5 => 'Conductor', 6 => 'DJ/Compiler', 7 => 'Producer');
if(!empty($_REQUEST['action'])) { if(!empty($_REQUEST['action'])) {
switch($_REQUEST['action']){ switch($_REQUEST['action']){
case 'edit': case 'edit':

View File

@ -7,27 +7,35 @@
} }
authorize(); authorize();
$Artists = explode(',', $_POST['artists']); $GroupID = $_POST['groupid'];
foreach($Artists as &$Artist) { $Artists = explode(',',$_POST['artists']);
if(!is_number($Artist)) { $CleanArtists = array();
unset($Artist); $ArtistIDs = array();
} else { $ArtistsString = '0';
$Cache->delete_value('artist_'.$Artist);
foreach($Artists as $i => $Artist) {
list($Importance, $ArtistID) = explode(';',$Artist);
if(is_number($ArtistID) && is_number($Importance)) {
$Cache->delete_value('artist_'.$ArtistID);
$CleanArtists[] = array($Importance, $ArtistID);
$ArtistsString .= ",$ArtistID";
$ArtistIDs[] = $ArtistID;
} }
} }
$ArtistsString = implode(',', $Artists);
if(count($Artists) > 0) { if(count($CleanArtists) > 0) {
if($_POST['manager_action'] == 'delete') { if($_POST['manager_action'] == 'delete') {
$DB->query("SELECT Name FROM torrents_group WHERE ID = '".$_POST['groupid']."'"); $DB->query("SELECT Name FROM torrents_group WHERE ID = '".$_POST['groupid']."'");
list($GroupName) = $DB->next_record(); list($GroupName) = $DB->next_record();
$DB->query("SELECT ArtistID, Name FROM artists_group WHERE ArtistID IN (".$ArtistsString.")"); $DB->query("SELECT ArtistID, Name FROM artists_group WHERE ArtistID IN (".$ArtistsString.")");
$ArtistNames = $DB->to_array('ArtistID'); $ArtistNames = $DB->to_array('ArtistID');
foreach($ArtistNames as $ArtistID => $ArtistInfo) { print_r($ArtistNames);
write_log("Artist ".$ArtistID." (".$ArtistInfo['Name'].") was removed from the group ".$_POST['groupid']." (".$GroupName.") by user ".$LoggedUser['ID']." (".$LoggedUser['Username'].")"); foreach ($CleanArtists AS $Artist) {
list($Importance,$ArtistID) = $Artist;
write_log("Artist (".$ArtistTypes[$Importance].") ".$ArtistID." (".$ArtistNames[$ArtistID]['Name'].") was removed from the group ".$_POST['groupid']." (".$GroupName.") by user ".$LoggedUser['ID']." (".$LoggedUser['Username'].")");
write_group_log($GroupID, 0, $LoggedUser['ID'], "Removed artist ".$ArtistNames[$ArtistID]['Name']." (".$ArtistTypes[$Importance].")", 0);
$DB->query("DELETE FROM torrents_artists WHERE GroupID = '$GroupID' AND ArtistID = '$ArtistID' AND Importance = '$Importance'");
} }
$DB->query("DELETE FROM torrents_artists WHERE GroupID = '".$_POST['groupid']."' AND ArtistID IN (".$ArtistsString.")");
$DB->query("SELECT ArtistID $DB->query("SELECT ArtistID
FROM requests_artists FROM requests_artists
WHERE ArtistID IN (".$ArtistsString.") WHERE ArtistID IN (".$ArtistsString.")
@ -35,14 +43,14 @@
FROM torrents_artists FROM torrents_artists
WHERE ArtistID IN (".$ArtistsString.")"); WHERE ArtistID IN (".$ArtistsString.")");
$Items = $DB->collect('ArtistID'); $Items = $DB->collect('ArtistID');
$EmptyArtists = array_diff($Artists, $Items); $EmptyArtists = array_diff($ArtistIDs, $Items);
foreach($EmptyArtists as $ArtistID) { foreach($EmptyArtists as $ArtistID) {
delete_artist($ArtistID); delete_artist($ArtistID);
} }
} else { } else {
$DB->query("UPDATE torrents_artists SET Importance = '".$_POST['importance']."' WHERE GroupID = '".$_POST['groupid']."' AND ArtistID IN (".$ArtistsString.")"); $DB->query("UPDATE IGNORE torrents_artists SET Importance = '".$_POST['importance']."' WHERE GroupID = '$GroupID' AND ArtistID IN (".$ArtistsString.")");
} }
$Cache->delete_value('groups_artists_'.$_POST['groupid']); $Cache->delete_value('groups_artists_'.$GroupID);
header("Location: torrents.php?id=".$_POST['groupid']); header("Location: torrents.php?id=".$GroupID);
} }
?> ?>

View File

@ -28,21 +28,24 @@
LEFT JOIN torrents AS t ON t.GroupID = tg.ID LEFT JOIN torrents AS t ON t.GroupID = tg.ID
WHERE tg.ID=".$_GET['groupid']." WHERE tg.ID=".$_GET['groupid']."
GROUP BY tg.ID"); GROUP BY tg.ID");
if ($DB->record_count()) {
list($Properties) = $DB->to_array(false,MYSQLI_BOTH); list($Properties) = $DB->to_array(false,MYSQLI_BOTH);
$UploadForm = $Categories[$Properties['CategoryID']-1]; $UploadForm = $Categories[$Properties['CategoryID']-1];
$Properties['CategoryName'] = $Categories[$Properties['CategoryID']-1]; $Properties['CategoryName'] = $Categories[$Properties['CategoryID']-1];
$Properties['Artists'] = get_artist($_GET['groupid']); $Properties['Artists'] = get_artist($_GET['groupid']);
$DB->query("SELECT $DB->query("SELECT
GROUP_CONCAT(tags.Name SEPARATOR ', ') AS TagList GROUP_CONCAT(tags.Name SEPARATOR ', ') AS TagList
FROM torrents_tags AS tt JOIN tags ON tags.ID=tt.TagID FROM torrents_tags AS tt JOIN tags ON tags.ID=tt.TagID
WHERE tt.GroupID='$_GET[groupid]'"); WHERE tt.GroupID='$_GET[groupid]'");
list($Properties['TagList']) = $DB->next_record(); list($Properties['TagList']) = $DB->next_record();
} else {
unset($_GET['groupid']);
}
if (!empty($_GET['requestid']) && is_number($_GET['requestid'])) { if (!empty($_GET['requestid']) && is_number($_GET['requestid'])) {
$Properties['RequestID'] = $_GET['requestid']; $Properties['RequestID'] = $_GET['requestid'];
} }
} elseif (empty($Properties) && !empty($_GET['requestid']) && is_number($_GET['requestid'])) { } elseif (empty($Properties) && !empty($_GET['requestid']) && is_number($_GET['requestid'])) {
include(SERVER_ROOT.'/sections/requests/functions.php'); include(SERVER_ROOT.'/sections/requests/functions.php');
$DB->query("SELECT $DB->query("SELECT

View File

@ -64,7 +64,7 @@ function ArtistManager() {
elBox.type = 'checkbox'; elBox.type = 'checkbox';
elBox.id = 'artistmanager_box'+(i-importance+1); elBox.id = 'artistmanager_box'+(i-importance+1);
elBox.name = 'artistmanager_box'; elBox.name = 'artistmanager_box';
elBox.value = importance+','+ArtistID; elBox.value = importance+';'+ArtistID;
elBox.onclick = function(e) { SelectArtist(e,this); }; elBox.onclick = function(e) { SelectArtist(e,this); };
elArtistList.children[i].insertBefore(elBox, elArtistList.children[i].children[0]); elArtistList.children[i].insertBefore(elBox, elArtistList.children[i].children[0]);
if(importance == 1 || importance == 4 || importance == 6) { if(importance == 1 || importance == 4 || importance == 6) {
@ -182,7 +182,7 @@ function ArtistManagerSubmit() {
var MainSelectionCount = 0; var MainSelectionCount = 0;
for(var i = 0, boxes = $('[name="artistmanager_box"]'); boxes.raw(i); i++) { for(var i = 0, boxes = $('[name="artistmanager_box"]'); boxes.raw(i); i++) {
if(boxes.raw(i).checked) { if(boxes.raw(i).checked) {
Selection.push(boxes.raw(i).value.substr(2)); Selection.push(boxes.raw(i).value);
if(boxes.raw(i).value.substr(0,1) == '1') { if(boxes.raw(i).value.substr(0,1) == '1') {
MainSelectionCount++; MainSelectionCount++;
} }