From bd0551b22076b82a6d49e9f7a2b2e0c90a1b2326 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Fri, 05 Feb 2016 07:25:27 -0500 Subject: [PATCH] Secure also downloads of addressbook exports, managesieve script exports and Enigma keys exports --- plugins/enigma/lib/enigma_error.php | 26 +++++++++++--------------- 1 files changed, 11 insertions(+), 15 deletions(-) diff --git a/plugins/enigma/lib/enigma_error.php b/plugins/enigma/lib/enigma_error.php index 1717a7c..d5f190b 100644 --- a/plugins/enigma/lib/enigma_error.php +++ b/plugins/enigma/lib/enigma_error.php @@ -1,5 +1,6 @@ <?php -/* + +/** +-------------------------------------------------------------------------+ | Error class for the Enigma Plugin | | | @@ -21,14 +22,14 @@ private $data = array(); // error codes - const E_OK = 0; - const E_INTERNAL = 1; - const E_NODATA = 2; - const E_KEYNOTFOUND = 3; - const E_DELKEY = 4; - const E_BADPASS = 5; - const E_EXPIRED = 6; - const E_UNVERIFIED = 7; + const OK = 0; + const INTERNAL = 1; + const NODATA = 2; + const KEYNOTFOUND = 3; + const DELKEY = 4; + const BADPASS = 5; + const EXPIRED = 6; + const UNVERIFIED = 7; function __construct($code = null, $message = '', $data = array()) @@ -50,11 +51,6 @@ function getData($name) { - if ($name) { - return $this->data[$name]; - } - else { - return $this->data; - } + return $name ? $this->data[$name] : $this->data; } } -- Gitblit v1.9.1