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

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

Conflicts:
	htdocs/api/class/api_generic.class.php
	htdocs/api/index.php
parents 65951d2f 66901e86
Branches
Tags
No related merge requests found
...@@ -38,11 +38,14 @@ class Login ...@@ -38,11 +38,14 @@ class Login
* *
* @param string $login Username * @param string $login Username
* @param string $password User password * @param string $password User password
* @param int $entity User entity * @param int $entity Entity (when multicompany module is used). Empty means 1=first company.
* @param int $reset Reset token * @param int $reset Reset token (0=get current token, 1=ask a new token, meaning that all future access using current token will failed)
* @return array Response status and user token * @return array Response status and user token
* *
* @throws RestException * @throws RestException
*
* @url GET /
* @url POST /
*/ */
public function index($login, $password, $entity=0, $reset=0) { public function index($login, $password, $entity=0, $reset=0) {
......
...@@ -144,7 +144,7 @@ foreach ($modulesdir as $dir) ...@@ -144,7 +144,7 @@ foreach ($modulesdir as $dir)
require_once $dir_part.$file_searched; require_once $dir_part.$file_searched;
if (class_exists($classname)) if (class_exists($classname))
{ {
dol_syslog("Found deprecated API by index.php classname=".$classname." into ".$dir); dol_syslog("Found deprecated API by index.php: classname=".$classname." into ".$dir." - ".$dir_part.$file_searched);
$api->r->addAPIClass($classname, '/'); $api->r->addAPIClass($classname, '/');
} }
} }
...@@ -154,7 +154,7 @@ foreach ($modulesdir as $dir) ...@@ -154,7 +154,7 @@ foreach ($modulesdir as $dir)
require_once $dir_part.$file_searched; require_once $dir_part.$file_searched;
if (class_exists($classname)) if (class_exists($classname))
{ {
dol_syslog("Found API by index.php classname=".$classname." into ".$dir); dol_syslog("Found API by index.php: classname=".$classname." into ".$dir." - ".$dir_part.$file_searched);
$listofapis[] = $classname; $listofapis[] = $classname;
} }
} }
...@@ -181,7 +181,3 @@ foreach ($listofapis as $classname) ...@@ -181,7 +181,3 @@ foreach ($listofapis as $classname)
// Call API (we suppose we found it) // Call API (we suppose we found it)
$api->r->handle(); $api->r->handle();
...@@ -64,7 +64,7 @@ $search_state=trim(GETPOST("search_state")); ...@@ -64,7 +64,7 @@ $search_state=trim(GETPOST("search_state"));
$search_country=GETPOST("search_country",'int'); $search_country=GETPOST("search_country",'int');
$search_type_thirdparty=GETPOST("search_type_thirdparty",'int'); $search_type_thirdparty=GETPOST("search_type_thirdparty",'int');
$search_user=GETPOST('search_user','int'); $search_user=GETPOST('search_user','int');
$search_request_author=GETPOST('search_request_author','int'); $search_request_author=GETPOST('search_request_author','alpha');
$search_ht=GETPOST('search_ht'); $search_ht=GETPOST('search_ht');
$search_ttc=GETPOST('search_ttc'); $search_ttc=GETPOST('search_ttc');
$search_status=(GETPOST('search_status','alpha')!=''?GETPOST('search_status','alpha'):GETPOST('statut','alpha')); // alpha and not intbecause it can be '6,7' $search_status=(GETPOST('search_status','alpha')!=''?GETPOST('search_status','alpha'):GETPOST('statut','alpha')); // alpha and not intbecause it can be '6,7'
...@@ -192,7 +192,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP ...@@ -192,7 +192,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
$search_type=''; $search_type='';
$search_country=''; $search_country='';
$search_type_thirdparty=''; $search_type_thirdparty='';
$search_request_author=-1; $search_request_author='';
$search_total_ht=''; $search_total_ht='';
$search_total_vat=''; $search_total_vat='';
$search_total_ttc=''; $search_total_ttc='';
...@@ -300,7 +300,7 @@ if ($search_ref) $sql .= natural_search('cf.ref', $search_ref); ...@@ -300,7 +300,7 @@ if ($search_ref) $sql .= natural_search('cf.ref', $search_ref);
if ($search_refsupp) $sql.= natural_search("cf.ref_supplier", $search_refsupp); if ($search_refsupp) $sql.= natural_search("cf.ref_supplier", $search_refsupp);
if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
if ($search_company) $sql .= natural_search('s.nom', $search_company); if ($search_company) $sql .= natural_search('s.nom', $search_company);
if ($search_request_author > 0) $sql.= " AND u.login LIKE '%".$db->escape($search_request_author)."%'"; if ($search_request_author) $sql.= " AND u.login LIKE '%".$db->escape($search_request_author)."%'";
if ($billed != '' && $billed >= 0) $sql .= " AND cf.billed = ".$billed; if ($billed != '' && $billed >= 0) $sql .= " AND cf.billed = ".$billed;
//Required triple check because statut=0 means draft filter //Required triple check because statut=0 means draft filter
...@@ -410,7 +410,7 @@ if ($resql) ...@@ -410,7 +410,7 @@ if ($resql)
if ($search_ref) $param.='&search_ref='.$search_ref; if ($search_ref) $param.='&search_ref='.$search_ref;
if ($search_company) $param.='&search_company='.$search_company; if ($search_company) $param.='&search_company='.$search_company;
if ($search_user > 0) $param.='&search_user='.$search_user; if ($search_user > 0) $param.='&search_user='.$search_user;
if ($search_request_author > 0) $param.='&search_request_author='.$search_request_author; if ($search_request_author) $param.='&search_request_author='.$search_request_author;
if ($search_sale > 0) $param.='&search_sale='.$search_sale; if ($search_sale > 0) $param.='&search_sale='.$search_sale;
if ($search_total_ht != '') $param.='&search_total_ht='.$search_total_ht; if ($search_total_ht != '') $param.='&search_total_ht='.$search_total_ht;
if ($search_total_ttc != '') $param.="&search_total_ttc=".$search_total_ttc; if ($search_total_ttc != '') $param.="&search_total_ttc=".$search_total_ttc;
...@@ -552,7 +552,7 @@ if ($resql) ...@@ -552,7 +552,7 @@ if ($resql)
if (! empty($arrayfields['u.login']['checked'])) if (! empty($arrayfields['u.login']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
//print '<input type="text" class="flat" size="6" name="search_request_author" value="'.$search_request_author.'">'; print '<input type="text" class="flat" size="6" name="search_request_author" value="'.$search_request_author.'">';
print '</td>'; print '</td>';
} }
// Thirpdarty // Thirpdarty
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment