Skip to content
Snippets Groups Projects
Commit 339d1eb1 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0

parents e1b4788b d68abf82
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ class DolibarrApi ...@@ -48,7 +48,7 @@ class DolibarrApi
*/ */
function __construct($db, $cachedir='', $refreshCache=false) function __construct($db, $cachedir='', $refreshCache=false)
{ {
global $conf; global $conf, $dolibarr_main_url_root;
if (empty($cachedir)) $cachedir = $conf->api->dir_temp; if (empty($cachedir)) $cachedir = $conf->api->dir_temp;
Defaults::$cacheDirectory = $cachedir; Defaults::$cacheDirectory = $cachedir;
...@@ -56,7 +56,9 @@ class DolibarrApi ...@@ -56,7 +56,9 @@ class DolibarrApi
$this->db = $db; $this->db = $db;
$production_mode = ( empty($conf->global->API_PRODUCTION_MODE) ? false : true ); $production_mode = ( empty($conf->global->API_PRODUCTION_MODE) ? false : true );
$this->r = new Restler($production_mode, $refreshCache); $this->r = new Restler($production_mode, $refreshCache);
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
$this->r->setBaseUrls(DOL_MAIN_URL_ROOT, $urlwithroot);
$this->r->setAPIVersion(1); $this->r->setAPIVersion(1);
} }
......
...@@ -237,7 +237,7 @@ print "</tr>\n"; ...@@ -237,7 +237,7 @@ print "</tr>\n";
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
if (! empty($arrayfields['t.ref']['checked'])) print_liste_field_titre($arrayfields['t.ref']['label'],$_SERVER["PHP_SELF"],"t.ref","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['t.ref']['checked'])) print_liste_field_titre($arrayfields['t.ref']['label'],$_SERVER["PHP_SELF"],"t.ref","",$param,"",$sortfield,$sortorder);
if (! empty($arrayfields['ty.label']['checked'])) print_liste_field_titre($arrayfields['ty.label']['label'],$_SERVER["PHP_SELF"],"t.code","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['ty.label']['checked'])) print_liste_field_titre($arrayfields['ty.label']['label'],$_SERVER["PHP_SELF"],"ty.label","",$param,"",$sortfield,$sortorder);
// Extra fields // Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment