[pLog-svn] r3981 - plog/branches/lifetype-1.1.1/class/net

oscar at devel.lifetype.net oscar at devel.lifetype.net
Sun Sep 17 21:18:24 GMT 2006


Author: oscar
Date: 2006-09-17 21:18:24 +0000 (Sun, 17 Sep 2006)
New Revision: 3981

Modified:
   plog/branches/lifetype-1.1.1/class/net/prettyrequestgenerator.class.php
Log:
Working fix for the problem reported by Elena when using subdomains and custom URLs. The format of paged URLs when using subdomains is now http://whatever.host.com/blog/X/page/Y, which is kind of ugly but it works. Subdomains were not ever meant to be used with this kind of URLs anyway...

Modified: plog/branches/lifetype-1.1.1/class/net/prettyrequestgenerator.class.php
===================================================================
--- plog/branches/lifetype-1.1.1/class/net/prettyrequestgenerator.class.php	2006-09-17 20:51:57 UTC (rev 3980)
+++ plog/branches/lifetype-1.1.1/class/net/prettyrequestgenerator.class.php	2006-09-17 21:18:24 UTC (rev 3981)
@@ -150,11 +150,11 @@
          *
          * @return Returns the url where the blog is running.
          */
-        function blogLink( $blogInfo = null )
+        function blogLink( $blogInfo = null, $ignoreSubdomainSettings = true )
         {
           $config =& Config::getConfig();          
           // if subdomains are enabled, there is no need to do much more here... 
-          if( $config->getValue( "subdomains_enabled" )) {
+          if( $config->getValue( "subdomains_enabled" ) && !$ignoreSubdomainSettings ) {
             $link = $this->getBaseUrl();
           }
           else {
@@ -382,12 +382,10 @@
 			}
 			else {
 				// if none of the above, we should at least get a link to the blog!
-				$url = $this->blogLink();
+				$url = $this->blogLink( null, true );
 			}		
 			
-			$pageFormat = "/page/";
-			
-			return( $url.$pageFormat );
+			return( $url."/page/" );
 		}
 		
 		/**



More information about the pLog-svn mailing list