Fixing style errors.

This commit is contained in:
stickler-ci 2020-06-08 14:00:57 +00:00
parent 3dd7c81f54
commit b4dd11ec98

View File

@ -1421,7 +1421,6 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
elseif (! empty($actioncode)) addEventTypeSQL($sql, $actioncode, $donetodo, $now, $filters); elseif (! empty($actioncode)) addEventTypeSQL($sql, $actioncode, $donetodo, $now, $filters);
if (is_array($actioncode)) { if (is_array($actioncode)) {
foreach ($actioncode as $code) { foreach ($actioncode as $code) {
$sql2 = addMailingEventTypeSQL($code, $objcon, $filterobj); $sql2 = addMailingEventTypeSQL($code, $objcon, $filterobj);
if (! empty($sql2)) { if (! empty($sql2)) {
@ -1855,7 +1854,8 @@ function show_subsidiaries($conf, $langs, $db, $object)
* @param string $sqlANDOR "AND", "OR" or "" * @param string $sqlANDOR "AND", "OR" or ""
* @return void * @return void
*/ */
function addEventTypeSQL(&$sql, $actioncode, $donetodo, $now, $filters, $sqlANDOR = "AND") { function addEventTypeSQL(&$sql, $actioncode, $donetodo, $now, $filters, $sqlANDOR = "AND")
{
global $conf, $db; global $conf, $db;
// Condition on actioncode // Condition on actioncode
@ -1863,14 +1863,12 @@ function addEventTypeSQL(&$sql, $actioncode, $donetodo, $now, $filters, $sqlANDO
{ {
if ($actioncode == 'AC_NON_AUTO') $sql .= " $sqlANDOR c.type != 'systemauto'"; if ($actioncode == 'AC_NON_AUTO') $sql .= " $sqlANDOR c.type != 'systemauto'";
elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " $sqlANDOR c.type = 'systemauto'"; elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " $sqlANDOR c.type = 'systemauto'";
else else {
{
if ($actioncode == 'AC_OTH') $sql .= " $sqlANDOR c.type != 'systemauto'"; if ($actioncode == 'AC_OTH') $sql .= " $sqlANDOR c.type != 'systemauto'";
elseif ($actioncode == 'AC_OTH_AUTO') $sql .= " $sqlANDOR c.type = 'systemauto'"; elseif ($actioncode == 'AC_OTH_AUTO') $sql .= " $sqlANDOR c.type = 'systemauto'";
} }
} }
else else {
{
if ($actioncode == 'AC_NON_AUTO') $sql .= " $sqlANDOR c.type != 'systemauto'"; if ($actioncode == 'AC_NON_AUTO') $sql .= " $sqlANDOR c.type != 'systemauto'";
elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " $sqlANDOR c.type = 'systemauto'"; elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " $sqlANDOR c.type = 'systemauto'";
else $sql .= " $sqlANDOR c.code = '".$db->escape($actioncode)."'"; else $sql .= " $sqlANDOR c.code = '".$db->escape($actioncode)."'";
@ -1889,7 +1887,8 @@ function addEventTypeSQL(&$sql, $actioncode, $donetodo, $now, $filters, $sqlANDO
* @param Object $filterobj * @param Object $filterobj
* @return string * @return string
*/ */
function addMailingEventTypeSQL($actioncode, $objcon, $filterobj) { function addMailingEventTypeSQL($actioncode, $objcon, $filterobj)
{
global $conf, $langs, $db; global $conf, $langs, $db;
// Add also event from emailings. TODO This should be replaced by an automatic event ? May be it's too much for very large emailing. // Add also event from emailings. TODO This should be replaced by an automatic event ? May be it's too much for very large emailing.
if (!empty($conf->mailing->enabled) && !empty($objcon->email) if (!empty($conf->mailing->enabled) && !empty($objcon->email)
@ -1912,5 +1911,4 @@ function addMailingEventTypeSQL($actioncode, $objcon, $filterobj) {
$sql2 .= " AND mc.fk_mailing=m.rowid"; $sql2 .= " AND mc.fk_mailing=m.rowid";
return $sql2; return $sql2;
} }
} }