AdminController::checkin - ItemsController::checkin

Created Diff never expires
4 remoções
Linhas
Total
Removido
Palavras
Total
Removido
Para continuar usando este recurso, atualize para
Diffchecker logo
Diffchecker Pro
27 linhas
19 adições
Linhas
Total
Adicionado
Palavras
Total
Adicionado
Para continuar usando este recurso, atualize para
Diffchecker logo
Diffchecker Pro
42 linhas
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;
}
}
}
}