Diff
checker
Texto
Texto
Imagens
Documentos
Excel
Pastas
Legal
Enterprise
Aplicativo para desktop
Preços
Fazer login
Baixar o Diffchecker Desktop
Comparar texto
Encontre a diferença entre dois arquivos de texto
Ferramentas
Histórico
Editor live
Recolher inalteradas
Sem quebra de linha
Layout
Dividido
Unificado
Nível de detalhe
Inteligente
Palavra
Caractere
Realce de sintaxe
Escolher sintaxe
Ignorar
Transformar texto
Ir à primeira mudança
Editar entrada
Diffchecker Desktop
A maneira mais segura de usar o Diffchecker. Obtenha o aplicativo Diffchecker Desktop: seus diffs nunca saem do seu computador!
Obter Desktop
AdminController::delete - HistoryController::delete
Criado
há 7 anos
O diff nunca expira
Limpar
Exportar
Compartilhar
Explicar
12 remoções
Linhas
Total
Removido
Caracteres
Total
Removido
Para continuar usando este recurso, atualize para
Diff
checker
Pro
Ver preços
36 linhas
Copiar tudo
17 adições
Linhas
Total
Adicionado
Caracteres
Total
Adicionado
Para continuar usando este recurso, atualize para
Diff
checker
Pro
Ver preços
38 linhas
Copiar tudo
public function delete()
public function delete()
{
{
Copiar
Copiado
Copiar
Copiado
// Check for request forgeries
$this->checkToken();
$this->checkToken();
// Get items to remove from the request.
// Get items to remove from the request.
$cid = $this->input->get('cid', array(), 'array');
$cid = $this->input->get('cid', array(), 'array');
if (!is_array($cid) || count($cid) < 1)
if (!is_array($cid) || count($cid) < 1)
{
{
Copiar
Copiado
Copiar
Copiado
$this->app->
getLogger()->warning
(Text::_(
$this->text_prefix . '
_NO_ITEM_SELECTED'),
array('category' => 'jerror'))
;
$this->app->
enqueueMessage
(Text::_(
'COM_CONTENTHISTORY
_NO_ITEM_SELECTED'),
'warning')
;
}
}
else
else
{
{
// Get the model.
// Get the model.
$model = $this->getModel();
$model = $this->getModel();
// Make sure the item ids are integers
// Make sure the item ids are integers
$cid = ArrayHelper::toInteger($cid);
$cid = ArrayHelper::toInteger($cid);
// Remove the items.
// Remove the items.
if ($model->delete($cid))
if ($model->delete($cid))
{
{
Copiar
Copiado
Copiar
Copiado
$this->setMessage(Text::plural(
$this->text_prefix . '
_N_ITEMS_DELETED', count($cid)));
$this->setMessage(Text::plural(
'COM_CONTENTHISTORY
_N_ITEMS_DELETED', count($cid)));
}
}
else
else
{
{
$this->setMessage($model->getError(), 'error');
$this->setMessage($model->getError(), 'error');
}
}
Copiar
Copiado
Copiar
Copiado
// Invoke the postDelete method to allow for the child class to access the model.
$this->postDeleteHook($model, $cid);
}
}
Copiar
Copiado
Copiar
Copiado
$this->setRedirect(
Route::_(
'index.php?option=
' . $this->
option
. '&
view
=' . $this->
view_list
, false
)
);
$this->setRedirect(
Route::_(
'index.php?option=
com_contenthistory&view=history&layout=modal&tmpl=component&item_id='
. $this->input->getInt('item_id') . '&type_id=
' . $this->
input->getInt('type_id')
. '&
type_alias
=' . $this->
input->getCmd('type_alias') . '&' . Session::getFormToken() . '=1'
, false
)
);
}
}
Diferenças salvas
Texto original
Abrir arquivo
public function delete() { // Check for request forgeries $this->checkToken(); // Get items to remove from the request. $cid = $this->input->get('cid', array(), 'array'); if (!is_array($cid) || count($cid) < 1) { $this->app->getLogger()->warning(Text::_($this->text_prefix . '_NO_ITEM_SELECTED'), array('category' => 'jerror')); } else { // Get the model. $model = $this->getModel(); // Make sure the item ids are integers $cid = ArrayHelper::toInteger($cid); // Remove the items. if ($model->delete($cid)) { $this->setMessage(Text::plural($this->text_prefix . '_N_ITEMS_DELETED', count($cid))); } else { $this->setMessage($model->getError(), 'error'); } // Invoke the postDelete method to allow for the child class to access the model. $this->postDeleteHook($model, $cid); } $this->setRedirect(Route::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false)); }
Texto alterado
Abrir arquivo
public function delete() { $this->checkToken(); // Get items to remove from the request. $cid = $this->input->get('cid', array(), 'array'); if (!is_array($cid) || count($cid) < 1) { $this->app->enqueueMessage(Text::_('COM_CONTENTHISTORY_NO_ITEM_SELECTED'), 'warning'); } else { // Get the model. $model = $this->getModel(); // Make sure the item ids are integers $cid = ArrayHelper::toInteger($cid); // Remove the items. if ($model->delete($cid)) { $this->setMessage(Text::plural('COM_CONTENTHISTORY_N_ITEMS_DELETED', count($cid))); } else { $this->setMessage($model->getError(), 'error'); } } $this->setRedirect( Route::_( 'index.php?option=com_contenthistory&view=history&layout=modal&tmpl=component&item_id=' . $this->input->getInt('item_id') . '&type_id=' . $this->input->getInt('type_id') . '&type_alias=' . $this->input->getCmd('type_alias') . '&' . Session::getFormToken() . '=1', false ) ); }
Encontrar Diferença