diff options
author | Jozef Selesi <jozefs@users.sourceforge.net> | 2008-11-18 23:40:47 +0000 |
---|---|---|
committer | Jozef Selesi <jozefs@users.sourceforge.net> | 2008-11-18 23:40:47 +0000 |
commit | 1992343c2e1f2df892f39f971ae629edc59c33d0 (patch) | |
tree | 4d0e6365789905cf702324bc77b104a8eeaecb39 /modules/user/controllers | |
parent | 4bf486955cea9e2b67531f044c6bf34a7bc9324f (diff) |
* Changed REST API. Now there are two separate methods for forms:
GET /form/edit/{controller}/{resource_id} -> controller::_form_edit($resource)
GET /form/add/{controller}/{parameters} -> controller::_form_add($parameters)
* Updated comment, user and core modules to reflect the API changes
* Cleaned up routing and handling of requests to /{controller}
Diffstat (limited to 'modules/user/controllers')
-rw-r--r-- | modules/user/controllers/users.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/modules/user/controllers/users.php b/modules/user/controllers/users.php index d381d399..871af942 100644 --- a/modules/user/controllers/users.php +++ b/modules/user/controllers/users.php @@ -71,12 +71,15 @@ class Users_Controller extends REST_Controller { * Present a form for editing a user * @see Rest_Controller::form($resource) */ - public function _form($user, $form_type) { - if ($form_type == "edit") { - $form = user::get_edit_form($user); - print $form; - } else { - return Kohana::show_404(); - } + public function _form_edit($user) { + print user::get_edit_form($user); + } + + /** + * Present a form for adding a user + * @see Rest_Controller::form($resource) + */ + public function _form_add($parameters) { + throw new Exception("@todo User_Controller::_form_add NOT IMPLEMENTED"); } } |