diff options
Diffstat (limited to 'core/controllers/rest.php')
-rw-r--r-- | core/controllers/rest.php | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/core/controllers/rest.php b/core/controllers/rest.php index c7429f5d..c10bbcdb 100644 --- a/core/controllers/rest.php +++ b/core/controllers/rest.php @@ -81,22 +81,14 @@ abstract class REST_Controller extends Controller { return $this->_index(); } - // @todo this needs security checks - $id = $function; - $resource = ORM::factory($this->resource_type, $id); + $resource = ORM::factory($this->resource_type, $function); if (!$resource->loaded && $request_method != "post") { return Kohana::show_404(); } switch ($request_method) { case "get": - $this->_show($resource); - - if (Session::instance()->get("use_profiler", false)) { - $profiler = new Profiler(); - $profiler->render(); - } - return; + return $this->_show($resource); case "put": return $this->_update($resource); |