Fix bad argument

This commit is contained in:
Romain Neutron
2012-02-17 15:05:24 +01:00
parent 8d00fdd8d4
commit c562ab11a0

View File

@@ -951,13 +951,13 @@ class set_export extends set_abstract
if (is_file($file)) if (is_file($file))
{ {
$testPath = function(){ $testPath = function($file, $registry){
return strpos($file, $registry->get('GV_RootPath').'tmp/download/') !== false return strpos($file, $registry->get('GV_RootPath').'tmp/download/') !== false
|| strpos($file, $registry->get('GV_RootPath').'tmp/lazaret/') !== false || strpos($file, $registry->get('GV_RootPath').'tmp/lazaret/') !== false
|| strpos($file, $registry->get('GV_X_Accel_Redirect')) !== false; || strpos($file, $registry->get('GV_X_Accel_Redirect')) !== false;
}; };
if ($registry->get('GV_modxsendfile') && $testPath()) if ($registry->get('GV_modxsendfile') && $testPath($file, $registry))
{ {
$file_xaccel = str_replace( $file_xaccel = str_replace(
array( array(