[pLog-svn] r977 - plog/trunk

oscar at devel.plogworld.net oscar at devel.plogworld.net
Sun Feb 6 20:14:33 GMT 2005


Author: oscar
Date: 2005-02-06 20:14:32 +0000 (Sun, 06 Feb 2005)
New Revision: 977

Modified:
   plog/trunk/post
Log:
this should have probably been committed ages ago... no wonder nicer urls are not working!


Modified: plog/trunk/post
===================================================================
--- plog/trunk/post	2005-02-06 19:52:42 UTC (rev 976)
+++ plog/trunk/post	2005-02-06 20:14:32 UTC (rev 977)
@@ -5,14 +5,23 @@
 
     include_once( PLOG_CLASS_PATH."class/net/http/httpvars.class.php" );
     include_once( PLOG_CLASS_PATH."class/net/prettyrequestparser.class.php" );
+	include_once( PLOG_CLASS_PATH."class/net/requestgenerator.class.php" );
+	include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
 
-    $server = HttpVars::getServer();
-
-    $path_info = $server["PATH_INFO"];
-
-    $parser = new PrettyRequestParser( "post", $server["PATH_INFO"]);
-    $result = $parser->parse();
-    HttpVars::setRequest( $result );
-
-    include_once( "index.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();
+		$path_info = $server["PATH_INFO"];
+		$parser = new PrettyRequestParser( "post", $server["PATH_INFO"]);
+		$result = $parser->parse();
+		HttpVars::setRequest( $result );
+		include_once( "index.php" );
+	}
+	else {
+		include_once( PLOG_CLASS_PATH."blog.php" );
+	}
 ?>




More information about the pLog-svn mailing list