mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
code cleanup
This commit is contained in:
parent
5996ea735a
commit
19b3109655
3 changed files with 12 additions and 4 deletions
|
|
@ -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( ?, ? )' );
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
$sysEncMode = \OC_Appconfig::getValue('files_encryption', 'mode', 'none');
|
||||
|
||||
|
|
@ -21,5 +27,3 @@ if ($sysEncMode == 'user') {
|
|||
}
|
||||
|
||||
return null;
|
||||
|
||||
?>
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
<form id="encryption">
|
||||
<fieldset class="personalblock">
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue