Ensure the include path is built from the current path (avoid inclusion mixups when executing libraries from testing scripts)

skala
Yannick Warnier 16 years ago
parent d6aca8741a
commit 31286ee002
  1. 3
      main/inc/lib/main_api.lib.php

@ -485,7 +485,8 @@ function api_get_path($path_type) {
case INCLUDE_PATH :
// Generated by main/inc/global.inc.php
// example: /var/www/dokeos/main/inc/
return str_replace('\\', '/', $GLOBALS['includePath']).'/';
$incpath = realpath(dirname(__FILE__).'/../');
return str_replace('\\', '/', $incpath).'/';
break;
case LIBRARY_PATH :

Loading…
Cancel
Save