Allow blank redirect ID when adding artist aliases

This commit is contained in:
What.CD 2011-05-18 08:00:14 +00:00
parent 7a64bf0d36
commit faa6c0c055

View File

@ -5,8 +5,9 @@
$ArtistID = $_POST['artistid']; $ArtistID = $_POST['artistid'];
$Redirect = $_POST['redirect']; $Redirect = $_POST['redirect'];
$AliasName = db_string($_POST['name']); $AliasName = db_string($_POST['name']);
if(!$Redirect) { $Redirect = 0; }
if(!is_number($ArtistID) || !($Redirect == "0" || is_number($Redirect)) || !$ArtistID) { if(!is_number($ArtistID) || !($Redirect == 0 || is_number($Redirect)) || !$ArtistID) {
error(0); error(0);
} }
@ -14,8 +15,6 @@
error('Blank artist name'); error('Blank artist name');
} }
if(!$Redirect) { $Redirect = 0; }
/* /*
* In the case of foo, who released an album before changing his name to bar and releasing another * In the case of foo, who released an album before changing his name to bar and releasing another
* the field shared to make them appear on the same artist page is the ArtistID * the field shared to make them appear on the same artist page is the ArtistID