[pLog-svn] r5826 - plog/branches/lifetype-1.2/class/gallery/dao
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Wed Aug 15 14:39:15 EDT 2007
Author: oscar
Date: 2007-08-15 14:39:15 -0400 (Wed, 15 Aug 2007)
New Revision: 5826
Modified:
plog/branches/lifetype-1.2/class/gallery/dao/galleryresourcestorage.class.php
Log:
Fixed issue http://bugs.lifetype.net/view.php?id=1366 -- files uploaded to the wrong destination when using the API from an external application, because we're using relative paths rather than absolute paths. The solution is to append PLOG_CLASS_PATH to the path if we're dealing with a relative path.
Modified: plog/branches/lifetype-1.2/class/gallery/dao/galleryresourcestorage.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/gallery/dao/galleryresourcestorage.class.php 2007-08-14 21:08:25 UTC (rev 5825)
+++ plog/branches/lifetype-1.2/class/gallery/dao/galleryresourcestorage.class.php 2007-08-15 18:39:15 UTC (rev 5826)
@@ -44,6 +44,9 @@
if( $resourcesStorageFolder[strlen($resourcesStorageFolder)-1] != '/')
$resourcesStorageFolder .= "/";
+ // if relative path, like e.g. "./gallery/"...
+ if (strpos($resourcesStorageFolder,'.') === 0)
+ $resourcesStorageFolder = rtrim( PLOG_CLASS_PATH ,'/').ltrim($resourcesStorageFolder,'.');
return $resourcesStorageFolder;
}
More information about the pLog-svn
mailing list