CC-4095: Media Library -> Playlist: dj user can delete the playlist owned by

others on some situation.
This commit is contained in:
James 2012-07-10 17:24:57 -04:00
parent f174a2bcf3
commit 24a90700a1
3 changed files with 12 additions and 12 deletions

View file

@ -130,9 +130,9 @@ class LibraryController extends Zend_Controller_Action
}
try {
Application_Model_Playlist::DeletePlaylists($playlists, $user->getId());
Application_Model_Playlist::deletePlaylists($playlists, $user->getId());
} catch (PlaylistNoPermissionException $e) {
$this->view->message = "You don't have a permission to delete all playlists/files that are selected.";
$this->view->message = "You don't have permission to delete selected playlists/files.";
return;
}

View file

@ -98,7 +98,7 @@ class PlaylistController extends Zend_Controller_Action
}
private function playlistNoPermission(){
$this->view->error = "You don't have permission to deleted playlist(s)";
$this->view->error = "You don't have permission to delete selected playlist(s).";
}
private function playlistUnknownError($e)
@ -217,7 +217,7 @@ class PlaylistController extends Zend_Controller_Action
$pl = new Application_Model_Playlist($this->pl_sess->id);
}
Application_Model_Playlist::DeletePlaylists($ids, $userInfo->id);
Application_Model_Playlist::deletePlaylists($ids, $userInfo->id);
$this->createFullResponse($pl);
}
catch (PlaylistNoPermissionException $e) {

View file

@ -804,7 +804,7 @@ class Application_Model_Playlist {
* Delete playlists that match the ids..
* @param array $p_ids
*/
public static function DeletePlaylists($p_ids, $p_userId)
public static function deletePlaylists($p_ids, $p_userId)
{
$leftOver = self::playlistsNotOwnedByUser($p_ids, $p_userId);
if (count($leftOver) == 0) {