|
@@ 162-165 (lines=4) @@
|
| 159 |
|
public function delete($ids) { |
| 160 |
|
if(URequest::isAjax()){ |
| 161 |
|
$instance=$this->getModelInstance($ids); |
| 162 |
|
if (method_exists($instance, "__toString")) |
| 163 |
|
$instanceString=$instance . ""; |
| 164 |
|
else |
| 165 |
|
$instanceString=get_class($instance); |
| 166 |
|
if (sizeof($_POST) > 0) { |
| 167 |
|
try{ |
| 168 |
|
if (DAO::remove($instance)) { |
|
@@ 220-223 (lines=4) @@
|
| 217 |
|
$message=$this->_getEvents()->onErrorUpdateMessage($message,$instance); |
| 218 |
|
} |
| 219 |
|
}catch(\Exception $e){ |
| 220 |
|
if (method_exists($instance, "__toString")) |
| 221 |
|
$instanceString=$instance . ""; |
| 222 |
|
else |
| 223 |
|
$instanceString=get_class($instance); |
| 224 |
|
$message=new CRUDMessage("Exception : can not update `" . $instanceString . "`","Exception", "warning", "warning"); |
| 225 |
|
$message=$this->_getEvents()->onErrorUpdateMessage($message,$instance); |
| 226 |
|
} |