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:
Nils Asmussen 2016-08-03 22:58:17 +02:00
parent adaa23d39f
commit 9b5328d888

View File

@ -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__);