|
@@ 186-189 (lines=4) @@
|
| 183 |
|
public function delete($ids) { |
| 184 |
|
if(URequest::isAjax()){ |
| 185 |
|
$instance=$this->getModelInstance($ids); |
| 186 |
|
if (method_exists($instance, "__toString")) |
| 187 |
|
$instanceString=$instance . ""; |
| 188 |
|
else |
| 189 |
|
$instanceString=get_class($instance); |
| 190 |
|
if (sizeof($_POST) > 0) { |
| 191 |
|
try{ |
| 192 |
|
if (DAO::remove($instance)) { |
|
@@ 273-276 (lines=4) @@
|
| 270 |
|
$message=$this->_getEvents()->onErrorUpdateMessage($message); |
| 271 |
|
} |
| 272 |
|
}catch(\Exception $e){ |
| 273 |
|
if (method_exists($instance, "__toString")) |
| 274 |
|
$instanceString=$instance . ""; |
| 275 |
|
else |
| 276 |
|
$instanceString=get_class($instance); |
| 277 |
|
$message=new CRUDMessage("Exception : can not update `" . $instanceString . "`","Exception", "warning", "warning"); |
| 278 |
|
$message=$this->_getEvents()->onErrorUpdateMessage($message); |
| 279 |
|
} |