AdminController::checkin - ItemsController::checkin

Created Diff never expires
4 removals
Lines
Total
Removed
Words
Total
Removed
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
27 lines
19 additions
Lines
Total
Added
Words
Total
Added
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
42 lines
public function checkin()
public function checkin()
{
{
// Check for request forgeries.
// Check for request forgeries.
$this->checkToken();
$this->checkToken();


$ids = $this->input->post->get('cid', array(), 'array');
$ids = $this->input->post->get('cid', array(), 'array');


$model = $this->getModel();
$model = $this->getModel();
$return = $model->checkin($ids);
$return = $model->checkin($ids);


if ($return === false)
if ($return === false)
{
{
// Checkin failed.
// Checkin failed.
$message = Text::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError());
$message = Text::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError());
$this->setRedirect(Route::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false), $message, 'error');
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list
. '&menutype=' . $this->app->getUserState('com_menus.items.menutype'),
false
),
$message,
'error'
);


return false;
return false;
}
}
else
else
{
{
// Checkin succeeded.
// Checkin succeeded.
$message = Text::plural($this->text_prefix . '_N_ITEMS_CHECKED_IN', count($ids));
$message = Text::plural($this->text_prefix . '_N_ITEMS_CHECKED_IN', count($ids));
$this->setRedirect(Route::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false), $message);
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list
. '&menutype=' . $this->app->getUserState('com_menus.items.menutype'),
false
),
$message
);


return true;
return true;
}
}
}
}