From a9eefe21fa4d5c13c63eff500a018a2ccb43ce69 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 18 Sep 2012 18:20:33 -0400 Subject: [PATCH] cc-4304: Add call to save after each file reassignment --- airtime_mvc/application/controllers/UserController.php | 1 + airtime_mvc/application/models/airtime/CcFiles.php | 1 + 2 files changed, 2 insertions(+) diff --git a/airtime_mvc/application/controllers/UserController.php b/airtime_mvc/application/controllers/UserController.php index cf9d58b02..b05b76d84 100644 --- a/airtime_mvc/application/controllers/UserController.php +++ b/airtime_mvc/application/controllers/UserController.php @@ -140,6 +140,7 @@ class UserController extends Zend_Controller_Action //$new_owner_id = $this->_getParam("new_owner"); //$new_owner = new Application_Model_User($new_owner_id); $user->donateFilesTo( $new_owner ); + Logging::info("Reassign to user {$new_owner->getDbId()}"); } # Finally delete the user $this->view->entries = $user->delete(); diff --git a/airtime_mvc/application/models/airtime/CcFiles.php b/airtime_mvc/application/models/airtime/CcFiles.php index 0e17aef74..e7dd34a22 100644 --- a/airtime_mvc/application/models/airtime/CcFiles.php +++ b/airtime_mvc/application/models/airtime/CcFiles.php @@ -42,6 +42,7 @@ class CcFiles extends BaseCcFiles { public function reassignTo($user) { $this->setDbOwnerId( $user->getDbId() ); + $this->save(); } } // CcFiles