Don't validate merge request on server.
Since we don't show the user invalid merge requests to send to the server, the user would have to handcraft such requests. Only admins can merge albums, which we trust anyway. So, let's remove this check.
This commit is contained in:
parent
adaa23d39f
commit
9b5328d888
@ -637,13 +637,6 @@ final class Album {
|
||||
$albumID = array_splice($albumIDs, 0, 1);
|
||||
$albumID = $albumID[0];
|
||||
|
||||
// Ensure that we don't merge an album into its own subalbum
|
||||
foreach($albumIDs as $id) {
|
||||
foreach($this->getSubAlbums($id) as $sid) {
|
||||
if($sid == $albumID) return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Move photos
|
||||
$query = Database::prepare(Database::get(), "UPDATE ? SET album = ? WHERE album IN (?)", array(LYCHEE_TABLE_PHOTOS, $albumID, $this->albumIDs));
|
||||
$result = Database::execute(Database::get(), $query, __METHOD__, __LINE__);
|
||||
|
Loading…
Reference in New Issue
Block a user