diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2012-08-02 13:55:23 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2012-08-02 13:55:23 +0200 |
commit | 19b31096552c9f602449b010754ea97e48d94c42 (patch) | |
tree | bde5b330c9fac7e706d7a0a65eb48d5a534520bd /apps/files_encryption/ajax | |
parent | 5996ea735a5a6f72c586c32c8b15ada07e35c5b2 (diff) | |
download | nextcloud-server-19b31096552c9f602449b010754ea97e48d94c42.tar.gz nextcloud-server-19b31096552c9f602449b010754ea97e48d94c42.zip |
code cleanup
Diffstat (limited to 'apps/files_encryption/ajax')
-rw-r--r-- | apps/files_encryption/ajax/changemode.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_encryption/ajax/changemode.php b/apps/files_encryption/ajax/changemode.php index 0e6678e4bba..64e7dbef685 100644 --- a/apps/files_encryption/ajax/changemode.php +++ b/apps/files_encryption/ajax/changemode.php @@ -1,4 +1,9 @@ <?php +/**
+ * Copyright (c) 2012, Bjoern Schiessle <schiessle@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or later.
+ * See the COPYING-README file.
+ */ OCP\JSON::checkAppEnabled('files_encryption');
OCP\JSON::checkLoggedIn();
@@ -9,7 +14,7 @@ $mode = $_POST['mode']; $query = \OC_DB::prepare( "SELECT mode FROM *PREFIX*encryption WHERE uid = ?" );
$result = $query->execute(array(\OCP\User::getUser()));
-if ($row = $result->fetchRow()){ +if ($result->fetchRow()){ $query = OC_DB::prepare( 'UPDATE *PREFIX*encryption SET mode = ? WHERE uid = ?' ); } else { $query = OC_DB::prepare( 'INSERT INTO *PREFIX*encryption ( mode, uid ) VALUES( ?, ? )' ); |