[pLog-svn] r6458 - plog/trunk/class/gallery/dao

mark at devel.lifetype.net mark at devel.lifetype.net
Wed May 14 03:04:04 EDT 2008


Author: mark
Date: 2008-05-14 03:04:04 -0400 (Wed, 14 May 2008)
New Revision: 6458

Modified:
   plog/trunk/class/gallery/dao/galleryresourcestorage.class.php
Log:
Implement a removeOwnerFolder for PurgeData/

Modified: plog/trunk/class/gallery/dao/galleryresourcestorage.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryresourcestorage.class.php	2008-05-14 07:03:21 UTC (rev 6457)
+++ plog/trunk/class/gallery/dao/galleryresourcestorage.class.php	2008-05-14 07:04:04 UTC (rev 6458)
@@ -366,6 +366,23 @@
 
             return $result;
         }
+
+        /**
+         * removes a file from disk
+         *
+         * @param resource A GalleryResource object, representing the resource
+         * we'd like to delete.
+         * @return Returns ok if file was successfully deleted ok or false otherwise.
+         */
+        function removeOwnerFolder( $ownerId )
+        {
+            $ownerFolder = $this->getUserFolder( $ownerId );
+			if( File::isReadable( $ownerFolder)) {
+				$result = File::deleteDir( $ownerFolder, true );
+			} else {
+				$result = false;
+			}
+        }
 		
 		/**
 		 * returns the path of a GalleryResource object within the storage area



More information about the pLog-svn mailing list