Diff
checker
Texte
Texte
Images
Documents
Excel
Dossiers
Legal
Enterprise
Application de bureau
Prix
Se connecter
Télécharger Diffchecker Desktop
Comparer le texte
Trouver la différence entre deux fichiers texte
Outils
Historique
Éditeur live
Cacher identiques
Sans retour à la ligne
Vue
Divisé
Unifié
Niveau de précision
Intelligent
Mot
Caractère
Coloration syntaxique
Choisir la syntaxe
Ignorer
Transformer le texte
Aller au premier écart
Modifier l'entrée
Diffchecker Desktop
La façon la plus sécurisée d'utiliser Diffchecker. Obtenez l'application Diffchecker Desktop : vos diffs ne quittent jamais votre ordinateur !
Obtenir Desktop
AdminController::delete - HistoryController::delete
Créé
il y a 7 ans
Le diff n'expire jamais
Effacer
Exporter
Partager
Expliquer
12 suppressions
Lignes
Total
Supprimé
Caractères
Total
Supprimé
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
36 lignes
Copier tout
17 ajouts
Lignes
Total
Ajouté
Caractères
Total
Ajouté
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
38 lignes
Copier tout
public function delete()
public function delete()
{
{
Copier
Copié
Copier
Copié
// 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)
{
{
Copier
Copié
Copier
Copié
$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))
{
{
Copier
Copié
Copier
Copié
$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');
}
}
Copier
Copié
Copier
Copié
// Invoke the postDelete method to allow for the child class to access the model.
$this->postDeleteHook($model, $cid);
}
}
Copier
Copié
Copier
Copié
$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
)
);
}
}
Différences enregistrées
Texte d'origine
Ouvrir un fichier
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)); }
Texte modifié
Ouvrir un fichier
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 ) ); }
Trouver la différence