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

This commit is contained in:
Laurent Destailleur 2016-11-27 17:10:25 +01:00
commit ad912bed04
3 changed files with 42 additions and 42 deletions

View File

@ -45,6 +45,9 @@ class GenericApi extends DolibarrApi
* @return array Response status and user token
*
* @throws RestException
*
* @url POST /login
* @url GET /login
*/
public function login($login, $password, $entity=0, $reset=0) {

View File

@ -26,6 +26,7 @@
*
*/
if (! defined("NOLOGIN")) define("NOLOGIN",'1');
if (! defined("NOCSRFCHECK")) define("NOCSRFCHECK",'1');
$res=0;
if (! $res && file_exists("../main.inc.php")) $res=include '../main.inc.php';
@ -142,7 +143,3 @@ foreach ($modulesdir as $dir)
// Call API (we suppose we found it)
$api->r->handle();

View File

@ -64,7 +64,7 @@ $search_state=trim(GETPOST("search_state"));
$search_country=GETPOST("search_country",'int');
$search_type_thirdparty=GETPOST("search_type_thirdparty",'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_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'
@ -192,7 +192,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
$search_type='';
$search_country='';
$search_type_thirdparty='';
$search_request_author=-1;
$search_request_author='';
$search_total_ht='';
$search_total_vat='';
$search_total_ttc='';
@ -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 ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
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;
//Required triple check because statut=0 means draft filter
@ -410,7 +410,7 @@ if ($resql)
if ($search_ref) $param.='&search_ref='.$search_ref;
if ($search_company) $param.='&search_company='.$search_company;
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_total_ht != '') $param.='&search_total_ht='.$search_total_ht;
if ($search_total_ttc != '') $param.="&search_total_ttc=".$search_total_ttc;
@ -551,7 +551,7 @@ if ($resql)
if (! empty($arrayfields['u.login']['checked']))
{
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>';
}
// Thirpdarty