FIX #3548 : API not working after removing Composer

This commit is contained in:
jfefe 2015-09-17 20:48:57 +02:00
parent 4195eb3366
commit bf4fe91197
2 changed files with 9 additions and 1 deletions

8
htdocs/api/restler.php Normal file
View File

@ -0,0 +1,8 @@
<?php
// use the restler auto loader
require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php';
return call_user_func(function () {
$loader = Luracast\Restler\AutoLoader::instance();
spl_autoload_register($loader);
return $loader;
});

View File

@ -31,7 +31,7 @@ $res=0;
if (! $res && file_exists("../../main.inc.php")) $res=include '../../main.inc.php';
if (! $res) die("Include of main fails");
require_once DOL_DOCUMENT_ROOT.'/includes/autoload.php';
require_once DOL_DOCUMENT_ROOT.'/api/restler.php';
require_once DOL_DOCUMENT_ROOT.'/api/class/api.class.php';
require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';