diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-11-10 00:25:59 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-10 00:25:59 +0000 |
commit | b5f2443bb53b802366d1f76c80beebef70129e3f (patch) | |
tree | 9bc38839d37cefd60f9906a065b5aef0e88ccda2 /core/controllers/item.php | |
parent | 49f3794894fb591afd1009a6ad0a6f31cc10d066 (diff) |
Add the ability to create albums to the scaffolding
Revert $_POST back to $this->input->post() because that supports default values.
Diffstat (limited to 'core/controllers/item.php')
-rw-r--r-- | core/controllers/item.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/controllers/item.php b/core/controllers/item.php index f047e810..38049380 100644 --- a/core/controllers/item.php +++ b/core/controllers/item.php @@ -67,13 +67,19 @@ class Item_Controller extends Controller { switch ($this->input->post("type")) { case "album": $new_item = album::create( - $item->id, $_POST["name"], $_POST["title"], $_POST["description"]); + $item->id, + $this->input->post("name"), + $this->input->post("title", $this->input->post("name")), + $this->input->post("description")); break; case "photo": $new_item = photo::create( - $item->id, $_FILES["file"]["tmp_name"], $_FILES["file"]["name"], - $_POST["title"], $_POST["description"]); + $item->id, + $_FILES["file"]["tmp_name"], + $_FILES["file"]["name"], + $this->input->post("title", $this->input->post("name")), + $this->input->post("description")); break; } |