diff options
Diffstat (limited to 'core/controllers')
-rw-r--r-- | core/controllers/albums.php (renamed from core/controllers/album.php) | 2 | ||||
-rw-r--r-- | core/controllers/items.php (renamed from core/controllers/item.php) | 8 | ||||
-rw-r--r-- | core/controllers/photos.php (renamed from core/controllers/photo.php) | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/core/controllers/album.php b/core/controllers/albums.php index 82652d88..ead738d9 100644 --- a/core/controllers/album.php +++ b/core/controllers/albums.php @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class Album_Controller extends Item_Controller { +class Albums_Controller extends Items_Controller { /** * @see Rest_Controller::_show($resource, $output_format) diff --git a/core/controllers/item.php b/core/controllers/items.php index f5c5f9c9..6c202b30 100644 --- a/core/controllers/item.php +++ b/core/controllers/items.php @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class Item_Controller extends REST_Controller { +class Items_Controller extends REST_Controller { protected $resource_type = "item"; /** @@ -45,7 +45,7 @@ class Item_Controller extends REST_Controller { // Redirect to the more specific resource type, since it will render // differently. We could also just delegate here, but it feels more appropriate // to have a single canonical resource mapping. - return url::redirect("{$item->type}/$item->id"); + return url::redirect("{$item->type}s}/$item->id"); } public function _update($item) { @@ -90,7 +90,7 @@ class Item_Controller extends REST_Controller { $this->input->post("title", $this->input->post("name")), $this->input->post("description"), $owner_id); - url::redirect("{$new_item->type}/{$new_item->id}"); + url::redirect("{$new_item->type}s/{$new_item->id}"); } break; } @@ -103,7 +103,7 @@ class Item_Controller extends REST_Controller { if ($parent->id) { $item->delete(); } - url::redirect("{$parent->type}/{$parent->id}"); + url::redirect("{$parent->type}s/{$parent->id}"); } public function _create($item) { diff --git a/core/controllers/photo.php b/core/controllers/photos.php index d6d37f98..a5b75b79 100644 --- a/core/controllers/photo.php +++ b/core/controllers/photos.php @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class Photo_Controller extends Item_Controller { +class Photos_Controller extends Items_Controller { /** * @see Rest_Controller::_show($resource, $output_format) |