[pLog-svn] r1460 - plog/trunk/class/net

oscar at devel.plogworld.net oscar at devel.plogworld.net
Sun Mar 13 11:37:25 GMT 2005


Author: oscar
Date: 2005-03-13 11:37:25 +0000 (Sun, 13 Mar 2005)
New Revision: 1460

Modified:
   plog/trunk/class/net/customurlhandler.class.php
   plog/trunk/class/net/linkparser.class.php
Log:
solved issue 334 (http://bugs.plogworld.net/view.php?id=334), where it was not possible to display images that
had spaces in their names but only when 'custom urls' where enabled. I also needed to urldecode() the incoming URI
before parsing it, since it seems that php was not doing that for us... I am not sure whether this will introduce
any incompatibility with non-western character sets!!


Modified: plog/trunk/class/net/customurlhandler.class.php
===================================================================
--- plog/trunk/class/net/customurlhandler.class.php	2005-03-13 08:52:28 UTC (rev 1459)
+++ plog/trunk/class/net/customurlhandler.class.php	2005-03-13 11:37:25 UTC (rev 1460)
@@ -57,7 +57,10 @@
 		
 		function process( $requestUri )
 		{
-			// first of all, guess which format we're using...
+			// decode the string, since it seems that php will not do it for us in this case...
+			$requestUri = urldecode( $requestUri);
+
+			// guess which format we're using...
 			$m = new LinkFormatMatcher( $requestUri, $this->_formats );
 			$this->_format = $m->identify();
 			$this->_params = $m->getParameters();

Modified: plog/trunk/class/net/linkparser.class.php
===================================================================
--- plog/trunk/class/net/linkparser.class.php	2005-03-13 08:52:28 UTC (rev 1459)
+++ plog/trunk/class/net/linkparser.class.php	2005-03-13 11:37:25 UTC (rev 1460)
@@ -29,9 +29,9 @@
                 '{userid}' => '([0-9]+)?',
                 '{templatename}' => '([_0-9a-zA-Z-]+)?',
                 '{resourceid}' => '([0-9]+)?',
-                '{resourcename}' => '([_0-9a-zA-Z-.]+)?',
+                '{resourcename}' => '([_0-9a-zA-Z-. ]+)?',
                 '{albumid}' => '([0-9]+)?',
-                '{albumname}' => '([_0-9a-zA-Z-]+)?'
+                '{albumname}' => '([_0-9a-zA-Z- ]+)?'
             );
 
     class LinkParser extends Object




More information about the pLog-svn mailing list