|
@@ 169-172 (lines=4) @@
|
| 166 |
|
public function delete($ids) { |
| 167 |
|
if(URequest::isAjax()){ |
| 168 |
|
$instance=$this->getModelInstance($ids); |
| 169 |
|
if (method_exists($instance, "__toString")) |
| 170 |
|
$instanceString=$instance . ""; |
| 171 |
|
else |
| 172 |
|
$instanceString=get_class($instance); |
| 173 |
|
if (sizeof($_POST) > 0) { |
| 174 |
|
try{ |
| 175 |
|
if (DAO::remove($instance)) { |
|
@@ 227-230 (lines=4) @@
|
| 224 |
|
$message=$this->_getEvents()->onErrorUpdateMessage($message); |
| 225 |
|
} |
| 226 |
|
}catch(\Exception $e){ |
| 227 |
|
if (method_exists($instance, "__toString")) |
| 228 |
|
$instanceString=$instance . ""; |
| 229 |
|
else |
| 230 |
|
$instanceString=get_class($instance); |
| 231 |
|
$message=new CRUDMessage("Exception : can not update `" . $instanceString . "`","Exception", "warning", "warning"); |
| 232 |
|
$message=$this->_getEvents()->onErrorUpdateMessage($message); |
| 233 |
|
} |