1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-20 04:41:29 +02:00

Groups.php: + workaround for PATH_INFO on Apache w/ mod_fcgid

This commit is contained in:
Steve Clay
2008-08-23 02:21:55 +00:00
parent 731ed09fd1
commit 5b1b3381db

View File

@@ -46,13 +46,15 @@ class Minify_Controller_Groups extends Minify_Controller_Base {
$groups = $options['groups'];
unset($options['groups']);
if (! isset($_SERVER['PATH_INFO'])) {
// no PATH_INFO
return $options;
}
$pi = substr($_SERVER['PATH_INFO'], 1);
if (! isset($groups[$pi])) {
// not a valid group
// mod_fcgid places PATH_INFO in ORIG_PATH_INFO
$pi = isset($_SERVER['ORIG_PATH_INFO'])
? substr($_SERVER['ORIG_PATH_INFO'], 1)
: (isset($_SERVER['PATH_INFO'])
? substr($_SERVER['PATH_INFO'], 1)
: false
);
if (false === $pi || ! isset($groups[$pi])) {
// no PATH_INFO or not a valid group
return $options;
}
$sources = array();