[pLog-svn] r611 - plog/trunk/class/net
ork at devel.plogworld.net
ork at devel.plogworld.net
Wed Dec 29 18:36:05 GMT 2004
Author: ork
Date: 2004-12-29 18:36:04 +0000 (Wed, 29 Dec 2004)
New Revision: 611
Modified:
plog/trunk/class/net/requestgenerator.class.php
Log:
added if ( !defined("xxx") ) block around each define( )
and some formatting ..
Modified: plog/trunk/class/net/requestgenerator.class.php
===================================================================
--- plog/trunk/class/net/requestgenerator.class.php 2004-12-29 18:34:31 UTC (rev 610)
+++ plog/trunk/class/net/requestgenerator.class.php 2004-12-29 18:36:04 UTC (rev 611)
@@ -5,46 +5,51 @@
*/
- include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
+ include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
- define( "CHECK_CONFIG_REQUEST_MODE", 0 );
- define( "NORMAL_REQUEST_MODE", 1 );
- define( "SEARCH_ENGINE_FRIENDLY_MODE", 2 );
- define( "MODREWRITE_MODE", 3 );
- define( "CUSTOM_REQUEST_MODE", 4 );
+ if ( !defined("CHECK_CONFIG_REQUEST_MODE") )
+ define( "CHECK_CONFIG_REQUEST_MODE", 0 );
+ if ( !defined("NORMAL_REQUEST_MODE") )
+ define( "NORMAL_REQUEST_MODE", 1 );
+ if ( !defined("SEARCH_ENGINE_FRIENDLY_MODE") )
+ define( "SEARCH_ENGINE_FRIENDLY_MODE", 2 );
+ if ( !defined("MODREWRITE_MODE") )
+ define( "MODREWRITE_MODE", 3 );
+ if ( !defined("CUSTOM_REQUEST_MODE") )
+ define( "CUSTOM_REQUEST_MODE", 4 );
- class RequestGenerator extends Object
- {
+ class RequestGenerator extends Object
+ {
- function getRequestGenerator( $blogInfo = null, $mode = CHECK_CONFIG_REQUEST_MODE )
- {
+ function getRequestGenerator( $blogInfo = null, $mode = CHECK_CONFIG_REQUEST_MODE )
+ {
// check the mode
- if( $mode == CHECK_CONFIG_REQUEST_MODE ) {
- $config =& Config::getConfig();
+ if( $mode == CHECK_CONFIG_REQUEST_MODE ) {
+ $config =& Config::getConfig();
$mode = $config->getValue( "request_format_mode" );
}
$this->_mode = $mode;
- // load the correct generator, while doing some nice dynamic loading...
+ // load the correct generator, while doing some nice dynamic loading...
if( $this->_mode == SEARCH_ENGINE_FRIENDLY_MODE ) {
- include_once( PLOG_CLASS_PATH."class/net/prettyrequestgenerator.class.php" );
- $rg = new PrettyRequestGenerator( $blogInfo );
+ include_once( PLOG_CLASS_PATH."class/net/prettyrequestgenerator.class.php" );
+ $rg = new PrettyRequestGenerator( $blogInfo );
}
elseif( $this->_mode == MODREWRITE_MODE ) {
- include_once( PLOG_CLASS_PATH."class/net/modrewriterequestgenerator.class.php" );
- $rg = new ModRewriteRequestGenerator( $blogInfo );
+ include_once( PLOG_CLASS_PATH."class/net/modrewriterequestgenerator.class.php" );
+ $rg = new ModRewriteRequestGenerator( $blogInfo );
}
elseif( $this->_mode == CUSTOM_REQUEST_MODE ) {
- include_once( PLOG_CLASS_PATH."class/net/customrequestgenerator.class.php" );
+ include_once( PLOG_CLASS_PATH."class/net/customrequestgenerator.class.php" );
$rg = new CustomRequestGenerator( $blogInfo );
}
else {
- include_once( PLOG_CLASS_PATH."class/net/rawrequestgenerator.class.php" );
+ include_once( PLOG_CLASS_PATH."class/net/rawrequestgenerator.class.php" );
$rg = new RawRequestGenerator( $blogInfo );
}
- return $rg;
- }
+ return $rg;
+ }
}
?>
More information about the pLog-svn
mailing list