diff --git a/apps/files_encryption/ajax/changemode.php b/apps/files_encryption/ajax/mode.php similarity index 84% rename from apps/files_encryption/ajax/changemode.php rename to apps/files_encryption/ajax/mode.php index 64e7dbef68..0515cdccb0 100644 --- a/apps/files_encryption/ajax/changemode.php +++ b/apps/files_encryption/ajax/mode.php @@ -4,6 +4,8 @@ * This file is licensed under the Affero General Public License version 3 or later. * See the COPYING-README file. */ + +//TODO: Handle switch between client and server side encryption OCP\JSON::checkAppEnabled('files_encryption'); OCP\JSON::checkLoggedIn(); diff --git a/apps/files_encryption/js/settings-personal.js b/apps/files_encryption/js/settings-personal.js index 7ca2ce5697..6d3c9f9a48 100644 --- a/apps/files_encryption/js/settings-personal.js +++ b/apps/files_encryption/js/settings-personal.js @@ -11,10 +11,11 @@ $(document).ready(function(){ ,user=$('input[value="user"]:checked').val() ,none=$('input[value="none"]:checked').val() if (client) - $.post(OC.filePath('files_encryption', 'ajax', 'changemode.php'), { mode: 'client' }); + var encmode= 'client'; else if (server) - $.post(OC.filePath('files_encryption', 'ajax', 'changemode.php'), { mode: 'server' }); + var encmode = 'server'; else - $.post(OC.filePath('files_encryption', 'ajax', 'changemode.php'), { mode: 'none' }); + var encmode = 'none'; + $.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: encmode }); }) }) \ No newline at end of file diff --git a/apps/files_encryption/js/settings.js b/apps/files_encryption/js/settings.js index d4dc470ced..19ff27a3b2 100644 --- a/apps/files_encryption/js/settings.js +++ b/apps/files_encryption/js/settings.js @@ -17,6 +17,7 @@ $(document).ready(function(){ OC.AppConfig.setValue('files_encryption','type_blacklist',blackList); } + //TODO: Handle switch between client and server side encryption $('input[name=encryption_mode]').change(function(){ var client=$('input[value="client"]:checked').val() ,server=$('input[value="server"]:checked').val()