remotes/origin/stable5
parent
680c5b3dad
commit
b84e83261e
@ -1,29 +1,19 @@ |
||||
<?php |
||||
/** |
||||
* Copyright (c) 2012 Bjoern Schiessle <schiessle@owncloud.com> |
||||
* Copyright (c) 2013 Sam Tuke <samtuke@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'); |
||||
$tmpl = new OCP\Template( 'files_encryption', 'settings-personal'); |
||||
|
||||
if ($sysEncMode == 'user') { |
||||
$blackList = explode( ',', \OCP\Config::getAppValue( 'files_encryption', 'type_blacklist', 'jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg' ) ); |
||||
|
||||
$tmpl = new OCP\Template( 'files_encryption', 'settings-personal'); |
||||
$tmpl->assign( 'blacklist', $blackList ); |
||||
|
||||
$query = \OC_DB::prepare( "SELECT mode FROM *PREFIX*encryption WHERE uid = ?" ); |
||||
$result = $query->execute(array(\OCP\User::getUser())); |
||||
|
||||
if ($row = $result->fetchRow()){ |
||||
$mode = $row['mode']; |
||||
} else { |
||||
$mode = 'none'; |
||||
} |
||||
|
||||
OCP\Util::addscript('files_encryption','settings-personal'); |
||||
$tmpl->assign('encryption_mode', $mode); |
||||
return $tmpl->fetchPage(); |
||||
} |
||||
OCP\Util::addscript('files_encryption','settings-personal'); |
||||
|
||||
return $tmpl->fetchPage(); |
||||
|
||||
return null; |
||||
|
@ -1,34 +1,20 @@ |
||||
<form id="encryption"> |
||||
<fieldset class="personalblock"> |
||||
<strong><?php echo $l->t( 'Choose encryption mode:' ); ?></strong>
|
||||
<legend> |
||||
<?php echo $l->t( 'Encryption' ); ?> |
||||
</legend> |
||||
<p> |
||||
<input |
||||
type="hidden" |
||||
name="prev_encryption_mode" |
||||
id="prev_encryption_mode" |
||||
value="<?php echo $_['encryption_mode']; ?>"
|
||||
> |
||||
|
||||
<input |
||||
type="radio" |
||||
name="encryption_mode" |
||||
value="server" |
||||
id='server_encryption' |
||||
style="width:20px;" <?php if ( $_['encryption_mode'] == 'server' ) echo "checked='checked'" ?> |
||||
/> |
||||
<?php echo $l->t( 'Server side encryption (allows you to access your files from the web interface)' ); ?> |
||||
<br /> |
||||
|
||||
<input |
||||
type="radio" |
||||
name="encryption_mode" |
||||
value="none" |
||||
id='none_encryption' |
||||
style="width:20px;" |
||||
<?php if ( $_['encryption_mode'] == 'none' ) echo "checked='checked'" ?> |
||||
/> |
||||
<?php echo $l->t( 'None (no encryption at all)' ); ?> |
||||
<br/> |
||||
<?php echo $l->t( 'File encryption is enabled.' ); ?> |
||||
</p> |
||||
<?php if ( ! empty( $_["blacklist"] ) ): ?> |
||||
<p>The following file types will not be encrypted:</p> |
||||
<ul> |
||||
<?php foreach( $_["blacklist"] as $type ): ?> |
||||
<li> |
||||
<?php echo $type; ?> |
||||
</li> |
||||
<?php endforeach; ?> |
||||
</p> |
||||
<?php endif; ?> |
||||
</fieldset> |
||||
</form> |
||||
|
Loading…
Reference in new issue