Fixed custom reports includes issue.
[fa-stable.git] / includes / main.inc
index fd4aa97759f8f26fd6e4c06cebccd6562034c38c..55a97b2bc80d0c01dbbd8a00f23886e0bf273919 100644 (file)
@@ -312,10 +312,10 @@ function find_custom_file($rep)
 
        // customized per company version
        $path = company_path();
-       $file = $path.'/'.$rep;
+       $file = $path.$rep;
        if (file_exists($file)) {
                // add local include path
-               set_include_path($path.PATH_SEPARATOR.get_include_path());
+               set_include_path(dirname($file).PATH_SEPARATOR.get_include_path());
                return $file;
        }
        // file added by active extension modules
@@ -340,5 +340,4 @@ function find_custom_file($rep)
        return null;
 }
 
-
 ?>
\ No newline at end of file