FIX #3548 : API not working after removing Composer
This commit is contained in:
parent
4195eb3366
commit
bf4fe91197
8
htdocs/api/restler.php
Normal file
8
htdocs/api/restler.php
Normal 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;
|
||||||
|
});
|
||||||
@ -31,7 +31,7 @@ $res=0;
|
|||||||
if (! $res && file_exists("../../main.inc.php")) $res=include '../../main.inc.php';
|
if (! $res && file_exists("../../main.inc.php")) $res=include '../../main.inc.php';
|
||||||
if (! $res) die("Include of main fails");
|
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.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user