diff --git a/htdocs/api/index.php b/htdocs/api/index.php index fa96da6b139..1e04590da14 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -1,6 +1,7 @@ +/* Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Laurent Destailleur + * Copyright (C) 2017 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -143,10 +144,9 @@ foreach ($modulesdir as $dir) * * Search files named api_.class.php into /htdocs//class directory * - * @todo : take care of externals module! * @todo : use getElementProperties() function ? */ - $dir_part = DOL_DOCUMENT_ROOT.'/'.$moduledirforclass.'/class/'; + $dir_part = dol_buildpath('/'.$moduledirforclass.'/class/'); $handle_part=@opendir(dol_osencode($dir_part)); if (is_resource($handle_part))