summaryrefslogtreecommitdiffstats
path: root/apps/bookmarks
diff options
context:
space:
mode:
authorBrice Maron <brice@bmaron.net>2011-10-29 11:40:48 +0200
committerBrice Maron <brice@bmaron.net>2011-10-29 11:40:48 +0200
commite533e82bc9526ef9869b20e99b745c210348218f (patch)
tree6ce0621f070c3888e1c34b68b7bf5ae0636add76 /apps/bookmarks
parent5ffec927012a98cdcc409318dd1b2a264f071b83 (diff)
downloadnextcloud-server-e533e82bc9526ef9869b20e99b745c210348218f.tar.gz
nextcloud-server-e533e82bc9526ef9869b20e99b745c210348218f.zip
Add sequence name in insertid to be more portable
Diffstat (limited to 'apps/bookmarks')
-rw-r--r--apps/bookmarks/ajax/addBookmark.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/apps/bookmarks/ajax/addBookmark.php b/apps/bookmarks/ajax/addBookmark.php
index 3975fd15f81..45b16ae5fa6 100644
--- a/apps/bookmarks/ajax/addBookmark.php
+++ b/apps/bookmarks/ajax/addBookmark.php
@@ -54,13 +54,7 @@ $params=array(
);
$query->execute($params);
-if($CONFIG_DBTYPE == 'pgsql')
-{
- $query = OC_DB::prepare("SELECT currval('*PREFIX*bookmarks_id_seq')");
- $b_id = $query->execute()->fetchOne();
-} else {
- $b_id = OC_DB::insertid();
-}
+$b_id = OC_DB::insertid('*PREFIX*bookmarks');
if($b_id !== false) {