mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-10 09:19:18 -04:00
* 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}
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user