diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-15 12:15:20 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-15 12:15:20 -0800 |
commit | 50e3cc5837df7b0ae8e2d43a3dacee7500ba6db8 (patch) | |
tree | 95697207ad22851d0b1daef946e8869d5679c590 /modules/rest/helpers | |
parent | 5809949ae8ff87cd5acf56c528e6dc2af6619513 (diff) |
Move model business logic out of album::create() and into
Item_Model::save(). This makes creating albums similar to editing
them and makes it difficult to create an album poorly. I expect to be
able to remove a lot of code from the photo and movie helper because
it's duplicated here.
In order to do this, I refactored ORM_MPTT::add_to_parent() into
ORM_MPTT::save() so we now add it to the parent when we do save. This
allows us to call save() only once which saves a database call per
add.
The Albums_Controller logic is roughly the same as before.
Haven't updated the tests yet, they're going to fail miserably since
many of them depend on album::create() which is now gone.
Diffstat (limited to 'modules/rest/helpers')
0 files changed, 0 insertions, 0 deletions