[svn r13147] Always return api_get_path(WEB_PATH) and api_get_path(SYS_PATH) with a trailing slash.

skala
Yannick Warnier 17 years ago
parent 2ceadb6702
commit 39b891b5ea
  1. 20
      main/inc/lib/main_api.lib.php

@ -285,14 +285,28 @@ function api_get_path($path_type)
switch ($path_type)
{
case WEB_PATH :
// example: http://www.mydokeos.com or http://www.mydokeos.com/portal/ if you're using
// example: http://www.mydokeos.com/ or http://www.mydokeos.com/portal/ if you're using
// a subdirectory of your document root for Dokeos
return $_configuration['root_web'];
if(substr($_configuration['root_web'],-1) == '/')
{
return $_configuration['root_web'];
}
else
{
return $_configuration['root_web'].'/';
}
break;
case SYS_PATH :
// example: /var/www/
return $_configuration['root_sys'];
if(substr($_configuration['root_sys'],-1) == '/')
{
return $_configuration['root_sys'];
}
else
{
return $_configuration['root_sys'].'/';
}
break;
case REL_PATH :

Loading…
Cancel
Save