mirror of
https://github.com/mrclay/minify.git
synced 2025-08-19 20:31:27 +02:00
Groups.php: + workaround for PATH_INFO on Apache w/ mod_fcgid
This commit is contained in:
@@ -45,16 +45,18 @@ class Minify_Controller_Groups extends Minify_Controller_Base {
|
|||||||
// strip controller options
|
// strip controller options
|
||||||
$groups = $options['groups'];
|
$groups = $options['groups'];
|
||||||
unset($options['groups']);
|
unset($options['groups']);
|
||||||
|
|
||||||
if (! isset($_SERVER['PATH_INFO'])) {
|
// mod_fcgid places PATH_INFO in ORIG_PATH_INFO
|
||||||
// no PATH_INFO
|
$pi = isset($_SERVER['ORIG_PATH_INFO'])
|
||||||
return $options;
|
? substr($_SERVER['ORIG_PATH_INFO'], 1)
|
||||||
}
|
: (isset($_SERVER['PATH_INFO'])
|
||||||
$pi = substr($_SERVER['PATH_INFO'], 1);
|
? substr($_SERVER['PATH_INFO'], 1)
|
||||||
if (! isset($groups[$pi])) {
|
: false
|
||||||
// not a valid group
|
);
|
||||||
return $options;
|
if (false === $pi || ! isset($groups[$pi])) {
|
||||||
}
|
// no PATH_INFO or not a valid group
|
||||||
|
return $options;
|
||||||
|
}
|
||||||
$sources = array();
|
$sources = array();
|
||||||
foreach ((array)$groups[$pi] as $file) {
|
foreach ((array)$groups[$pi] as $file) {
|
||||||
if ($file instanceof Minify_Source) {
|
if ($file instanceof Minify_Source) {
|
||||||
|
|||||||
Reference in New Issue
Block a user