[pLog-svn] r6132 - plog/branches/lifetype-1.2

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Wed Dec 26 15:33:00 EST 2007


Author: jondaley
Date: 2007-12-26 15:33:00 -0500 (Wed, 26 Dec 2007)
New Revision: 6132

Added:
   plog/branches/lifetype-1.2/content
Log:
a convenience file for people who blindly remove /blog/{blogname} from their URLs, part of the fix for 1437

Copied: plog/branches/lifetype-1.2/content (from rev 6129, plog/branches/lifetype-1.2/static)
===================================================================
--- plog/branches/lifetype-1.2/content	                        (rev 0)
+++ plog/branches/lifetype-1.2/content	2007-12-26 20:33:00 UTC (rev 6132)
@@ -0,0 +1,27 @@
+<?php
+    if (!defined( "PLOG_CLASS_PATH" )) {
+        define( "PLOG_CLASS_PATH", dirname(__FILE__)."/");
+    }
+
+	include_once( PLOG_CLASS_PATH."class/bootstrap.php" );
+    lt_include( PLOG_CLASS_PATH."class/net/http/httpvars.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/net/prettyrequestparser.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/net/requestgenerator.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
+
+    // get the configuration data
+    $config =& Config::getConfig();
+    
+    // in order to maintain compatilibity with previous version, and the alternative
+    // format of search-engine friendly urls
+    if( $config->getValue( "request_format_mode" ) == SEARCH_ENGINE_FRIENDLY_MODE ) {	
+		$server = HttpVars::getServer();
+		$parser = new PrettyRequestParser( "static", $server["PATH_INFO"]);
+		$result = $parser->parse();
+		HttpVars::setRequest( $result );
+		lt_include( "index.php" );
+	}
+	else {
+		lt_include( PLOG_CLASS_PATH."blog.php" );
+	}
+?>



More information about the pLog-svn mailing list