| Age | Commit message (Collapse) | Author |
|
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
|
|
|
|
writes and saves later.
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
|
|
shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features.
|
|
Conflicts:
modules/gallery/controllers/albums.php
|
|
nulls. This time around, do a query to determine whether or not the
sort column has nulls in it. If it doesn't, then use our comparators
as before.
There are NULLs in the sort column, so we can't use MySQL comparators.
Fall back to iterating over every child row to get to the current one.
This can be wildly inefficient for really large albums, but it should
be a rare case that the user is sorting an album with null values in
the sort column.
Fixes #627
|
|
row has a null value in the sort field. Fix for #627
Note: this changes get_position() to take an Item_Model instead of an id!
|
|
relative_url_cache so that they're safe for browser use.
|
|
urlencoded data for ease of use when we're dealing with the data.
This fixes ticket #569 by not allowing the urls that we put into our
RSS feeds to have bad characters in them.
We have to convert a path like var/albums/foo/"quotes"/bar.jpg into
something like var/albums/foo/%22quotes%22/bar.jpg. If we take the
approach of storing native data in the cache, then we have to explode
the path, urlencode the bits, and implode it again to avoid escaping
the / char. By storing it escaped, we avoid this problem. I believe
(but have not tested) that this is more efficient.
|
|
|
|
we're not relying on overriding url::site() to do tricks around item
urls. This means that you won't get item urls by doing
url::site("albums/37"), for example, but it also means that we won't
get pretty urls where we don't expect them (like in the action of a
<form> element).
Incidentally, this will help us move over to using the slug format
because if you've got a bad character in a url, the edit forms will
now work on it since they'll be id based.
|
|
insignificant, in addition to the view_count field. This means that
we won't trigger an event, nor will we adjust the updated field if
*only* those fields are changed.
|
|
2. Fix up an issue where we were crashing if there were no conflicting rows
3. Amend Item_Model so that if you change the slug, it flushes the cache
for all children
|
|
methods actually refer to the url to the file on disk, not the logical
item. That's relative_url(). Perhaps some API renaming is in order?
|