[pLog-svn] r6258 - plog/branches/lifetype-1.2/class/action/admin

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Fri Mar 21 15:28:28 EDT 2008


Author: jondaley
Date: 2008-03-21 15:28:28 -0400 (Fri, 21 Mar 2008)
New Revision: 6258

Modified:
   plog/branches/lifetype-1.2/class/action/admin/adminregeneratepreviewaction.class.php
Log:
ah, better function for getting the name, getFileName returns the 'real' name, not the non/encoded name

Modified: plog/branches/lifetype-1.2/class/action/admin/adminregeneratepreviewaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminregeneratepreviewaction.class.php	2008-03-21 19:20:04 UTC (rev 6257)
+++ plog/branches/lifetype-1.2/class/action/admin/adminregeneratepreviewaction.class.php	2008-03-21 19:28:28 UTC (rev 6258)
@@ -76,7 +76,8 @@
         lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
         $config =& Config::getConfig();
 
-
+        $storage = new GalleryResourceStorage();
+        
             // delete the small thumbnail
         $previewFile = GalleryResourceStorage::getPreviewsFolder($resource->getOwnerId()) .
             $resource->getPreviewFileName();
@@ -92,7 +93,7 @@
         $thumbWidth = ( $imgWidth > $previewWidth ? $previewWidth : $imgWidth );
 
         $result = GalleryThumbnailGenerator::generateResourceThumbnail(
-            GalleryResourceStorage::getUserFolder($resource->getOwnerId()).$resource->getFileName(),
+            $storage->getResourcePath($resource),
             $resource->getId(), $resource->getOwnerId(), $thumbHeight, $thumbWidth );
         if( !$result ) {
             $this->_view = new AdminEditResourceView( $this->_blogInfo );
@@ -115,7 +116,7 @@
         $thumbHeight = ( $imgHeight > $previewHeight ? $previewHeight : $imgHeight );
         $thumbWidth = ( $imgWidth > $previewWidth ? $previewWidth : $imgWidth );
         $result = GalleryThumbnailGenerator::generateResourceMediumSizeThumbnail(
-            GalleryResourceStorage::getUserFolder($resource->getOwnerId()).$resource->getFileName(),
+            $storage->getResourcePath($resource),
             $resource->getId(), $resource->getOwnerId(), $thumbHeight, $thumbWidth );
         
         if( !$result ) {



More information about the pLog-svn mailing list