From: Bharat M. <bh...@us...> - 2005-01-18 06:16:14
|
Update of /cvsroot/gallery/gallery2/modules/core/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4545/modules/core/classes Modified Files: GalleryUrlGenerator.class Log Message: We now load a factory implementation of the GalleryUrlGenerator if one is available, else we use the base class from the core module. Changed the API of GalleryUrlGenerator so that the constructor is empty and there's a new init() method that takes all the old parameters. This makes it possible to create a url generator via the factory. Index: GalleryUrlGenerator.class =================================================================== RCS file: /cvsroot/gallery/gallery2/modules/core/classes/GalleryUrlGenerator.class,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- GalleryUrlGenerator.class 10 Jan 2005 08:06:12 -0000 1.52 +++ GalleryUrlGenerator.class 18 Jan 2005 06:16:02 -0000 1.53 @@ -84,14 +84,14 @@ */ /** - * Constructor + * Initializer. Configure the url generator with all the data it needs. * * @param string the base URL * @param string (optional) when embedded, relative path between G2 request urls and G2 basedir * @param string (optional) when embedded in CMS app that supports cookieless browsing, * key=value string for CMS session key and id */ - function GalleryUrlGenerator($baseFile, $relativeG2Path=null, $embedSessionString=null) { + function init($baseFile, $relativeG2Path=null, $embedSessionString=null) { $this->_baseFile = $baseFile; $this->_relativeG2Path = $relativeG2Path; $this->_embedSessionString = $embedSessionString; @@ -244,9 +244,6 @@ $path .= '/'; } - /* Convert %7E back into ~ so that it matches the URL */ - $path = str_replace('%7E', '~', $path); - return $path; } |