From 7bb4b6029df8b17ef8a2ba9c8ce8d6c7b3e015c3 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 3 Dec 2008 22:39:57 +0000 Subject: Add a MY_file class that extends the file helper by creating an unlink method that deletes a file or an album directory. Modify Items_Controller::_delete to call this new helper method when deleting an item --- core/helpers/MY_file.php | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 core/helpers/MY_file.php (limited to 'core/helpers') diff --git a/core/helpers/MY_file.php b/core/helpers/MY_file.php new file mode 100644 index 00000000..89e81204 --- /dev/null +++ b/core/helpers/MY_file.php @@ -0,0 +1,43 @@ +isDot()) { + unset($resource); + continue; + } else if ($resource->isFile()) { + self::unlink($resource->getPathName()); + } else if ($resource->isDir()) { + self::unlink($resource->getRealPath()); + } + unset($resource); + } + return @rmdir($path); + } + return false; + } + + +} -- cgit v1.2.3