mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
Quick fix for admin-ui deletion bug. (only relevant when pagination is in affect)
This commit is contained in:
parent
4c7525b50d
commit
8c94862fb3
@ -3795,7 +3795,7 @@ class e_admin_ui extends e_admin_controller_ui
|
||||
|
||||
$this->setTriggersEnabled(false);
|
||||
$data = array();
|
||||
$model = $this->getTreeModel()->getNode($id);
|
||||
$model = $this->getTreeModel()->getNode($id); //FIXME - this has issues with being on a page other than the 1st.
|
||||
if($model)
|
||||
{
|
||||
$data = $model->getData();
|
||||
@ -3812,6 +3812,13 @@ class e_admin_ui extends e_admin_controller_ui
|
||||
$this->getTreeModel()->setMessages();// errors
|
||||
}
|
||||
}
|
||||
else //FIXME - this is a fall-back for the BUG which causes model to fail on all list pages other than the 1st
|
||||
{
|
||||
//echo "Couldn't get Node for ID: ".$id;
|
||||
// exit;
|
||||
$check = $this->getTreeModel()->delete($id);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2329,6 +2329,10 @@ class e_form
|
||||
$asc = strtoupper(vartrue($options['asc'], 'asc'));
|
||||
$elid = $fid;//$options['id'];
|
||||
$query = isset($options['query']) ? $options['query'] : e_QUERY ;
|
||||
if($_GET['action'] == 'list')
|
||||
{
|
||||
$query = e_QUERY; //XXX Quick fix for loss of pagination after 'delete'.
|
||||
}
|
||||
$url = (isset($options['url']) ? $tp->replaceConstants($options['url'], 'abs') : e_SELF);
|
||||
$formurl = $url.($query ? '?'.$query : '');
|
||||
$fields = $options['fields'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user