|
@@ -32,7 +32,7 @@ class EditController extends Controller
|
32
|
32
|
if (!$this->tokenIsCorrect() || !($playlist = $playlist_manager->findOwnedPlaylistWithId($playlist_id, $this->getUser())))
|
33
|
33
|
return $this->jsonNotFoundResponse();
|
34
|
34
|
|
35
|
|
- $element = $playlist_manager->getElementWithIndex($index);
|
|
35
|
+ $element = $playlist_manager->getElementWithIndex($playlist, $index);
|
36
|
36
|
$playlist_manager->removePlaylistElementWithIndex($playlist, $index);
|
37
|
37
|
|
38
|
38
|
$event = new EventElement($this->container);
|
|
@@ -56,7 +56,7 @@ class EditController extends Controller
|
56
|
56
|
$playlist_manager->addElementToPlaylist($element, $playlist);
|
57
|
57
|
|
58
|
58
|
$event = new EventElement($this->container);
|
59
|
|
- $event->addedFromPlaylist($element, $this->getUser(), $playlist);
|
|
59
|
+ $event->addedToPlaylist($element, $this->getUser(), $playlist);
|
60
|
60
|
|
61
|
61
|
$this->persist($element);
|
62
|
62
|
$this->flush();
|
|
@@ -78,7 +78,7 @@ class EditController extends Controller
|
78
|
78
|
$this->getPlaylistManager()->addElementToPlaylist($element, $form->getData());
|
79
|
79
|
|
80
|
80
|
$event = new EventElement($this->container);
|
81
|
|
- $event->addedFromPlaylist($element, $this->getUser(), $form->getData());
|
|
81
|
+ $event->addedToPlaylist($element, $this->getUser(), $form->getData());
|
82
|
82
|
|
83
|
83
|
$this->persist($element);
|
84
|
84
|
$this->flush();
|
|
@@ -109,7 +109,7 @@ class EditController extends Controller
|
109
|
109
|
$this->getPlaylistManager()->removePickedPlaylistToUser($this->getUser(), $playlist);
|
110
|
110
|
|
111
|
111
|
$event = new EventElement($this->container);
|
112
|
|
- $event->addedFromPlaylist($element, $this->getUser(), $new_playlist);
|
|
112
|
+ $event->addedToPlaylist($element, $this->getUser(), $new_playlist);
|
113
|
113
|
|
114
|
114
|
$this->persist($element);
|
115
|
115
|
$this->flush();
|