summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFlorin Peter <github@florin-peter.de>2013-05-19 07:04:31 +0200
committerFlorin Peter <github@florin-peter.de>2013-05-19 07:04:31 +0200
commitddda2a1f795122518d13b8654ab4a738d6fa526f (patch)
tree67ae1f4465a881a8806d30df8fd22620cef740ab /apps
parent2a038baee0de882877defb131b5a97821e10a0b9 (diff)
downloadnextcloud-server-ddda2a1f795122518d13b8654ab4a738d6fa526f.tar.gz
nextcloud-server-ddda2a1f795122518d13b8654ab4a738d6fa526f.zip
changed database column 'recovery' to 'recovery_enabled' because recovery is a pgsql keyword
more info about pgsql keywords http://www.postgresql.org/docs/9.1/static/sql-keywords-appendix.html
Diffstat (limited to 'apps')
-rw-r--r--apps/files_encryption/appinfo/database.xml2
-rw-r--r--apps/files_encryption/lib/util.php10
2 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_encryption/appinfo/database.xml b/apps/files_encryption/appinfo/database.xml
index 1935a4df6ad..ca149f0c69d 100644
--- a/apps/files_encryption/appinfo/database.xml
+++ b/apps/files_encryption/appinfo/database.xml
@@ -21,7 +21,7 @@
<comments>What client-side / server-side configuration is used</comments>
</field>
<field>
- <name>recovery</name>
+ <name>recovery_enabled</name>
<type>boolean</type>
<notnull>true</notnull>
<default>0</default>
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index 4e32cf6da14..82f789c5202 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -228,7 +228,7 @@ class Util {
if ( false === $this->recoveryEnabledForUser() ) {
// create database configuration
- $sql = 'INSERT INTO `*PREFIX*encryption` (`uid`,`mode`,`recovery`) VALUES (?,?,?)';
+ $sql = 'INSERT INTO `*PREFIX*encryption` (`uid`,`mode`,`recovery_enabled`) VALUES (?,?,?)';
$args = array( $this->userId, 'server-side', 0);
$query = \OCP\DB::prepare( $sql );
$query->execute( $args );
@@ -252,7 +252,7 @@ class Util {
public function recoveryEnabledForUser() {
$sql = 'SELECT
- recovery
+ recovery_enabled
FROM
`*PREFIX*encryption`
WHERE
@@ -268,7 +268,7 @@ class Util {
while( $row = $result->fetchRow() ) {
- $recoveryEnabled[] = $row['recovery'];
+ $recoveryEnabled[] = $row['recovery_enabled'];
}
@@ -299,7 +299,7 @@ class Util {
if ( false === $recoveryStatus ) {
$sql = 'INSERT INTO `*PREFIX*encryption`
- (`uid`,`mode`,`recovery`)
+ (`uid`,`mode`,`recovery_enabled`)
VALUES (?,?,?)';
$args = array( $this->userId, 'server-side', $enabled );
@@ -310,7 +310,7 @@ class Util {
$sql = 'UPDATE
*PREFIX*encryption
SET
- recovery = ?
+ recovery_enabled = ?
WHERE
uid = ?';