Don't rawurlencode item/tag slugs - they're already URL-safe.
Fix two Exception --> Gallery_Exception.
Make Gallery_Exception extend Kohana_Extension instead of Exception.
This unifies the error views (which, among other things, makes REST errors
easier to handle).
Move "rest/reset_api_key" form to "rest_user/reset_access_key".
This action is part of the standard UI, not the REST API.
Also, change the name to match Rest::reset_access_key().
Setup Controller_Rest as an abstract class which is never called directly.
- change class declarations.
- move login from base class to Controller_Rest_Login (uses same URL as before).
- add init.php to route rest URLs (default controller is login).
- fire 405 Method Not Allowed for invalid actions.
Revise how the REST API handles exceptions.
- change error view to restful version in init.php.
- add Controller_Rest::execute() to convert any Exception to a Rest_Exception.
The way it handles ORM_Validation_Exception objects is just like before.
- change Rest_Exception to extend HTTP_Exception.
- revise error view.
Revise how Controller_Rest detects the method and sets the action.
Centralize rest key generation in Rest::access_key(), always use salt.
Before, it was defined independently in 4 places, 3 of which didn't use
Access::private_key() as a salt...
Fold Hook_RestEvent::_get_access_key_form() into user_edit_form_admin().
It's not used anywhere else.
Add Controller_Rest::check_auth() to get the access key and login the user.
Add some class comments to Controller_Rest (these will likely get longer later).
Add file upload processing to Controller_Rest::before().
Add entity and members processing to Controller_Rest::before().
Rename soon-to-be-deleted Controller_Rest::__call().
I'm keeping it now for reference, so rename to avoid confusion.
Refactor Rest_Exception (again).
- fix bugs.
- remove log entry from Rest_Exception - Kohana_Exception already does this.
- strip down Rest_Exception::factory() so it's only difference is storing
the message as an array if needed.
- move formatting of output array to error view.
Revise Rest_Exception calls to use new factory method.
Revise Rest_Exception calls in Rest_Controller::before()/execute().
Merge pull request #380 from shadlaws/fixes_20130603

Fixes 20130603