Diff
checker
Text
Text
Bilder
Dokumente
Excel
Ordner
Legal
Enterprise
Desktop-App
Preise
Einloggen
Diffchecker Desktop herunterladen
Texte vergleichen
Finde den Unterschied zwischen zwei Textdateien
Werkzeuge
Verlauf
Live-Editor
Gleiches ausblenden
Zeilenumbruch aus
Ansicht
Zweispaltig
Einspaltig
Vergleichsgenauigkeit
Intelligent
Wort
Zeichen
Syntaxhervorhebung
Syntax auswählen
Ignorieren
Text umwandeln
Zur ersten Änderung
Eingabe bearbeiten
Diffchecker Desktop
Der sicherste Weg, Diffchecker zu nutzen. Hol dir die Desktop-App: Deine Diffs verlassen nie deinen Computer!
Desktop holen
AdminController::delete - HistoryController::delete
Erstellt
vor 7 Jahren
Diff läuft nie ab
Löschen
Exportieren
Teilen
Erklären
12 Entfernungen
Zeilen
Gesamt
Entfernt
Zeichen
Gesamt
Entfernt
Um diese Funktion weiterhin zu nutzen, aktualisiere auf
Diff
checker
Pro
Preise anzeigen
36 Zeilen
Kopieren
17 Hinzufügungen
Zeilen
Gesamt
Hinzugefügt
Zeichen
Gesamt
Hinzugefügt
Um diese Funktion weiterhin zu nutzen, aktualisiere auf
Diff
checker
Pro
Preise anzeigen
38 Zeilen
Kopieren
public function delete()
public function delete()
{
{
Kopieren
Kopiert
Kopieren
Kopiert
// 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)
{
{
Kopieren
Kopiert
Kopieren
Kopiert
$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))
{
{
Kopieren
Kopiert
Kopieren
Kopiert
$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');
}
}
Kopieren
Kopiert
Kopieren
Kopiert
// Invoke the postDelete method to allow for the child class to access the model.
$this->postDeleteHook($model, $cid);
}
}
Kopieren
Kopiert
Kopieren
Kopiert
$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
)
);
}
}
Gespeicherte Diffs
Originaltext
Datei öffnen
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)); }
Bearbeitung
Datei öffnen
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 ) ); }
Unterschied finden