get settings from DB and check the right checkbox in the settings

This commit is contained in:
Bjoern Schiessle 2012-08-01 10:37:21 +02:00
parent 82f5f73dff
commit a7f3a67bc2
2 changed files with 4 additions and 4 deletions

View file

@ -10,7 +10,7 @@ $tmpl = new OCP\Template( 'files_encryption', 'settings');
$blackList=explode(',',OCP\Config::getAppValue('files_encryption','type_blacklist','jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg')); $blackList=explode(',',OCP\Config::getAppValue('files_encryption','type_blacklist','jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg'));
$enabled=(OCP\Config::getAppValue('files_encryption','enable_encryption','true')=='true'); $enabled=(OCP\Config::getAppValue('files_encryption','enable_encryption','true')=='true');
$tmpl->assign('blacklist',$blackList); $tmpl->assign('blacklist',$blackList);
$tmpl->assign('encryption_enabled',$enabled); $tmpl->assign('encryption_mode',\OC_Appconfig::getValue('files_encryption', 'mode', 'none'));
OCP\Util::addscript('files_encryption','settings'); OCP\Util::addscript('files_encryption','settings');
OCP\Util::addscript('core','multiselect'); OCP\Util::addscript('core','multiselect');

View file

@ -4,9 +4,9 @@
<strong>Choose encryption mode:</strong> <strong>Choose encryption mode:</strong>
<p> <p>
<input type="radio" name="encryption_mode" value="client" style="width:20px;" /> Client side encryption (most secure but makes it impossible to access your data from the web interface)<br /> <input type="radio" name="encryption_mode" value="client" style="width:20px;" <?php if ($_['encryption_mode'] == 'client') echo "checked='checked'"?>/> Client side encryption (most secure but makes it impossible to access your data from the web interface)<br />
<input type="radio" name="encryption_mode" value="server" style="width:20px;" /> Server side encryption (allows you to access your files from the web interface and the desktop client)<br /> <input type="radio" name="encryption_mode" value="server" style="width:20px;" <?php if ($_['encryption_mode'] == 'server') echo "checked='checked'"?> /> Server side encryption (allows you to access your files from the web interface and the desktop client)<br />
<input type="radio" name="encryption_mode" value="none" style="width:20px; checked="checked" /> None (no encryption at all)<br/> <input type="radio" name="encryption_mode" value="none" style="width:20px;" <?php if ($_['encryption_mode'] == 'none') echo "checked='checked'"?>/> None (no encryption at all)<br/>
</p> </p>
<p> <p>
<strong><?php echo $l->t('Encryption'); ?></strong> <strong><?php echo $l->t('Encryption'); ?></strong>