[pLog-svn] r6980 - plog/branches/lifetype-1.2/class/net
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Wed Feb 17 13:45:35 EST 2010
Author: jondaley
Date: 2010-02-17 13:45:35 -0500 (Wed, 17 Feb 2010)
New Revision: 6980
Modified:
plog/branches/lifetype-1.2/class/net/customrequestgenerator.class.php
Log:
remove double slashes in URLs for some cases.
Modified: plog/branches/lifetype-1.2/class/net/customrequestgenerator.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/net/customrequestgenerator.class.php 2010-02-10 23:02:19 UTC (rev 6979)
+++ plog/branches/lifetype-1.2/class/net/customrequestgenerator.class.php 2010-02-17 18:45:35 UTC (rev 6980)
@@ -469,8 +469,6 @@
}
elseif( $date > -1 ) {
$url = $this->getArchiveLink( $date );
- if( $url[strlen($url)-1] == "/" )
- $url = substr( $url, 0, -1);
}
else {
// if none of the above, we should at least get a link to the blog!
@@ -478,7 +476,10 @@
}
$pageFormat = $this->getPageSuffix();
-
+ // remove double slashes that can occur in certain combinations
+ // of base_url/blog_url/pager/etc.
+ if($pageFormat[0] == "/" && $url[strlen($url)-1] == "/")
+ return substr($url, 0, -1).$pageFormat;
return( $url.$pageFormat );
}
More information about the pLog-svn
mailing list