diff options
author | Nathan Kinkade <nkinkade@nkinka.de> | 2011-01-31 20:49:25 +0000 |
---|---|---|
committer | Nathan Kinkade <nkinkade@nkinka.de> | 2011-01-31 20:49:25 +0000 |
commit | de6f3fce9110b777d61dec97f2a3a61d887a5ccd (patch) | |
tree | 1a184dc0d6bbfd644164d85d3df1bc9926455da7 /modules/server_add/controllers/server_add.php | |
parent | 2898fe3b82ce10d045dd2c274a3290bacf209a00 (diff) | |
parent | d2c77fd0590501f7b6b51d9f4cc033ed9485b082 (diff) |
Did a git pull, but had to manually merge a conflict.
Diffstat (limited to 'modules/server_add/controllers/server_add.php')
-rw-r--r-- | modules/server_add/controllers/server_add.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/modules/server_add/controllers/server_add.php b/modules/server_add/controllers/server_add.php index 71688605..2afa93a7 100644 --- a/modules/server_add/controllers/server_add.php +++ b/modules/server_add/controllers/server_add.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access."); /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2010 Bharat Mediratta + * Copyright (C) 2000-2011 Bharat Mediratta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -95,7 +95,7 @@ class Server_Add_Controller extends Admin_Controller { if (server_add::is_valid_path($path)) { $entry = ORM::factory("server_add_entry"); $entry->path = $path; - $entry->is_directory = 1; + $entry->is_directory = intval(is_dir($path)); $entry->parent_id = null; $entry->task_id = $task->id; $entry->save(); @@ -162,14 +162,9 @@ class Server_Add_Controller extends Admin_Controller { ->find(); if ($entry->loaded()) { - // Ignore the staging directories as directories to be imported. - if (!empty($paths[$entry->path])) { - $entry->delete(); - } - $child_paths = glob(preg_quote($entry->path) . "/*"); if (!$child_paths) { - $child_paths = glob("$path/*"); + $child_paths = glob("{$entry->path}/*"); } foreach ($child_paths as $child_path) { if (!is_dir($child_path)) { |