File tree Expand file tree Collapse file tree 4 files changed +10
-12
lines changed Expand file tree Collapse file tree 4 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ Do not use 20.x.x if you need IE support.
116
116
- removed module ` Mage_PageCache ` [ #2258 ] ( https://github.com/OpenMage/magento-lts/pull/2258 )
117
117
- removed lib/flex containing unused ActionScript "file uploader" files [ #2271 ] ( https://github.com/OpenMage/magento-lts/pull/2271 )
118
118
- enabled website level config cache [ #2355 ] ( https://github.com/OpenMage/magento-lts/pull/2355 )
119
+ - make overrides of Mage_Core_Model_Resource_Db_Abstract::delete respect parent api [ #1257 ] ( https://github.com/OpenMage/magento-lts/pull/1257 )
119
120
120
121
For full list of changes, you can [ compare tags] ( https://github.com/OpenMage/magento-lts/compare/1.9.4.x...20.0 ) .
121
122
Original file line number Diff line number Diff line change @@ -189,7 +189,8 @@ protected function _afterLoad(Mage_Core_Model_Abstract $user)
189
189
* Delete user role record with user
190
190
*
191
191
* @param Mage_Core_Model_Abstract $user
192
- * @return bool
192
+ * @return $this
193
+ * @throws Exception
193
194
*/
194
195
public function delete (Mage_Core_Model_Abstract $ user )
195
196
{
@@ -206,15 +207,12 @@ public function delete(Mage_Core_Model_Abstract $user)
206
207
$ adapter ->delete ($ this ->getMainTable (), $ conditions );
207
208
$ adapter ->delete ($ this ->getTable ('admin/role ' ), $ conditions );
208
209
$ adapter ->commit ();
209
- } catch (Mage_Core_Exception $ e ) {
210
+ } catch (Throwable $ e ) {
210
211
$ adapter ->rollBack ();
211
212
throw $ e ;
212
- } catch (Exception $ e ) {
213
- $ adapter ->rollBack ();
214
- return false ;
215
213
}
216
214
$ this ->_afterDelete ($ user );
217
- return true ;
215
+ return $ this ;
218
216
}
219
217
220
218
/**
Original file line number Diff line number Diff line change @@ -230,7 +230,8 @@ protected function _beforeSave(Mage_Core_Model_Abstract $user)
230
230
* Delete the object
231
231
*
232
232
* @param Mage_Core_Model_Abstract $user
233
- * @return boolean
233
+ * @return $this
234
+ * @throws Exception
234
235
*/
235
236
public function delete (Mage_Core_Model_Abstract $ user )
236
237
{
@@ -241,14 +242,11 @@ public function delete(Mage_Core_Model_Abstract $user)
241
242
$ dbh ->delete ($ this ->getTable ('api/user ' ), ['user_id = ? ' => $ uid ]);
242
243
$ dbh ->delete ($ this ->getTable ('api/role ' ), ['user_id = ? ' => $ uid ]);
243
244
$ dbh ->commit ();
244
- } catch (Mage_Core_Exception $ e ) {
245
+ } catch (Throwable $ e ) {
245
246
$ dbh ->rollBack ();
246
247
throw $ e ;
247
- } catch (Exception $ e ) {
248
- $ dbh ->rollBack ();
249
- return false ;
250
248
}
251
- return true ;
249
+ return $ this ;
252
250
}
253
251
254
252
/**
Original file line number Diff line number Diff line change @@ -509,6 +509,7 @@ public function forsedSave(Mage_Core_Model_Abstract $object)
509
509
*
510
510
* @param Mage_Core_Model_Abstract $object
511
511
* @return $this
512
+ * @throws Exception
512
513
*/
513
514
public function delete (Mage_Core_Model_Abstract $ object )
514
515
{
You can’t perform that action at this time.
0 commit comments