diff options
author | Aleksander Machniak <machniak@kolabsys.com> | 2014-09-19 13:11:53 +0200 |
---|---|---|
committer | Aleksander Machniak <machniak@kolabsys.com> | 2014-09-19 13:11:53 +0200 |
commit | 281cb9f4ef6a5f7a3e3fb707510dc2ad225ef3ef (patch) | |
tree | 815c89eabd5fd6bb40a0cc971705e14866c3dceb /lib/api | |
parent | b8f70c69d9a2a5e2ab7f42ab08fe95696236e13d (diff) | |
download | webadmin-281cb9f4ef6a5f7a3e3fb707510dc2ad225ef3ef.tar.gz |
Added Oracle supportoracle
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/kolab_api_service_form_value.php | 2 | ||||
-rw-r--r-- | lib/api/kolab_api_service_type.php | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/api/kolab_api_service_form_value.php b/lib/api/kolab_api_service_form_value.php index f1e0960..18867a4 100644 --- a/lib/api/kolab_api_service_form_value.php +++ b/lib/api/kolab_api_service_form_value.php @@ -1425,7 +1425,7 @@ class kolab_api_service_form_value extends kolab_api_service } $db = SQL::get_instance(); - $query = $db->query("SELECT option_values FROM options WHERE attribute = ?", array($attribute)); + $query = $db->query("SELECT `option_values` FROM `options` WHERE `attribute` = ?", array($attribute)); $result = $db->fetch_assoc($query); $result = json_decode($result['option_values']); diff --git a/lib/api/kolab_api_service_type.php b/lib/api/kolab_api_service_type.php index 868018b..09bbc8c 100644 --- a/lib/api/kolab_api_service_type.php +++ b/lib/api/kolab_api_service_type.php @@ -104,16 +104,16 @@ class kolab_api_service_type extends kolab_api_service $query = array_map(array($this->db, 'quote'), $query); $columns = array_map(array($this->db, 'quote_identifier'), array_keys($query)); - $this->db->query("INSERT INTO {$type}_types" + $this->db->query("INSERT INTO `{$type}_types`" . " (" . implode(', ', $columns) . ") VALUES (" . implode(', ', $query) . ")"); - if (!($id = $this->db->insert_id())) { + if (!($id = $this->db->insert_id($type . '_types'))) { return false; } // there can be only one default if ($postdata['is_default']) { - $this->db->query("UPDATE {$type}_types SET is_default = 0 WHERE id <> " . intval($id)); + $this->db->query("UPDATE `{$type}_types` SET `is_default` = 0 WHERE `id` <> " . intval($id)); } // update cache @@ -150,7 +150,7 @@ class kolab_api_service_type extends kolab_api_service return false; } - $this->db->query("DELETE FROM {$object_name}_types WHERE id = " . intval($object_id)); + $this->db->query("DELETE FROM `{$object_name}_types` WHERE `id` = " . intval($object_id)); return (bool) $this->db->affected_rows(); } @@ -199,8 +199,8 @@ class kolab_api_service_type extends kolab_api_service $query[$idx] = $this->db->quote_identifier($idx) . " = " . $this->db->quote($value); } - $result = $this->db->query("UPDATE {$type}_types SET " - . implode(', ', $query) . " WHERE id = " . intval($postdata['id'])); + $result = $this->db->query("UPDATE `{$type}_types` SET " + . implode(', ', $query) . " WHERE `id` = " . intval($postdata['id'])); if (!$result) { return false; @@ -208,7 +208,7 @@ class kolab_api_service_type extends kolab_api_service // there can be only one default if ($postdata['is_default']) { - $this->db->query("UPDATE {$type}_types SET is_default = 0 WHERE id <> " . intval($postdata['id'])); + $this->db->query("UPDATE `{$type}_types` SET `is_default` = 0 WHERE `id` <> " . intval($postdata['id'])); } // update cache |