From b08373919bb236e3516943321991d83b5746fb0d Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 2 Jan 2009 04:01:25 +0000 Subject: trim() the path in add_photos --- core/controllers/welcome.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core/controllers/welcome.php') 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); -- cgit v1.2.3