Skip to content

Commit

Permalink
FIX #10460 compatibility with MariaDB 10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Feb 3, 2019
1 parent 4538d13 commit 72f78ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions htdocs/comm/action/class/actioncomm.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1020,8 +1020,7 @@ function load_board($user, $load_state_board=0)
$this->nb=array();
$sql = "SELECT count(a.id) as nb";
}
$sql.= " FROM (".MAIN_DB_PREFIX."actioncomm as a";
$sql.= ")";
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
$sql.= " WHERE 1 = 1";
Expand Down
3 changes: 1 addition & 2 deletions htdocs/core/boxes/box_actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ function loadBox($max=5)
$sql.= ", s.nom as name";
$sql.= ", s.rowid as socid";
$sql.= ", s.code_client";
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm AS ta, ";
$sql.= MAIN_DB_PREFIX."actioncomm AS a)";
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm AS ta, ".MAIN_DB_PREFIX."actioncomm AS a";
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
$sql.= " WHERE a.fk_action = ta.id";
Expand Down

0 comments on commit 72f78ec

Please sign in to comment.