Skip to content

Commit

Permalink
Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Feb 22, 2018
1 parent 7654302 commit 420fe3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/core/class/html.formmail.class.php
Expand Up @@ -982,7 +982,7 @@ function get_form($addfileaction='addfile',$removefileaction='removefile')
* @param string $type_template Get message for type=$type_template, type='all' also included.
* @param string $user Use template public or limited to this user
* @param Translate $outputlangs Output lang object
* @param int $id Id of template to find, or -1 for first found with position = 0, or 0 for all
* @param int $id Id of template to find, or -1 for first found with lower position, or 0 for first found whatever is position
* @param int $active 1=Only active template, 0=Only disabled, -1=All
* @return array array('topic'=>,'content'=>,..)
*/
Expand All @@ -1001,7 +1001,7 @@ public function getEMailTemplate($db, $type_template, $user, $outputlangs, $id=0
if ($id == -1) $sql.= " AND position=0";
if (is_object($outputlangs)) $sql.= $db->order("position,lang,label","ASC,DESC,ASC"); // We want line with lang set first, then with lang null or ''
else $sql.= $db->order("position,lang,label","ASC,ASC,ASC"); // If no language provided, we give priority to lang not defined
if ($id == -1) $sql.= $db->plimit(1);
$sql.= $db->plimit(1);
//print $sql;

$resql = $db->query($sql);
Expand Down

0 comments on commit 420fe3a

Please sign in to comment.