Age | Commit message (Collapse) | Author |
|
|
|
|
|
consistency between field names than deal with underlying issues with
Forge bitching about the "name" property.
|
|
consistency between field names than deal with underlying issues with
Forge bitching about the "name" property.
|
|
|
|
does the rest. This function is symmetrical to rest::resolve.
|
|
Add slug to the post params.
Fix minor output bug.
|
|
permissions for it.
|
|
|
|
|
|
http://dev.kohanaphp.com/issues/2459 -- I don't exactly know why, but
the solutions are equivalent so I'm not going to dig too far.
|
|
longer typecasts values as of http://dev.kohanaphp.com/issues/2459
|
|
safe. Add tests to make sure that it doesn't relapse with future
Kohana changes. Fixes ticket #983.
Ref: http://gallery.menalto.com/node/93738
|
|
a required
parameter for the Gallery driver.
|
|
|
|
|
|
|
|
logic from movie::create() into Item_Model
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
alot of pain to some installations
|
|
In the graphics_rules table height and width set the maximum height and width
values and should be equal. Initially, the height on the resize target rule was
less than the height, which artificially constrained images in portrait mode.
**Note"" this fix requires an upgrade to version 22. All the resizes will be flagged
dirty.
|
|
|
|
clauses and deletes all the entries in the table unless an array of id's are
passed as the parameter. This fix used the Database_builder to specify any where
conditions. Thanks psvo for find the first one. :-)
|
|
choosing a random image is essentially a function on an item collection.
Also implemented a bunch of other query filters for item collections.
Created item::random_query() as a way of generating a reasonable
starting point for random queries.
|
|
|
|
|
|
children with a given name.
|
|
|
|
- Add support for retrieving a list of members from a collection
- Implement put(), post() and delete() for tags.
- Use tag_rest::delete() as a way to remove members from the tag collection
|
|
1) Deal in fully qualified URL resources through the rest
interface. All rest methods are now passed the complete url in
request->url.
2) Create rest::resolve() which lets individual resource definition
code convert a full url into the appropriate matching resource.
Implement gallery_rest::resolve() and tag_rest::resolve()
3) Reimplement tag_rest's get() and post() methods. They're much
simpler now.
4) Implement the tags_rest helper which supports working with the
entire tags collection.
|
|
approach depended on having an $item, which is not the case on all
pages (eg: tag pages). Also, check the CSRF in the logout controller,
else you can use the logout link as a blind forwarder.
|
|
1) Simplify gallery_rest to return flat models, no children and do no
validation for now.
2) Flatten the REST replies and use HTTP codes to indicate
success/failure instead of additional status messages.
3) Use the message and error code support in the base Exception class,
instead of brewing our own in Rest_Exception.
4) Get rid of rest::success() and rest::fail() -- we only need
rest::reply() since all failures are covered by throwing an
exception.
5) Get rid of /rest/access_key and just use /rest for authentication.
6) Inline and simplify rest::normalize_request since we only use it once
7) Change rest::set_active_user to succeed or throw an exception
8) Extract Rest_Exception::sendHeaders into rest::send_headers()
Here's what's currently broken:
1) Data validation. There currently is none
2) Logging. That's gone too
3) image block and tag code is broken
4) Tests are broken
5) No movie support
|
|
|
|
|
|
guess how to send the user back. Instead, proxy the originating item
id through the edit forms so that we can tell exactly what page we
were on when we began editing. If we were viewing the item, then
redirect to its new url (in case it changed) to fix ticket #745. But
if we were viewing some other item, then just stay on the current page
to fix #940.
The page_type approach didn't work because you'd have the same
"collection" page_type when doing a context menu edit for an album.
|
|
instead of calling rest::forbidden and other rest helper error messages.
|
|
Item_Model. Change the Duplicate errors to sentence case. And generally clean up the flow in _validate().
|
|
Kohana_404_Exception
2) Don't use the input path to lookup the item via relative_path_cache. Instead use url::get_item_from_uri method.
|
|
refactoring for check for commits
|
|
|
|
was returning an empty string. This fixes ticket #955.
|
|
converting the rest API to Kohana 2.4
|
|
|
|
Conflicts:
modules/gallery/controllers/albums.php
modules/gallery/controllers/movies.php
modules/gallery/controllers/photos.php
|