@@ 173-179 (lines=7) @@ | ||
170 | * |
|
171 | * @return StdClass with attributes: 'id', 'name'. |
|
172 | */ |
|
173 | public function getDefaultGroup() |
|
174 | { |
|
175 | $defaultGroupId = isset($this->data->default_group) ? $this->data->default_group : self::GROUP_PUBLIC; |
|
176 | $sql = "SELECT * FROM groups WHERE id = :id"; |
|
177 | $group = $this->db->query($sql, ['id' => $defaultGroupId])->fetch(); |
|
178 | return $group; |
|
179 | } |
|
180 | } |
|
181 |
@@ 400-406 (lines=7) @@ | ||
397 | return $editGroup; |
|
398 | } |
|
399 | ||
400 | public function getReadGroup() |
|
401 | { |
|
402 | $groupId = isset($this->data->read_group) ? $this->data->read_group : User::GROUP_PUBLIC; |
|
403 | $readGroup = $this->db->query("SELECT * FROM groups WHERE id=:id", ['id'=>$groupId])->fetch(); |
|
404 | //dump($readGroup);exit(); |
|
405 | return $readGroup; |
|
406 | } |
|
407 | ||
408 | /** |
|
409 | * Get the raw unformatted date string, including the time component. This may have lots of |