From e6a5cd94611db1d3409b742ba7301bd17a35ce8e Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 8 Mar 2023 10:08:08 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/projet/class/project.class.php | 4 ++-- htdocs/projet/class/task.class.php | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index e2faef3da8e..e25f06ed6a4 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -2021,7 +2021,7 @@ class Project extends CommonObject $sql = "SELECT ptt.rowid as taskid, ptt.element_duration, ptt.element_date, ptt.element_datehour, ptt.fk_element"; $sql .= " FROM ".MAIN_DB_PREFIX."element_time AS ptt, ".MAIN_DB_PREFIX."projet_task as pt"; $sql .= " WHERE ptt.fk_element = pt.rowid"; - $sql .= " AND ptt.elementtype = 'task'"; + $sql .= " AND ptt.elementtype = 'task'"; $sql .= " AND pt.fk_projet = ".((int) $this->id); $sql .= " AND (ptt.element_date >= '".$this->db->idate($datestart)."' "; $sql .= " AND ptt.element_date <= '".$this->db->idate(dol_time_plus_duree($datestart, 1, 'w') - 1)."')"; @@ -2085,7 +2085,7 @@ class Project extends CommonObject $sql = "SELECT ptt.rowid as taskid, ptt.element_duration, ptt.element_date, ptt.element_datehour, ptt.fk_element"; $sql .= " FROM ".MAIN_DB_PREFIX."element_time AS ptt, ".MAIN_DB_PREFIX."projet_task as pt"; $sql .= " WHERE ptt.fk_element = pt.rowid"; - $sql .= " AND ptt.elementtype = 'task'"; + $sql .= " AND ptt.elementtype = 'task'"; $sql .= " AND pt.fk_projet = ".((int) $this->id); $sql .= " AND (ptt.element_date >= '".$this->db->idate($datestart)."' "; $sql .= " AND ptt.element_date <= '".$this->db->idate(dol_time_plus_duree($datestart, 1, 'm') - 1)."')"; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index a303f8708fa..2c2c0580a9b 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1310,7 +1310,7 @@ class Task extends CommonObjectLine } // Update hourly rate of this time spent entry - $resql_thm_user = $this->db->query("SELECT thm FROM " . MAIN_DB_PREFIX . "user WHERE rowid = " . ((int)$timespent->fk_user)); + $resql_thm_user = $this->db->query("SELECT thm FROM " . MAIN_DB_PREFIX . "user WHERE rowid = " . ((int) $timespent->fk_user)); if (!empty($resql_thm_user)) { $obj_thm_user = $this->db->fetch_object($resql_thm_user); $timespent->thm = $obj_thm_user->thm; @@ -1571,11 +1571,9 @@ class Task extends CommonObjectLine $this->timespent_note = $timespent->note; return 1; - } return 0; - } /** @@ -1762,8 +1760,8 @@ class Task extends CommonObjectLine // Update hourly rate of this time spent entry, but only if it was not set initialy $res_update = 1; - if(empty($timespent->thm) || !empty($conf->global->TIMESPENT_ALWAYS_UPDATE_THM)) { - $resql_thm_user = $this->db->query("SELECT thm FROM " . MAIN_DB_PREFIX . "user WHERE rowid = " . ((int)$timespent->fk_user)); + if (empty($timespent->thm) || !empty($conf->global->TIMESPENT_ALWAYS_UPDATE_THM)) { + $resql_thm_user = $this->db->query("SELECT thm FROM " . MAIN_DB_PREFIX . "user WHERE rowid = " . ((int) $timespent->fk_user)); if (!empty($resql_thm_user)) { $obj_thm_user = $this->db->fetch_object($resql_thm_user); $timespent->thm = $obj_thm_user->thm;