]> source.dussan.org Git - nextcloud-server.git/commitdiff
fixing undefined variable
authorThomas Müller <thomas.mueller@tmit.eu>
Fri, 17 Apr 2015 12:25:57 +0000 (14:25 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Fri, 17 Apr 2015 12:25:57 +0000 (14:25 +0200)
apps/encryption/controller/statuscontroller.php

index fc06d7f86a0ff8d3967b33dd4dc4504d4b8a66a8..d29cca03505f1f096a36f11df2e32e5cc367eda8 100644 (file)
@@ -59,30 +59,30 @@ class StatusController extends Controller {
         */
        public function getStatus() {
 
+               $status = 'error';
+               $message = '';
                switch( $this->session->getStatus()) {
                        case Session::INIT_EXECUTED:
                                $status = 'success';
                                $message = (string)$this->l->t(
                                        'Invalid private key for Encryption App. Please update your private'
                                        . ' key password in your personal settings to recover access to your'
-                                       . ' encrypted files.', array('app' => 'encryption'));
+                                       . ' encrypted files.');
                                break;
                        case Session::NOT_INITIALIZED:
                                $status = 'success';
                                $message = (string)$this->l->t(
                                        'Encryption App is enabled but your keys are not initialized,'
-                                       . ' please log-out and log-in again', array('app' => 'encryption'));
+                                       . ' please log-out and log-in again');
                                break;
-                       default:
-                               $status = 'error';
                }
 
                return new DataResponse(
-                       array(
+                       [
                                'status' => $status,
-                               'data' => array(
-                                       'message' => $message)
-                       )
+                               'data' => [
+                                       'message' => $message]
+                       ]
                );
        }