Fix creation of new calendars on DB backend
This commit is contained in:
parent
28e8f440e8
commit
def64e251f
1 changed files with 3 additions and 2 deletions
|
@ -82,7 +82,8 @@ class database_driver extends calendar_driver
|
||||||
$calendar_ids = array();
|
$calendar_ids = array();
|
||||||
$result = $this->rc->db->query(
|
$result = $this->rc->db->query(
|
||||||
"SELECT *, calendar_id AS id FROM " . $this->db_calendars . "
|
"SELECT *, calendar_id AS id FROM " . $this->db_calendars . "
|
||||||
WHERE user_id=?",
|
WHERE user_id=?
|
||||||
|
ORDER BY name",
|
||||||
$this->rc->user->ID
|
$this->rc->user->ID
|
||||||
);
|
);
|
||||||
while ($result && ($arr = $this->rc->db->fetch_assoc($result))) {
|
while ($result && ($arr = $this->rc->db->fetch_assoc($result))) {
|
||||||
|
@ -122,7 +123,7 @@ class database_driver extends calendar_driver
|
||||||
$result = $this->rc->db->query(
|
$result = $this->rc->db->query(
|
||||||
"INSERT INTO " . $this->db_calendars . "
|
"INSERT INTO " . $this->db_calendars . "
|
||||||
(user_id, name, color, showalarms)
|
(user_id, name, color, showalarms)
|
||||||
VALUES (?, ?, ?)",
|
VALUES (?, ?, ?, ?)",
|
||||||
$this->rc->user->ID,
|
$this->rc->user->ID,
|
||||||
$prop['name'],
|
$prop['name'],
|
||||||
$prop['color'],
|
$prop['color'],
|
||||||
|
|
Loading…
Add table
Reference in a new issue