equal
deleted
inserted
replaced
143 { |
143 { |
144 dc_here('dbal: oops, looks like Enano isn\'t set up. Constants ENANO_INSTALLED, MIDGET_INSTALLED, and IN_ENANO_INSTALL are all undefined.'); |
144 dc_here('dbal: oops, looks like Enano isn\'t set up. Constants ENANO_INSTALLED, MIDGET_INSTALLED, and IN_ENANO_INSTALL are all undefined.'); |
145 // scriptPath isn't set yet - we need to autodetect it to avoid infinite redirects |
145 // scriptPath isn't set yet - we need to autodetect it to avoid infinite redirects |
146 if ( !defined('scriptPath') ) |
146 if ( !defined('scriptPath') ) |
147 { |
147 { |
148 if ( isset($_SERVER['PATH_INFO']) ) |
148 if ( isset($_SERVER['PATH_INFO']) && !preg_match('/index\.php$/', $_SERVER['PATH_INFO']) ) |
149 { |
149 { |
150 $_SERVER['REQUEST_URI'] = preg_replace(';' . preg_quote($_SERVER['PATH_INFO']) . '$;', '', $_SERVER['REQUEST_URI']); |
150 $_SERVER['REQUEST_URI'] = preg_replace(';' . preg_quote($_SERVER['PATH_INFO']) . '$;', '', $_SERVER['REQUEST_URI']); |
151 } |
151 } |
152 $sp = dirname($_SERVER['REQUEST_URI']); |
152 $sp = dirname($_SERVER['REQUEST_URI']); |
153 if($sp == '/' || $sp == '\\') $sp = ''; |
153 if($sp == '/' || $sp == '\\') $sp = ''; |