Assigments in conditions is often considered bad practice
So let's put a comment, just in case
This commit is contained in:
parent
638764f86d
commit
8907c9944d
@ -611,6 +611,7 @@ class ActionComm extends CommonObject
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$this->nbtodo++;
|
||||
@ -933,6 +934,7 @@ class ActionComm extends CommonObject
|
||||
if ($resql)
|
||||
{
|
||||
// Note: Output of sql request is encoded in $conf->file->character_set_client
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$qualified=true;
|
||||
|
||||
@ -2368,6 +2368,7 @@ class Propal extends CommonObject
|
||||
if ($mode == 'opened') $delay_warning=$conf->propal->cloture->warning_delay;
|
||||
if ($mode == 'signed') $delay_warning=$conf->propal->facturation->warning_delay;
|
||||
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$this->nbtodo++;
|
||||
@ -2506,6 +2507,7 @@ class Propal extends CommonObject
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$this->nb["proposals"]=$obj->nb;
|
||||
|
||||
@ -490,7 +490,8 @@ class EcmDirectory // extends CommonObject
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
while ($obj= $this->db->fetch_object($resql))
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$this->motherof[$obj->id_son]=$obj->id_parent;
|
||||
}
|
||||
@ -555,6 +556,7 @@ class EcmDirectory // extends CommonObject
|
||||
{
|
||||
$this->cats = array();
|
||||
$i=0;
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
while ($obj = $this->db->fetch_object($resql))
|
||||
{
|
||||
$this->cats[$obj->rowid]['id'] = $obj->rowid;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user