From b7fc23ef3de0bc294c97d4a4ee1f6b1272840d30 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 3 Jun 2013 15:44:29 +0000 Subject: [PATCH] fix for fast cgi --- lam/templates/3rdParty/pla/lib/common.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lam/templates/3rdParty/pla/lib/common.php b/lam/templates/3rdParty/pla/lib/common.php index d0330051..f6ae62e0 100644 --- a/lam/templates/3rdParty/pla/lib/common.php +++ b/lam/templates/3rdParty/pla/lib/common.php @@ -40,18 +40,19 @@ $app['direct_scripts'] = array('cmd.php','index.php', # Which script was invoked. $app['script_running'] = $_SERVER['SCRIPT_NAME']; +$app['script_request_uri'] = $_SERVER['REQUEST_URI']; foreach ($app['direct_scripts'] as $script) { $app['scriptOK'] = false; - if (preg_match('/'.$script.'$/',$app['script_running'])) { + if (preg_match('/'.$script.'$/',$app['script_running']) || preg_match('/[^\\?]*'.$script.'/',$app['script_request_uri'])) { $app['scriptOK'] = true; break; } } # Anything in the tools dir or cron dir can be executed directly. -if ((! $app['scriptOK'] && preg_match('/^\/[cron|tools]/',$app['script_running'])) || ! isset($_SERVER['SERVER_SOFTWARE'])) +if ((! $app['scriptOK'] && (preg_match('/^\/[cron|tools]/',$app['script_running']) || preg_match('/^\/[cron|tools]/',$app['script_request_uri']))) || ! isset($_SERVER['SERVER_SOFTWARE'])) $app['scriptOK'] = true; if (! $app['scriptOK']) {