[geeklog-cvs] Geeklog-2/public_html index.php,1.2,1.3

tony at iowaoutdoors.org tony at iowaoutdoors.org
Thu Mar 3 00:11:11 EST 2005


Update of /var/cvs/Geeklog-2/public_html
In directory www:/tmp/cvs-serv5418/public_html

Modified Files:
	index.php 
Log Message:
Added plugin support

Index: index.php
===================================================================
RCS file: /var/cvs/Geeklog-2/public_html/index.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** index.php	20 Dec 2004 22:16:34 -0000	1.2
--- index.php	3 Mar 2005 05:11:09 -0000	1.3
***************
*** 8,12 ****
   *
   */
! 
  /**
   * Bring in the Geeklog 2 configuration file
--- 8,12 ----
   *
   */
!  
  /**
   * Bring in the Geeklog 2 configuration file
***************
*** 17,21 ****
   * Bring in the MVC controller 
   */
! require_once 'MVCnPHP/Controller.php';
  
  /**
--- 17,21 ----
   * Bring in the MVC controller 
   */
! require_once 'Geeklog/MVCnPHP/Controller.php';
  
  /**
***************
*** 30,44 ****
  session_start();
  
! // Load the MVC configuration
! $configData = $glConf['path'] . 'mvcconfig.xml';
! 
! // Instanstiate the controller
! $controller = new MVCnPHP_Controller($configData, MVC_XML);
! $controller->setBaseURL($glConf['site_url']);
! $controller->setViewDir($glConf['path_views']);
! $controller->setCommandDir($glConf['path_commands']);
! 
! // Process the request
! $controller->processRequest();
  
  ?>
\ No newline at end of file
--- 30,52 ----
  session_start();
  
! if (isset($_SERVER['ORIG_PATH_INFO'])) {
!     // In this case we got a request for a plugin
!     $urlArgs = explode ('/', $_SERVER['ORIG_PATH_INFO']);
!     array_shift($urlArgs);
!     $pluginName = $urlArgs[0];
!     require_once $glConf['path_plugins'] . $pluginName .'/' .$pluginName . '.php';
!     $pluginName  = $pluginName . 'Plugin';
!     $pluginObj = new $pluginName();
!     $pluginObj->processRequest($urlArgs);
! } else {
!     // In this case a direct request to the kernel was made
!     $configData = $glConf['path'] . 'mvcconfig.xml';
!     $controller = new MVCnPHP_Controller($configData, MVC_XML);
!     $controller->setBaseURL($glConf['site_url']);
!     $controller->setViewDir($glConf['path_views']);
!     $controller->setCommandDir($glConf['path_commands']);
!     // Process the request
!     $controller->processRequest();
! }
  
  ?>
\ No newline at end of file




More information about the geeklog-cvs mailing list