| Age | Commit message (Collapse) | Author |
|
not capturing all cases for setting and resetting $original, which
leads to some weird and hard to reproduce behavior.
Instead, if we need the original just reload it from the database.
This may result in a somewhat excessive load in places, but we'll have
to fix that in a later optimization pass.
|
|
before deciding whether or not we changed a value.
Change valid_name to be cascading, not parallel.
|
|
before validate() is called, which is important with our two phase web
controllers.
Make valid_parent smarter about moving existing items, vs new items.
|
|
|
|
Move move_to() inside save()
|
|
parent::save(). This is consistent with other changes because all
filesystem operations happen after the database change is committed.
Also, inline rename() since it's fairly simple now.
|
|
|
|
|
|
|
|
sophisticated but keep all our rules in one place.
Add rules for most fields.
|
|
|
|
|
|
logic from movie::create() into Item_Model
|
|
Fix a bug where we were not calling valid_data_file correctly.
|
|
approach.
- Rearrange Simple_Uploader_Controller::add_photo() to validate
the form early in the process, and switch to using model based
validation.
- Move thumbnail generation into gallery_event::item_created() so
that it's decoupled from the model.
- Delete photo::create() and move all of its logic into
Item_Model::save().
- Add Item_Model::$data_file to track the data file associated
with new movies and photos.
- Do some cleanup on the validation callbacks -- it turns out the
2nd argument is the field name not the value.
|
|
Conflicts:
modules/gallery/models/item.php
|
|
parent::save() it'll be reset. Clone it first.
This is an alternate fix for #978.
|
|
|
|
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.
|
|
business logic.
|
|
equivalent, but it's more intuitive this way.
|
|
now only Albums_Controller::update() supports the pattern. All
form and controller based validation happening when editing an
album has been moved over.
Model based validation means that our REST controllers share the
same validation as web controllers. We'll have consistency
enforced at the model level, which is a Good Thing.
The basic pattern is now:
1) Rules are in the model
2) ORM::validate() (which is called by ORM::save() but you can
call it directly, too) checks the model for all the rules and
throws an ORM_Validation_Exception if there are failures
3) Actions are no longer taken when you call Item_Model::__set().
Instead, they're all queued up and executed when you call
Item_Model::save().
Notes:
- item::validate_xxx() functions are now in Item_Model::
- We still call $form->validate() because the form can have
rules (and forms triggered by events will likely continue to
have rules.
|
|
|
|
"=", NULL) which would never find any. It should have been ->where(, "is", NULL)
|
|
|
|
Fixes ticket #916.
|
|
new K24 ORM).
Fix up a bad where tuple in the test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
where clauses and adds them to the existing query. Update all
existing queries that take an additional where clause to use it.
|
|
Convert all open_paren() calls to and_open() or or_open() as appropriate.
|
|
internal rules code.
|
|
|
|
- Kohana::log() -> Kohana_Log::add()
- Kohana::config_XXX -> Kohana_Config::instance()->XXX
- Implement View::set_global in MY_View
- Updated Cache_Database_Driver to latest APIs
- ORM::$loaded -> ORM::loaded()
- Updated item::viewable() to use K2.4 parenthesization
|
|
orders.
|
|
Was also able to remove the sub-select from the calculation of the current position as we already have the child item containing the sort column value.
Also added a where clause that ignores albums to the get_position, children and children_count method calls in photos.php and movies.php
|
|
|
|
in Item_Model when creating the relative_path_cache.
|
|
to file paths and they are converted back in the file proxy. Fixes ticket #812
|
|
|
|
exist. fixes ticket #694
|
|
Create a helper class called identity to simplify call the Identity Provider. Move the contents of MY_Session.php to the new helper class and remove the MY_Session class
|
|
and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module.
|
|
user::lookup_by_name and user_lookup API methods.
Convert the Admin_User controller
Convert the login and password change controller
Change the item model to call user::lookup to get the owner.
On the log model, delete the relationship between the log and user table, and replace with a
call to user::lookup
(cherry picked from commit 194cc3b27a73afe5119da9f09407c1e068dc6fa3)
Create the get_user_list, lookup_by_name, lookup_by_hash and get_group_list api functions
|
|
Make the filename field required for photos/movies.
Fixes ticket #838
|
|
|