diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-01-02 04:01:25 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-01-02 04:01:25 +0000 |
commit | b08373919bb236e3516943321991d83b5746fb0d (patch) | |
tree | d16c7512f0154a9209b5a723486a750ccd337193 | |
parent | ecdfd1590d4eaa300c7e3ee694e2de23c06364de (diff) |
trim() the path in add_photos
-rw-r--r-- | core/controllers/welcome.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php index b3a12952..1509c54e 100644 --- a/core/controllers/welcome.php +++ b/core/controllers/welcome.php @@ -191,7 +191,7 @@ class Welcome_Controller extends Template_Controller { } function add_photos() { - $path = $this->input->post("path"); + $path = trim($this->input->post("path")); $parent_id = (int)$this->input->post("parent_id"); $parent = ORM::factory("item", $parent_id); if (!$parent->loaded) { @@ -199,7 +199,6 @@ class Welcome_Controller extends Template_Controller { } cookie::set("add_photos_path", $path); - $photo_count = 0; foreach (glob("$path/*.[Jj][Pp][Gg]") as $file) { set_time_limit(30); |