@@ 64-93 (lines=30) @@ | ||
61 | * |
|
62 | * @return array |
|
63 | */ |
|
64 | public function getRow() |
|
65 | { |
|
66 | if (null === $this->row) |
|
67 | { |
|
68 | if (!isset($this->id) && !isset($this->id_right)) |
|
69 | { |
|
70 | $this->row = false; |
|
71 | return false; |
|
72 | } |
|
73 | ||
74 | global $babDB; |
|
75 | ||
76 | $query = 'SELECT * FROM absences_rights_cet WHERE '; |
|
77 | ||
78 | if (isset($this->id)) |
|
79 | { |
|
80 | $query .= 'id='.$babDB->quote($this->id); |
|
81 | } |
|
82 | ||
83 | if (isset($this->id_right)) |
|
84 | { |
|
85 | $query .= 'id_right='.$babDB->quote($this->id_right); |
|
86 | } |
|
87 | ||
88 | $res = $babDB->db_query($query); |
|
89 | $this->setRow($babDB->db_fetch_assoc($res)); |
|
90 | } |
|
91 | ||
92 | return $this->row; |
|
93 | } |
|
94 | ||
95 | /** |
|
96 | * |
@@ 69-99 (lines=31) @@ | ||
66 | * |
|
67 | * @return array |
|
68 | */ |
|
69 | public function getRow() |
|
70 | { |
|
71 | if (null === $this->row) |
|
72 | { |
|
73 | if (!isset($this->id) && !isset($this->_id_right)) |
|
74 | { |
|
75 | $this->row = false; |
|
76 | return false; |
|
77 | } |
|
78 | ||
79 | ||
80 | global $babDB; |
|
81 | ||
82 | $query = 'SELECT * FROM absences_rights_rules WHERE '; |
|
83 | ||
84 | if (isset($this->id)) |
|
85 | { |
|
86 | $query .= 'id='.$babDB->quote($this->id); |
|
87 | } |
|
88 | ||
89 | if (isset($this->_id_right)) |
|
90 | { |
|
91 | $query .= 'id_right='.$babDB->quote($this->_id_right); |
|
92 | } |
|
93 | ||
94 | $res = $babDB->db_query($query); |
|
95 | $this->setRow($babDB->db_fetch_assoc($res)); |
|
96 | } |
|
97 | ||
98 | return $this->row; |
|
99 | } |
|
100 | ||
101 | /** |
|
102 | * |