@@ 86-94 (lines=9) @@ | ||
83 | * |
|
84 | * @return boolean |
|
85 | */ |
|
86 | public function logout() |
|
87 | { |
|
88 | $result = $this->db->exec("UPDATE user SET session_id = " . $this->db->quote('', 'text') . " WHERE session_id = " . $this->db->quote($this->session_id, 'text')); |
|
89 | ||
90 | if (PEAR::isError($result)) { |
|
91 | throw new Exception('could not log user out ' . $result->getUserInfo()); |
|
92 | } |
|
93 | return true; |
|
94 | } |
|
95 | ||
96 | /** |
|
97 | * Returns an identification string on the user |
@@ 216-228 (lines=13) @@ | ||
213 | * |
|
214 | * @return boolean true or false |
|
215 | */ |
|
216 | public function terminate() |
|
217 | { |
|
218 | if ($this->id == 0) { |
|
219 | return false; |
|
220 | } |
|
221 | ||
222 | $result = $this->db->exec("UPDATE intranet_module_package SET status_key = 3 WHERE intranet_id = ".$this->intranet->get('id')." AND id = ".intval($this->id)); |
|
223 | if (PEAR::isError($result)) { |
|
224 | throw new Exception("Error in query in Intraface_modules_modulepackage_Manager->terminate :". $result->getUserInfo()); |
|
225 | } |
|
226 | ||
227 | return $result; |
|
228 | } |
|
229 | ||
230 | /** |
|
231 | * Delete an intranet module package |
|
@@ 235-246 (lines=12) @@ | ||
232 | * |
|
233 | * @return boolean true or false |
|
234 | */ |
|
235 | public function delete() |
|
236 | { |
|
237 | if ($this->id == 0) { |
|
238 | return false; |
|
239 | } |
|
240 | $result = $this->db->exec("UPDATE intranet_module_package SET active = 0 WHERE intranet_id = ".$this->intranet->get('id')." AND id = ".intval($this->id)); |
|
241 | if (PEAR::isError($result)) { |
|
242 | throw new Exception("Error in query in Intraface_modules_modulepackage_Manager->delete :". $result->getUserInfo()); |
|
243 | } |
|
244 | ||
245 | return $result; |
|
246 | } |
|
247 | ||
248 | /** |
|
249 | * Returns on the basis of the module package which type of add this is. Can be either add, extend, or upgrade |