Update method references in Collection controller
This commit is contained in:
parent
774f9de80f
commit
adecbe1e5c
@ -123,7 +123,7 @@ class Collection extends BaseController {
|
|||||||
'action' => $action,
|
'action' => $action,
|
||||||
'action_url' => $this->urlGenerator->fullUrl('collection/' . strtolower($action)),
|
'action_url' => $this->urlGenerator->fullUrl('collection/' . strtolower($action)),
|
||||||
'title' => $this->config->get('whose_list') . " Anime Collection · {$action}",
|
'title' => $this->config->get('whose_list') . " Anime Collection · {$action}",
|
||||||
'media_items' => $this->animeCollectionModel->get_media_type_list(),
|
'media_items' => $this->animeCollectionModel->getMediaTypeList(),
|
||||||
'item' => ($action === "Edit") ? $this->animeCollectionModel->get($id) : []
|
'item' => ($action === "Edit") ? $this->animeCollectionModel->get($id) : []
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -139,11 +139,11 @@ class Collection extends BaseController {
|
|||||||
if (array_key_exists('hummingbird_id', $data))
|
if (array_key_exists('hummingbird_id', $data))
|
||||||
{
|
{
|
||||||
$this->animeCollectionModel->update($data);
|
$this->animeCollectionModel->update($data);
|
||||||
$this->set_flash_message('Successfully updated collection item.', 'success');
|
$this->setFlashMessage('Successfully updated collection item.', 'success');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->set_flash_message('Failed to update collection item', 'error');
|
$this->setFlashMessage('Failed to update collection item', 'error');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->sessionRedirect();
|
$this->sessionRedirect();
|
||||||
@ -160,11 +160,11 @@ class Collection extends BaseController {
|
|||||||
if (array_key_exists('id', $data))
|
if (array_key_exists('id', $data))
|
||||||
{
|
{
|
||||||
$this->animeCollectionModel->add($data);
|
$this->animeCollectionModel->add($data);
|
||||||
$this->set_flash_message('Successfully added collection item', 'success');
|
$this->setFlashMessage('Successfully added collection item', 'success');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->set_flash_message('Failed to add collection item.', 'error');
|
$this->setFlashMessage('Failed to add collection item.', 'error');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->sessionRedirect();
|
$this->sessionRedirect();
|
||||||
@ -184,7 +184,7 @@ class Collection extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->animeCollectionModel->delete($data);
|
$this->animeCollectionModel->delete($data);
|
||||||
$this->set_flash_message("Successfully removed anime from collection.", 'success');
|
$this->setFlashMessage("Successfully removed anime from collection.", 'success');
|
||||||
|
|
||||||
$this->redirect("/collection/view", 303);
|
$this->redirect("/collection/view", 303);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user