Skip to content
Snippets Groups Projects
Commit ce831ae3 authored by Tim Steiner's avatar Tim Steiner
Browse files

Updates for ZendFramework 0.2.0 compatibility

parent b45f1d59
No related branches found
Tags
No related merge requests found
Options FollowSymLinks Options FollowSymLinks
RewriteEngine On RewriteEngine On
RewriteRule ^tinymce - [L] RewriteRule ^tinymce - [L]
RewriteRule !(\.(js|ico|gif|jpg|png|css|oss|swf|mov)|index.php|phpinfo.php)$ index.php RewriteRule ^index.php - [L]
RewriteRule ^phpinfo.php - [L]
RewriteRule \.(js|ico|gif|jpg|png|css|oss|swf|mov)$ - [L]
RewriteRule (.*) index.php/$1 [L]
...@@ -8,7 +8,6 @@ set_include_path(get_include_path() . PATH_SEPARATOR . APPLICATION_PATH . '/mode ...@@ -8,7 +8,6 @@ set_include_path(get_include_path() . PATH_SEPARATOR . APPLICATION_PATH . '/mode
set_include_path(get_include_path() . PATH_SEPARATOR . APPLICATION_PATH . '/models/tables'); set_include_path(get_include_path() . PATH_SEPARATOR . APPLICATION_PATH . '/models/tables');
require_once('Zend.php'); require_once('Zend.php');
spl_autoload_register(array('Zend', 'loadClass')); spl_autoload_register(array('Zend', 'loadClass'));
//$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'], strlen(dirname($_SERVER['PHP_SELF'])));
//$appReg = Nmc_Registry_Application::getInstance(); //$appReg = Nmc_Registry_Application::getInstance();
$db_config = array('host' => $db_host, $db_config = array('host' => $db_host,
...@@ -21,7 +20,9 @@ Zend_Db_Table::setDefaultAdapter($db); ...@@ -21,7 +20,9 @@ Zend_Db_Table::setDefaultAdapter($db);
Zend::register('db', $db); Zend::register('db', $db);
$router = new Zend_Controller_RewriteRouter(); $router = new Zend_Controller_RewriteRouter();
$router->addRoute('compat_params', ':controller/:action/:0/:1/:2/:3/:4/:5/:6/:7/:8/:9/:10/:11/:12'); $default_route = new Zend_Controller_Router_Route(':controller/:action/:0/:1/:2/:3/:4/:5/:6/:7/:8/:9',
array(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL));
$router->addRoute('compat_params', $default_route);
$controller = Zend_Controller_Front::getInstance(); $controller = Zend_Controller_Front::getInstance();
$controller->setRouter($router); $controller->setRouter($router);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment