diff --git a/gulliver/thirdparty/phing/Phing.php b/gulliver/thirdparty/phing/Phing.php index a9b689fbc..00e9dfb12 100644 --- a/gulliver/thirdparty/phing/Phing.php +++ b/gulliver/thirdparty/phing/Phing.php @@ -858,17 +858,7 @@ class Phing { } $firstPath = explode(":", implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts))); if (is_dir($firstPath[0])) { - $realdocuroot = str_replace( '\\', '/', $_SERVER['DOCUMENT_ROOT'] ); - $docuroot = explode( '/', $realdocuroot ); - array_pop( $docuroot ); - $pathhome = implode( '/', $docuroot ) . '/'; - array_pop( $docuroot ); - $pathTrunk = implode( '/', $docuroot ) . '/'; - require_once($pathTrunk.'gulliver/system/class.inputfilter.php'); - $filter = new InputFilter(); - $incPath = implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)); - $incPath = $filter->validateInput($incPath, 'path'); - ini_set('include_path', $incPath); + ini_set('include_path', implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts))); } } } diff --git a/gulliver/thirdparty/phing/lib/Capsule.php b/gulliver/thirdparty/phing/lib/Capsule.php index 43c2e070e..904ea5a02 100755 --- a/gulliver/thirdparty/phing/lib/Capsule.php +++ b/gulliver/thirdparty/phing/lib/Capsule.php @@ -118,15 +118,7 @@ class Capsule { // extract variables into local namespace extract($this->vars); - $realdocuroot = str_replace( '\\', '/', $_SERVER['DOCUMENT_ROOT'] ); - $docuroot = explode( '/', $realdocuroot ); - array_pop( $docuroot ); - $pathhome = implode( '/', $docuroot ) . '/'; - array_pop( $docuroot ); - $pathTrunk = implode( '/', $docuroot ) . '/'; - require_once($pathTrunk.'gulliver/system/class.inputfilter.php'); - $filter = new InputFilter(); - // prepend template path to include path, + // prepend template path to include path, // so that include "path/relative/to/templates"; can be used within templates $__old_inc_path = ini_get('include_path'); @@ -134,15 +126,11 @@ class Capsule { if(strpos($path,":")>0){ $firstPath = explode(":", $this->templatePath . PATH_SEPARATOR . $__old_inc_path); if (is_dir($firstPath[0])) { - $incPath = $this->templatePath . PATH_SEPARATOR . $__old_inc_path; - $incPath = $filter->validateInput($incPath, 'path'); - ini_set('include_path', $incPath); - } + ini_set('include_path', $this->templatePath . PATH_SEPARATOR . $__old_inc_path); + } } else { if(is_dir($this->templatePath . PATH_SEPARATOR . $__old_inc_path)) { - $incPath = $this->templatePath . PATH_SEPARATOR . $__old_inc_path; - $incPath = $filter->validateInput($incPath, 'path'); - ini_set('include_path', $incPath); + ini_set('include_path', $this->templatePath . PATH_SEPARATOR . $__old_inc_path); } } diff --git a/gulliver/thirdparty/phing/tasks/system/IncludePathTask.php b/gulliver/thirdparty/phing/tasks/system/IncludePathTask.php index 5f1758c3c..449b69902 100644 --- a/gulliver/thirdparty/phing/tasks/system/IncludePathTask.php +++ b/gulliver/thirdparty/phing/tasks/system/IncludePathTask.php @@ -105,21 +105,11 @@ class IncludePathTask extends TaskPhing { $curr_parts = explode(PATH_SEPARATOR, get_include_path()); $add_parts = explode(PATH_SEPARATOR, $this->classpath); $new_parts = array_diff($add_parts, $curr_parts); - - $realdocuroot = str_replace( '\\', '/', $_SERVER['DOCUMENT_ROOT'] ); - $docuroot = explode( '/', $realdocuroot ); - array_pop( $docuroot ); - $pathhome = implode( '/', $docuroot ) . '/'; - array_pop( $docuroot ); - $pathTrunk = implode( '/', $docuroot ) . '/'; - require_once($pathTrunk.'gulliver/system/class.inputfilter.php'); - $filter = new InputFilter(); + if ($new_parts) { $this->log("Prepending new include_path components: " . implode(PATH_SEPARATOR, $new_parts), PROJECT_MSG_VERBOSE); - $dir = implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)); - $dir = $filter->validateInput($dir, 'path'); - if(is_dir($dir)) { - set_include_path($dir); + if(is_dir(implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)))) { + set_include_path(implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts))); } }