@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | - // Load the release files (concatenated, compressed) |
|
| 4 | - define("LOAD_RELEASE", 1); |
|
| 5 | - // Load the debug files (concatenated, not compressed) |
|
| 6 | - define("LOAD_DEBUG", 2); |
|
| 7 | - // Load the original source files (for developers) |
|
| 8 | - define("LOAD_SOURCE", 3); |
|
| 3 | + // Load the release files (concatenated, compressed) |
|
| 4 | + define("LOAD_RELEASE", 1); |
|
| 5 | + // Load the debug files (concatenated, not compressed) |
|
| 6 | + define("LOAD_DEBUG", 2); |
|
| 7 | + // Load the original source files (for developers) |
|
| 8 | + define("LOAD_SOURCE", 3); |
|
| 9 | 9 | |
| 10 | - // Defines the base path on the server, terminated by a slash |
|
| 11 | - define('BASE_PATH', realpath(dirname(__FILE__)) . '/'); |
|
| 12 | - |
|
| 13 | 10 | \ No newline at end of file |
| 11 | + // Defines the base path on the server, terminated by a slash |
|
| 12 | + define('BASE_PATH', realpath(dirname(__FILE__)) . '/'); |
|
| 13 | + |
|
| 14 | 14 | \ No newline at end of file |
@@ -4,53 +4,53 @@ |
||
| 4 | 4 | * Plugin which will enable desktop notifications for new mails |
| 5 | 5 | */ |
| 6 | 6 | class PluginArchive extends Plugin { |
| 7 | - /** |
|
| 8 | - * Function initializes the Plugin and registers all hooks |
|
| 9 | - */ |
|
| 10 | - function init() { |
|
| 11 | - $this->registerHook('server.core.settings.init.before'); |
|
| 12 | - } |
|
| 7 | + /** |
|
| 8 | + * Function initializes the Plugin and registers all hooks |
|
| 9 | + */ |
|
| 10 | + function init() { |
|
| 11 | + $this->registerHook('server.core.settings.init.before'); |
|
| 12 | + } |
|
| 13 | 13 | |
| 14 | - /** |
|
| 15 | - * Function is executed when a hook is triggered by the PluginManager |
|
| 16 | - * |
|
| 17 | - * @param string $eventID the id of the triggered hook |
|
| 18 | - * @param mixed $data object(s) related to the hook |
|
| 19 | - */ |
|
| 20 | - function execute($eventID, &$data) { |
|
| 21 | - switch($eventID) { |
|
| 22 | - case 'server.core.settings.init.before' : |
|
| 23 | - $this->injectPluginSettings($data); |
|
| 24 | - break; |
|
| 25 | - } |
|
| 26 | - } |
|
| 14 | + /** |
|
| 15 | + * Function is executed when a hook is triggered by the PluginManager |
|
| 16 | + * |
|
| 17 | + * @param string $eventID the id of the triggered hook |
|
| 18 | + * @param mixed $data object(s) related to the hook |
|
| 19 | + */ |
|
| 20 | + function execute($eventID, &$data) { |
|
| 21 | + switch($eventID) { |
|
| 22 | + case 'server.core.settings.init.before' : |
|
| 23 | + $this->injectPluginSettings($data); |
|
| 24 | + break; |
|
| 25 | + } |
|
| 26 | + } |
|
| 27 | 27 | |
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * Called when the core Settings class is initialized and ready to accept sysadmin default |
|
| 31 | - * settings. Registers the sysadmin defaults for the desktopnotifications plugin. |
|
| 32 | - * @param Array $data Reference to the data of the triggered hook |
|
| 33 | - */ |
|
| 34 | - function injectPluginSettings(&$data) { |
|
| 29 | + /** |
|
| 30 | + * Called when the core Settings class is initialized and ready to accept sysadmin default |
|
| 31 | + * settings. Registers the sysadmin defaults for the desktopnotifications plugin. |
|
| 32 | + * @param Array $data Reference to the data of the triggered hook |
|
| 33 | + */ |
|
| 34 | + function injectPluginSettings(&$data) { |
|
| 35 | 35 | |
| 36 | - $defaultIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjYuMDA5IiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMi42MTMxIiBkPSJNNC4yMTMgMy4wMDVjLS4zMjggMC0uNjE0LjEwMy0uODQuMzQ4LS4yNDYuMjQ2LS4zNjguNTMyLS4zNjguODR2MjguNDQ2YzAgLjMwO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| - 'button-title' => _('Archive'), |
|
| 40 | - 'url' => PLUGIN_ARCHIVE_URL, |
|
| 41 | - 'autostart' => defined('PLUGIN_ARCHIVE_AUTOSTART') ? !!PLUGIN_ARCHIVE_AUTOSTART : false, |
|
| 42 | - 'icon' => $defaultIcon |
|
| 43 | - ); |
|
| 36 | + $defaultIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjYuMDA5IiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMi42MTMxIiBkPSJNNC4yMTMgMy4wMDVjLS4zMjggMC0uNjE0LjEwMy0uODQuMzQ4LS4yNDYuMjQ2LS4zNjguNTMyLS4zNjguODR2MjguNDQ2YzAgLjMwOC4xMjIuNTczLjM2OC43NzguMjI2LjIwNS41MTIuMzA4Ljg0LjMwOGgxMjAuNDYzYy4zMjggMCAuNjE0LS4xMDMuODQtLjMwOC4yNDYtLjIwNS4zNjgtLjQ3MS4zNjgtLjc3OFY0LjE5MmMwLS4zMDgtLjEyMi0uNTk0LS4zNjgtLjg0LS4yMjYtLjI0NS0uNTEyLS4zNDgtLjg0LS4zNDhINC4yMTN2LjAwMXptNiAzMC43OTNjLS4yMzUgMC0uNDcxLjEwMy0uNjc1LjMwNy0uMTg1LjIwNS0uMjg3LjQ0LS4yODcuNjU2djc3LjQ0MmMwIC4yMTYuMTAzLjQ1MS4yODcuNjU1YS45MS45MSAwIDAgMCAuNjc1LjI4N2gxMDguNDYyYS45MS45MSAwIDAgMCAuNjc2LS4yODdjLjE4NS0uMjA0LjI4Ny0uNDMuMjg3LS42NTVWMzQuNzYxYzAtLjIyNi0uMTAzLS40NTEtLjI4Ny0uNjU2LS4yMDQtLjIwNC0uNDM5LS4zMDctLjY3Ni0uMzA3SDEwLjIxM2gwem0zNy43ODYgMTguNDNIODAuODljMS43NjIgMCAzLjI1Ny42MTQgNC40ODUgMS44NDQgMS4yNDkgMS4yNDkgMS44NjMgMi43NDQgMS44NjMgNC41MDVoMGMwIDEuNzYxLS42MTQgMy4yNzctMS44NjMgNC41NjctMS4yMjkgMS4yNy0yLjcyNSAxLjkyNS00LjQ4NSAxLjkyNUg0Ny45OTljLTEuNzYxIDAtMy4yNTctLjY1NS00LjQ4NS0xLjkyNS0xLjI0OS0xLjI5LTEuODYzLTIuODA3LTEuODYzLTQuNTY3aDBjMC0xLjc2MS42MTQtMy4yNTYgMS44NjMtNC41MDUgMS4yMjgtMS4yMyAyLjcyMy0xLjg0NCA0LjQ4NS0xLjg0NGgweiIgZmlsbD0iIzZkNmQ3MCIvPjwvc3ZnPgo='; |
|
| 37 | + $pluginData = array( |
|
| 38 | + 'enable' => PLUGIN_ARCHIVE_USER_DEFAULT_ENABLE, |
|
| 39 | + 'button-title' => _('Archive'), |
|
| 40 | + 'url' => PLUGIN_ARCHIVE_URL, |
|
| 41 | + 'autostart' => defined('PLUGIN_ARCHIVE_AUTOSTART') ? !!PLUGIN_ARCHIVE_AUTOSTART : false, |
|
| 42 | + 'icon' => $defaultIcon |
|
| 43 | + ); |
|
| 44 | 44 | |
| 45 | - $data['settingsObj']->addSysAdminDefaults(Array( |
|
| 46 | - 'zarafa' => Array( |
|
| 47 | - 'v1' => Array( |
|
| 48 | - 'plugins' => Array( |
|
| 49 | - 'archive' => $pluginData |
|
| 50 | - ) |
|
| 51 | - ) |
|
| 52 | - ) |
|
| 53 | - )); |
|
| 54 | - } |
|
| 45 | + $data['settingsObj']->addSysAdminDefaults(Array( |
|
| 46 | + 'zarafa' => Array( |
|
| 47 | + 'v1' => Array( |
|
| 48 | + 'plugins' => Array( |
|
| 49 | + 'archive' => $pluginData |
|
| 50 | + ) |
|
| 51 | + ) |
|
| 52 | + ) |
|
| 53 | + )); |
|
| 54 | + } |
|
| 55 | 55 | } |
| 56 | 56 | ?> |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | * @param mixed $data object(s) related to the hook |
| 19 | 19 | */ |
| 20 | 20 | function execute($eventID, &$data) { |
| 21 | - switch($eventID) { |
|
| 21 | + switch ($eventID) { |
|
| 22 | 22 | case 'server.core.settings.init.before' : |
| 23 | 23 | $this->injectPluginSettings($data); |
| 24 | 24 | break; |
@@ -7,47 +7,47 @@ |
||
| 7 | 7 | |
| 8 | 8 | class Pluginpasswd extends Plugin { |
| 9 | 9 | |
| 10 | - public function __construct() {} |
|
| 10 | + public function __construct() {} |
|
| 11 | 11 | |
| 12 | - /** |
|
| 13 | - * Function initializes the Plugin and registers all hooks |
|
| 14 | - */ |
|
| 15 | - function init() { |
|
| 16 | - $this->registerHook('server.core.settings.init.before'); |
|
| 17 | - } |
|
| 12 | + /** |
|
| 13 | + * Function initializes the Plugin and registers all hooks |
|
| 14 | + */ |
|
| 15 | + function init() { |
|
| 16 | + $this->registerHook('server.core.settings.init.before'); |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * Function is executed when a hook is triggered by the PluginManager |
|
| 21 | - * |
|
| 22 | - * @param string $eventID the id of the triggered hook |
|
| 23 | - * @param mixed $data object(s) related to the hook |
|
| 24 | - */ |
|
| 25 | - function execute($eventID, &$data) { |
|
| 26 | - switch($eventID) { |
|
| 27 | - case 'server.core.settings.init.before' : |
|
| 28 | - $this->injectPluginSettings($data); |
|
| 29 | - break; |
|
| 30 | - } |
|
| 31 | - } |
|
| 19 | + /** |
|
| 20 | + * Function is executed when a hook is triggered by the PluginManager |
|
| 21 | + * |
|
| 22 | + * @param string $eventID the id of the triggered hook |
|
| 23 | + * @param mixed $data object(s) related to the hook |
|
| 24 | + */ |
|
| 25 | + function execute($eventID, &$data) { |
|
| 26 | + switch($eventID) { |
|
| 27 | + case 'server.core.settings.init.before' : |
|
| 28 | + $this->injectPluginSettings($data); |
|
| 29 | + break; |
|
| 30 | + } |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Called when the core Settings class is initialized and ready to accept sysadmin default |
|
| 35 | - * settings. Registers the sysadmin defaults for the SugarCRM plugin. |
|
| 36 | - * @param Array $data Reference to the data of the triggered hook |
|
| 37 | - */ |
|
| 38 | - function injectPluginSettings(&$data) { |
|
| 39 | - $data['settingsObj']->addSysAdminDefaults(Array( |
|
| 40 | - 'zarafa' => Array( |
|
| 41 | - 'v1' => Array( |
|
| 42 | - 'plugins' => Array( |
|
| 43 | - 'passwd' => Array( |
|
| 44 | - 'enable' => PLUGIN_PASSWD_USER_DEFAULT_ENABLE, |
|
| 45 | - 'enable_strict_check' => PLUGIN_PASSWD_STRICT_CHECK_ENABLE, |
|
| 46 | - ) |
|
| 47 | - ) |
|
| 48 | - ) |
|
| 49 | - ) |
|
| 50 | - )); |
|
| 51 | - } |
|
| 33 | + /** |
|
| 34 | + * Called when the core Settings class is initialized and ready to accept sysadmin default |
|
| 35 | + * settings. Registers the sysadmin defaults for the SugarCRM plugin. |
|
| 36 | + * @param Array $data Reference to the data of the triggered hook |
|
| 37 | + */ |
|
| 38 | + function injectPluginSettings(&$data) { |
|
| 39 | + $data['settingsObj']->addSysAdminDefaults(Array( |
|
| 40 | + 'zarafa' => Array( |
|
| 41 | + 'v1' => Array( |
|
| 42 | + 'plugins' => Array( |
|
| 43 | + 'passwd' => Array( |
|
| 44 | + 'enable' => PLUGIN_PASSWD_USER_DEFAULT_ENABLE, |
|
| 45 | + 'enable_strict_check' => PLUGIN_PASSWD_STRICT_CHECK_ENABLE, |
|
| 46 | + ) |
|
| 47 | + ) |
|
| 48 | + ) |
|
| 49 | + ) |
|
| 50 | + )); |
|
| 51 | + } |
|
| 52 | 52 | } |
| 53 | 53 | ?> |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | * @param mixed $data object(s) related to the hook |
| 24 | 24 | */ |
| 25 | 25 | function execute($eventID, &$data) { |
| 26 | - switch($eventID) { |
|
| 26 | + switch ($eventID) { |
|
| 27 | 27 | case 'server.core.settings.init.before' : |
| 28 | 28 | $this->injectPluginSettings($data); |
| 29 | 29 | break; |
@@ -5,169 +5,169 @@ |
||
| 5 | 5 | */ |
| 6 | 6 | class PasswdModule extends Module |
| 7 | 7 | { |
| 8 | - /** |
|
| 9 | - * Process the incoming events that were fire by the client. |
|
| 10 | - */ |
|
| 11 | - public function execute() |
|
| 12 | - { |
|
| 13 | - foreach($this->data as $actionType => $actionData) |
|
| 14 | - { |
|
| 15 | - if(isset($actionType)) { |
|
| 16 | - try { |
|
| 17 | - switch($actionType) |
|
| 18 | - { |
|
| 19 | - case 'save': |
|
| 20 | - $this->save($actionData); |
|
| 21 | - break; |
|
| 22 | - default: |
|
| 23 | - $this->handleUnknownActionType($actionType); |
|
| 24 | - } |
|
| 25 | - } catch (MAPIException $e) { |
|
| 26 | - $this->sendFeedback(false, $this->errorDetailsFromException($e)); |
|
| 27 | - } |
|
| 8 | + /** |
|
| 9 | + * Process the incoming events that were fire by the client. |
|
| 10 | + */ |
|
| 11 | + public function execute() |
|
| 12 | + { |
|
| 13 | + foreach($this->data as $actionType => $actionData) |
|
| 14 | + { |
|
| 15 | + if(isset($actionType)) { |
|
| 16 | + try { |
|
| 17 | + switch($actionType) |
|
| 18 | + { |
|
| 19 | + case 'save': |
|
| 20 | + $this->save($actionData); |
|
| 21 | + break; |
|
| 22 | + default: |
|
| 23 | + $this->handleUnknownActionType($actionType); |
|
| 24 | + } |
|
| 25 | + } catch (MAPIException $e) { |
|
| 26 | + $this->sendFeedback(false, $this->errorDetailsFromException($e)); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - } |
|
| 30 | - } |
|
| 31 | - } |
|
| 29 | + } |
|
| 30 | + } |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Change the password of user. Do some calidation and call proper methods based on |
|
| 35 | - * zarafa setup. |
|
| 36 | - * @param {Array} $data data sent by client. |
|
| 37 | - */ |
|
| 38 | - public function save($data) |
|
| 39 | - { |
|
| 40 | - $errorMessage = ''; |
|
| 33 | + /** |
|
| 34 | + * Change the password of user. Do some calidation and call proper methods based on |
|
| 35 | + * zarafa setup. |
|
| 36 | + * @param {Array} $data data sent by client. |
|
| 37 | + */ |
|
| 38 | + public function save($data) |
|
| 39 | + { |
|
| 40 | + $errorMessage = ''; |
|
| 41 | 41 | |
| 42 | - // some sanity checks |
|
| 43 | - if(empty($data)) { |
|
| 44 | - $errorMessage = _('No data received.'); |
|
| 45 | - } |
|
| 42 | + // some sanity checks |
|
| 43 | + if(empty($data)) { |
|
| 44 | + $errorMessage = _('No data received.'); |
|
| 45 | + } |
|
| 46 | 46 | |
| 47 | - if(empty($data['username'])) { |
|
| 48 | - $errorMessage = _('Account is empty.'); |
|
| 49 | - } |
|
| 47 | + if(empty($data['username'])) { |
|
| 48 | + $errorMessage = _('Account is empty.'); |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | - if(empty($data['current_password'])) { |
|
| 52 | - $errorMessage = _('Current password is empty.'); |
|
| 53 | - } |
|
| 51 | + if(empty($data['current_password'])) { |
|
| 52 | + $errorMessage = _('Current password is empty.'); |
|
| 53 | + } |
|
| 54 | 54 | |
| 55 | - if(empty($data['new_password']) || empty($data['new_password_repeat'])) { |
|
| 56 | - $errorMessage = _('New password is empty.'); |
|
| 57 | - } |
|
| 55 | + if(empty($data['new_password']) || empty($data['new_password_repeat'])) { |
|
| 56 | + $errorMessage = _('New password is empty.'); |
|
| 57 | + } |
|
| 58 | 58 | |
| 59 | - if($data['new_password'] !== $data['new_password_repeat']) { |
|
| 60 | - $errorMessage = _('New passwords do not match.'); |
|
| 61 | - } |
|
| 59 | + if($data['new_password'] !== $data['new_password_repeat']) { |
|
| 60 | + $errorMessage = _('New passwords do not match.'); |
|
| 61 | + } |
|
| 62 | 62 | |
| 63 | - if(empty($errorMessage)) { |
|
| 64 | - $this->saveInDB($data); |
|
| 65 | - } else { |
|
| 66 | - $this->sendFeedback(false, array( |
|
| 67 | - 'type' => ERROR_ZARAFA, |
|
| 68 | - 'info' => array( |
|
| 69 | - 'display_message' => $errorMessage |
|
| 70 | - ) |
|
| 71 | - )); |
|
| 72 | - } |
|
| 73 | - } |
|
| 63 | + if(empty($errorMessage)) { |
|
| 64 | + $this->saveInDB($data); |
|
| 65 | + } else { |
|
| 66 | + $this->sendFeedback(false, array( |
|
| 67 | + 'type' => ERROR_ZARAFA, |
|
| 68 | + 'info' => array( |
|
| 69 | + 'display_message' => $errorMessage |
|
| 70 | + ) |
|
| 71 | + )); |
|
| 72 | + } |
|
| 73 | + } |
|
| 74 | 74 | |
| 75 | 75 | |
| 76 | - /** |
|
| 77 | - * Function will try to change user's password via MAPI in SOAP connection. |
|
| 78 | - * @param {Array} $data data sent by client. |
|
| 79 | - */ |
|
| 80 | - public function saveInDB($data) |
|
| 81 | - { |
|
| 82 | - $errorMessage = ''; |
|
| 83 | - $userName = $data['username']; |
|
| 84 | - $newPassword = $data['new_password']; |
|
| 85 | - $sessionPass = ''; |
|
| 76 | + /** |
|
| 77 | + * Function will try to change user's password via MAPI in SOAP connection. |
|
| 78 | + * @param {Array} $data data sent by client. |
|
| 79 | + */ |
|
| 80 | + public function saveInDB($data) |
|
| 81 | + { |
|
| 82 | + $errorMessage = ''; |
|
| 83 | + $userName = $data['username']; |
|
| 84 | + $newPassword = $data['new_password']; |
|
| 85 | + $sessionPass = ''; |
|
| 86 | 86 | |
| 87 | - // get current session password |
|
| 88 | - // if this plugin is used on a webapp version with EncryptionStore, |
|
| 89 | - // $_SESSION['password'] is no longer available. Uses EncryptionStore |
|
| 90 | - // in this case. |
|
| 91 | - if(class_exists("EncryptionStore")) { |
|
| 92 | - $encryptionStore = EncryptionStore::getInstance(); |
|
| 93 | - $sessionPass = $encryptionStore->get("password"); |
|
| 94 | - } |
|
| 87 | + // get current session password |
|
| 88 | + // if this plugin is used on a webapp version with EncryptionStore, |
|
| 89 | + // $_SESSION['password'] is no longer available. Uses EncryptionStore |
|
| 90 | + // in this case. |
|
| 91 | + if(class_exists("EncryptionStore")) { |
|
| 92 | + $encryptionStore = EncryptionStore::getInstance(); |
|
| 93 | + $sessionPass = $encryptionStore->get("password"); |
|
| 94 | + } |
|
| 95 | 95 | |
| 96 | - if ($data['current_password'] !== $sessionPass) { |
|
| 97 | - $errorMessage = _('Current password does not match.'); |
|
| 98 | - } else if (defined('PLUGIN_PASSWD_USE_ZCORE') && PLUGIN_PASSWD_USE_ZCORE) { |
|
| 99 | - try { |
|
| 100 | - $result = nsp_setuserpasswd($userName, $sessionPass, $newPassword); |
|
| 101 | - // password changed successfully |
|
| 102 | - if ($result) { |
|
| 103 | - $this->sendFeedback(true, array( |
|
| 104 | - 'info' => array( |
|
| 105 | - 'display_message' => _('Password is changed successfully.') |
|
| 106 | - ) |
|
| 107 | - )); |
|
| 108 | - // write new password to session because we don't want user to re-authenticate |
|
| 109 | - session_start(); |
|
| 110 | - $encryptionStore = EncryptionStore::getInstance(); |
|
| 111 | - $encryptionStore->add('password', $newPassword); |
|
| 112 | - session_write_close(); |
|
| 113 | - return; |
|
| 114 | - } |
|
| 115 | - } catch (MAPIException $e) { |
|
| 116 | - if (MAPI_E_NO_ACCESS == mapi_last_hresult()) { |
|
| 117 | - $errorMessage = _('Your password is wrong or you have insufficient permission to change password'); |
|
| 118 | - } |
|
| 119 | - } |
|
| 120 | - if (empty($errorMessage)) { |
|
| 121 | - $errorMessage = _('Password is not changed.'); |
|
| 122 | - } |
|
| 123 | - } else { |
|
| 124 | - $url = (defined('PLUGIN_PASSWD_ADMIN_API_ENDPOINT') && PLUGIN_PASSWD_ADMIN_API_ENDPOINT) ? |
|
| 125 | - PLUGIN_PASSWD_ADMIN_API_ENDPOINT : |
|
| 126 | - 'http://[::1]:8080/api/v1/passwd'; |
|
| 127 | - $result = file_get_contents($url, false, stream_context_create([ |
|
| 128 | - 'http' => [ |
|
| 129 | - 'header' => [ |
|
| 130 | - 'Content-type: application/json', |
|
| 131 | - ], |
|
| 132 | - 'method' => 'PUT', |
|
| 133 | - 'content' => json_encode([ |
|
| 134 | - "user" => $userName, |
|
| 135 | - "old" => $data['current_password'], |
|
| 136 | - "new" => $newPassword |
|
| 137 | - ]) |
|
| 138 | - ] |
|
| 139 | - ])); |
|
| 96 | + if ($data['current_password'] !== $sessionPass) { |
|
| 97 | + $errorMessage = _('Current password does not match.'); |
|
| 98 | + } else if (defined('PLUGIN_PASSWD_USE_ZCORE') && PLUGIN_PASSWD_USE_ZCORE) { |
|
| 99 | + try { |
|
| 100 | + $result = nsp_setuserpasswd($userName, $sessionPass, $newPassword); |
|
| 101 | + // password changed successfully |
|
| 102 | + if ($result) { |
|
| 103 | + $this->sendFeedback(true, array( |
|
| 104 | + 'info' => array( |
|
| 105 | + 'display_message' => _('Password is changed successfully.') |
|
| 106 | + ) |
|
| 107 | + )); |
|
| 108 | + // write new password to session because we don't want user to re-authenticate |
|
| 109 | + session_start(); |
|
| 110 | + $encryptionStore = EncryptionStore::getInstance(); |
|
| 111 | + $encryptionStore->add('password', $newPassword); |
|
| 112 | + session_write_close(); |
|
| 113 | + return; |
|
| 114 | + } |
|
| 115 | + } catch (MAPIException $e) { |
|
| 116 | + if (MAPI_E_NO_ACCESS == mapi_last_hresult()) { |
|
| 117 | + $errorMessage = _('Your password is wrong or you have insufficient permission to change password'); |
|
| 118 | + } |
|
| 119 | + } |
|
| 120 | + if (empty($errorMessage)) { |
|
| 121 | + $errorMessage = _('Password is not changed.'); |
|
| 122 | + } |
|
| 123 | + } else { |
|
| 124 | + $url = (defined('PLUGIN_PASSWD_ADMIN_API_ENDPOINT') && PLUGIN_PASSWD_ADMIN_API_ENDPOINT) ? |
|
| 125 | + PLUGIN_PASSWD_ADMIN_API_ENDPOINT : |
|
| 126 | + 'http://[::1]:8080/api/v1/passwd'; |
|
| 127 | + $result = file_get_contents($url, false, stream_context_create([ |
|
| 128 | + 'http' => [ |
|
| 129 | + 'header' => [ |
|
| 130 | + 'Content-type: application/json', |
|
| 131 | + ], |
|
| 132 | + 'method' => 'PUT', |
|
| 133 | + 'content' => json_encode([ |
|
| 134 | + "user" => $userName, |
|
| 135 | + "old" => $data['current_password'], |
|
| 136 | + "new" => $newPassword |
|
| 137 | + ]) |
|
| 138 | + ] |
|
| 139 | + ])); |
|
| 140 | 140 | |
| 141 | - if ($result === false) { |
|
| 142 | - $errorMessage = _('Error changing password. Please contact the system administrator.'); |
|
| 143 | - } |
|
| 144 | - else { |
|
| 145 | - $this->sendFeedback(true, array( |
|
| 146 | - 'info' => array( |
|
| 147 | - 'display_message' => _('Password has been changed successfully.') |
|
| 148 | - ) |
|
| 149 | - )); |
|
| 150 | - // write new password to session because we don't want user to re-authenticate |
|
| 151 | - session_start(); |
|
| 152 | - $encryptionStore = EncryptionStore::getInstance(); |
|
| 153 | - $encryptionStore->add('password', $newPassword); |
|
| 154 | - session_write_close(); |
|
| 155 | - return; |
|
| 156 | - } |
|
| 157 | - if (empty($errorMessage)) { |
|
| 158 | - $errorMessage = _('Password is not changed.'); |
|
| 159 | - } |
|
| 160 | - } |
|
| 141 | + if ($result === false) { |
|
| 142 | + $errorMessage = _('Error changing password. Please contact the system administrator.'); |
|
| 143 | + } |
|
| 144 | + else { |
|
| 145 | + $this->sendFeedback(true, array( |
|
| 146 | + 'info' => array( |
|
| 147 | + 'display_message' => _('Password has been changed successfully.') |
|
| 148 | + ) |
|
| 149 | + )); |
|
| 150 | + // write new password to session because we don't want user to re-authenticate |
|
| 151 | + session_start(); |
|
| 152 | + $encryptionStore = EncryptionStore::getInstance(); |
|
| 153 | + $encryptionStore->add('password', $newPassword); |
|
| 154 | + session_write_close(); |
|
| 155 | + return; |
|
| 156 | + } |
|
| 157 | + if (empty($errorMessage)) { |
|
| 158 | + $errorMessage = _('Password is not changed.'); |
|
| 159 | + } |
|
| 160 | + } |
|
| 161 | 161 | |
| 162 | - if(!empty($errorMessage)) { |
|
| 163 | - $this->sendFeedback(false, array( |
|
| 164 | - 'type' => ERROR_ZARAFA, |
|
| 165 | - 'info' => array( |
|
| 166 | - 'display_message' => $errorMessage |
|
| 167 | - ) |
|
| 168 | - )); |
|
| 169 | - } |
|
| 170 | - } |
|
| 162 | + if(!empty($errorMessage)) { |
|
| 163 | + $this->sendFeedback(false, array( |
|
| 164 | + 'type' => ERROR_ZARAFA, |
|
| 165 | + 'info' => array( |
|
| 166 | + 'display_message' => $errorMessage |
|
| 167 | + ) |
|
| 168 | + )); |
|
| 169 | + } |
|
| 170 | + } |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | ?> |
@@ -10,11 +10,11 @@ discard block |
||
| 10 | 10 | */ |
| 11 | 11 | public function execute() |
| 12 | 12 | { |
| 13 | - foreach($this->data as $actionType => $actionData) |
|
| 13 | + foreach ($this->data as $actionType => $actionData) |
|
| 14 | 14 | { |
| 15 | - if(isset($actionType)) { |
|
| 15 | + if (isset($actionType)) { |
|
| 16 | 16 | try { |
| 17 | - switch($actionType) |
|
| 17 | + switch ($actionType) |
|
| 18 | 18 | { |
| 19 | 19 | case 'save': |
| 20 | 20 | $this->save($actionData); |
@@ -40,27 +40,27 @@ discard block |
||
| 40 | 40 | $errorMessage = ''; |
| 41 | 41 | |
| 42 | 42 | // some sanity checks |
| 43 | - if(empty($data)) { |
|
| 43 | + if (empty($data)) { |
|
| 44 | 44 | $errorMessage = _('No data received.'); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - if(empty($data['username'])) { |
|
| 47 | + if (empty($data['username'])) { |
|
| 48 | 48 | $errorMessage = _('Account is empty.'); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - if(empty($data['current_password'])) { |
|
| 51 | + if (empty($data['current_password'])) { |
|
| 52 | 52 | $errorMessage = _('Current password is empty.'); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - if(empty($data['new_password']) || empty($data['new_password_repeat'])) { |
|
| 55 | + if (empty($data['new_password']) || empty($data['new_password_repeat'])) { |
|
| 56 | 56 | $errorMessage = _('New password is empty.'); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - if($data['new_password'] !== $data['new_password_repeat']) { |
|
| 59 | + if ($data['new_password'] !== $data['new_password_repeat']) { |
|
| 60 | 60 | $errorMessage = _('New passwords do not match.'); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - if(empty($errorMessage)) { |
|
| 63 | + if (empty($errorMessage)) { |
|
| 64 | 64 | $this->saveInDB($data); |
| 65 | 65 | } else { |
| 66 | 66 | $this->sendFeedback(false, array( |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | // if this plugin is used on a webapp version with EncryptionStore, |
| 89 | 89 | // $_SESSION['password'] is no longer available. Uses EncryptionStore |
| 90 | 90 | // in this case. |
| 91 | - if(class_exists("EncryptionStore")) { |
|
| 91 | + if (class_exists("EncryptionStore")) { |
|
| 92 | 92 | $encryptionStore = EncryptionStore::getInstance(); |
| 93 | 93 | $sessionPass = $encryptionStore->get("password"); |
| 94 | 94 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | - if(!empty($errorMessage)) { |
|
| 162 | + if (!empty($errorMessage)) { |
|
| 163 | 163 | $this->sendFeedback(false, array( |
| 164 | 164 | 'type' => ERROR_ZARAFA, |
| 165 | 165 | 'info' => array( |
@@ -140,8 +140,7 @@ |
||
| 140 | 140 | |
| 141 | 141 | if ($result === false) { |
| 142 | 142 | $errorMessage = _('Error changing password. Please contact the system administrator.'); |
| 143 | - } |
|
| 144 | - else { |
|
| 143 | + } else { |
|
| 145 | 144 | $this->sendFeedback(true, array( |
| 146 | 145 | 'info' => array( |
| 147 | 146 | 'display_message' => _('Password has been changed successfully.') |
@@ -4,62 +4,62 @@ |
||
| 4 | 4 | * Plugin which will enable desktop notifications for new mails |
| 5 | 5 | */ |
| 6 | 6 | class Pluginintranet extends Plugin { |
| 7 | - /** |
|
| 8 | - * Function initializes the Plugin and registers all hooks |
|
| 9 | - */ |
|
| 10 | - function init() { |
|
| 11 | - $this->registerHook('server.core.settings.init.before'); |
|
| 12 | - } |
|
| 7 | + /** |
|
| 8 | + * Function initializes the Plugin and registers all hooks |
|
| 9 | + */ |
|
| 10 | + function init() { |
|
| 11 | + $this->registerHook('server.core.settings.init.before'); |
|
| 12 | + } |
|
| 13 | 13 | |
| 14 | - /** |
|
| 15 | - * Function is executed when a hook is triggered by the PluginManager |
|
| 16 | - * |
|
| 17 | - * @param string $eventID the id of the triggered hook |
|
| 18 | - * @param mixed $data object(s) related to the hook |
|
| 19 | - */ |
|
| 20 | - function execute($eventID, &$data) { |
|
| 21 | - switch($eventID) { |
|
| 22 | - case 'server.core.settings.init.before' : |
|
| 23 | - $this->injectPluginSettings($data); |
|
| 24 | - break; |
|
| 25 | - } |
|
| 26 | - } |
|
| 14 | + /** |
|
| 15 | + * Function is executed when a hook is triggered by the PluginManager |
|
| 16 | + * |
|
| 17 | + * @param string $eventID the id of the triggered hook |
|
| 18 | + * @param mixed $data object(s) related to the hook |
|
| 19 | + */ |
|
| 20 | + function execute($eventID, &$data) { |
|
| 21 | + switch($eventID) { |
|
| 22 | + case 'server.core.settings.init.before' : |
|
| 23 | + $this->injectPluginSettings($data); |
|
| 24 | + break; |
|
| 25 | + } |
|
| 26 | + } |
|
| 27 | 27 | |
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * Called when the core Settings class is initialized and ready to accept sysadmin default |
|
| 31 | - * settings. Registers the sysadmin defaults for the desktopnotifications plugin. |
|
| 32 | - * @param Array $data Reference to the data of the triggered hook |
|
| 33 | - */ |
|
| 34 | - function injectPluginSettings(&$data) { |
|
| 29 | + /** |
|
| 30 | + * Called when the core Settings class is initialized and ready to accept sysadmin default |
|
| 31 | + * settings. Registers the sysadmin defaults for the desktopnotifications plugin. |
|
| 32 | + * @param Array $data Reference to the data of the triggered hook |
|
| 33 | + */ |
|
| 34 | + function injectPluginSettings(&$data) { |
|
| 35 | 35 | |
| 36 | - $defaultIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0ia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My40NEgxMS44OUE1NC4xNiA1NC4xNiAwIDAgMCA5IDM2LjYzczAgLjA3LS4wNy4xYTQ5LjkxIDQ5LjkxIDAgMCAwLTMgOS42NSA1MS40NiA1MS40NiAwIDAgMC0xIDcuOTN6TTE1LjEzIDI1LjloMTYuNTlBMTE3LjcyIDExNy43MiAwIDAgMSA1MC40NiA1LjM1Yy0xLjM5LjE3LTIuNzYuMzctNC4wOC42NWE0OC4zNiA0OC4zNiAwIDAgMC05Ljc1IDMgNTUuMjQgNTUuMjQgMCAwIDAtOC44OSA0LjggNTEuNSA1MS41IDAgMCAwLTEyLjYxIDEyaDB6bTQ4LTIwLjU1QTExNC42MyAxMTQuNjMgMCAwIDEgODEuODggMjUuOWgxNi42YTQ4LjYzIDQ4LjYzIDAgMCAwLTUtNS43NiA0OS44MSA0OS44MSAwIDAgMC03LjYzLTYuMjdBNTMuMjcgNTMuMjcgMCAwIDAgNzcgOS4wNnMtLjA2IDAtLjEtLjA2YTQ5LjE1IDQ5LjE1IDAgMCAwLTkuNjQtM2MtMS4zNi0uMjctMi43My0uNDgtNC4wOS0uNjVoMHptLTMuODQgMy4yNFYyNS45aDE2LjQ5QTExNS42OCAxMTUuNjggMCAwIDAgNTkuMjkgOC41OXptLTUgOTYuNjNWODcuNzFIMzdhMTA1LjY3IDEwNS42NyAwIDAgMCAxNy4zNSAxNy41MXptMC03OS4zMlY4LjU5QTExNi4zIDExNi4zIDAgMCAwIDM3LjgyIDI1Ljl6IiBmaWxsPSIjMmI3OGMyIi8+PC9zdmc+Cg=='; |
|
| 37 | - $pluginData = array( |
|
| 38 | - 'enable' => PLUGIN_INTRANET_USER_DEFAULT_ENABLE, |
|
| 39 | - 'button-title' => PLUGIN_INTRANET_BUTTON_TITLE, |
|
| 40 | - 'url' => PLUGIN_INTRANET_URL, |
|
| 41 | - 'autostart' => defined('PLUGIN_INTRANET_AUTOSTART') ? !!PLUGIN_INTRANET_AUTOSTART : false, |
|
| 42 | - 'icon' => defined('PLUGI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|
|
| 40 | + 'url' => PLUGIN_INTRANET_URL, |
|
| 41 | + 'autostart' => defined('PLUGIN_INTRANET_AUTOSTART') ? !!PLUGIN_INTRANET_AUTOSTART : false, |
|
| 42 | + 'icon' => defined('PLUGIN_INTRANET_ICON') ? PATH_PLUGIN_DIR. '/intranet/' . PLUGIN_INTRANET_ICON : $defaultIcon |
|
| 43 | + ); |
|
| 44 | 44 | |
| 45 | - $i=1; |
|
| 46 | - while ( defined('PLUGIN_INTRANET_URL_'.$i) ){ |
|
| 47 | - $pluginData['button-title-'.$i] = constant('PLUGIN_INTRANET_BUTTON_TITLE_'.$i); |
|
| 48 | - $pluginData['url-'.$i] = constant('PLUGIN_INTRANET_URL_'.$i); |
|
| 49 | - $pluginData['autostart-'.$i] = defined('PLUGIN_INTRANET_AUTOSTART_'.$i) ? !!constant('PLUGIN_INTRANET_AUTOSTART_'.$i) : false; |
|
| 50 | - $pluginData['icon-'.$i] = defined('PLUGIN_INTRANET_ICON_'.$i) ? PATH_PLUGIN_DIR . '/intranet/' .constant('PLUGIN_INTRANET_ICON_'.$i) : $defaultIcon; |
|
| 51 | - $i++; |
|
| 52 | - } |
|
| 45 | + $i=1; |
|
| 46 | + while ( defined('PLUGIN_INTRANET_URL_'.$i) ){ |
|
| 47 | + $pluginData['button-title-'.$i] = constant('PLUGIN_INTRANET_BUTTON_TITLE_'.$i); |
|
| 48 | + $pluginData['url-'.$i] = constant('PLUGIN_INTRANET_URL_'.$i); |
|
| 49 | + $pluginData['autostart-'.$i] = defined('PLUGIN_INTRANET_AUTOSTART_'.$i) ? !!constant('PLUGIN_INTRANET_AUTOSTART_'.$i) : false; |
|
| 50 | + $pluginData['icon-'.$i] = defined('PLUGIN_INTRANET_ICON_'.$i) ? PATH_PLUGIN_DIR . '/intranet/' .constant('PLUGIN_INTRANET_ICON_'.$i) : $defaultIcon; |
|
| 51 | + $i++; |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - $data['settingsObj']->addSysAdminDefaults(Array( |
|
| 55 | - 'zarafa' => Array( |
|
| 56 | - 'v1' => Array( |
|
| 57 | - 'plugins' => Array( |
|
| 58 | - 'intranet' => $pluginData |
|
| 59 | - ) |
|
| 60 | - ) |
|
| 61 | - ) |
|
| 62 | - )); |
|
| 63 | - } |
|
| 54 | + $data['settingsObj']->addSysAdminDefaults(Array( |
|
| 55 | + 'zarafa' => Array( |
|
| 56 | + 'v1' => Array( |
|
| 57 | + 'plugins' => Array( |
|
| 58 | + 'intranet' => $pluginData |
|
| 59 | + ) |
|
| 60 | + ) |
|
| 61 | + ) |
|
| 62 | + )); |
|
| 63 | + } |
|
| 64 | 64 | } |
| 65 | 65 | ?> |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | * @param mixed $data object(s) related to the hook |
| 19 | 19 | */ |
| 20 | 20 | function execute($eventID, &$data) { |
| 21 | - switch($eventID) { |
|
| 21 | + switch ($eventID) { |
|
| 22 | 22 | case 'server.core.settings.init.before' : |
| 23 | 23 | $this->injectPluginSettings($data); |
| 24 | 24 | break; |
@@ -42,12 +42,12 @@ discard block |
||
| 42 | 42 | 'icon' => defined('PLUGIN_INTRANET_ICON') ? PATH_PLUGIN_DIR. '/intranet/' . PLUGIN_INTRANET_ICON : $defaultIcon |
| 43 | 43 | ); |
| 44 | 44 | |
| 45 | - $i=1; |
|
| 46 | - while ( defined('PLUGIN_INTRANET_URL_'.$i) ){ |
|
| 47 | - $pluginData['button-title-'.$i] = constant('PLUGIN_INTRANET_BUTTON_TITLE_'.$i); |
|
| 48 | - $pluginData['url-'.$i] = constant('PLUGIN_INTRANET_URL_'.$i); |
|
| 49 | - $pluginData['autostart-'.$i] = defined('PLUGIN_INTRANET_AUTOSTART_'.$i) ? !!constant('PLUGIN_INTRANET_AUTOSTART_'.$i) : false; |
|
| 50 | - $pluginData['icon-'.$i] = defined('PLUGIN_INTRANET_ICON_'.$i) ? PATH_PLUGIN_DIR . '/intranet/' .constant('PLUGIN_INTRANET_ICON_'.$i) : $defaultIcon; |
|
| 45 | + $i = 1; |
|
| 46 | + while (defined('PLUGIN_INTRANET_URL_' . $i)) { |
|
| 47 | + $pluginData['button-title-' . $i] = constant('PLUGIN_INTRANET_BUTTON_TITLE_' . $i); |
|
| 48 | + $pluginData['url-' . $i] = constant('PLUGIN_INTRANET_URL_' . $i); |
|
| 49 | + $pluginData['autostart-' . $i] = defined('PLUGIN_INTRANET_AUTOSTART_' . $i) ? !!constant('PLUGIN_INTRANET_AUTOSTART_' . $i) : false; |
|
| 50 | + $pluginData['icon-' . $i] = defined('PLUGIN_INTRANET_ICON_' . $i) ? PATH_PLUGIN_DIR . '/intranet/' . constant('PLUGIN_INTRANET_ICON_' . $i) : $defaultIcon; |
|
| 51 | 51 | $i++; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -1,42 +1,42 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class Pluginmeet extends Plugin{ |
| 3 | 3 | |
| 4 | - function init(){ |
|
| 4 | + function init(){ |
|
| 5 | 5 | $this->registerHook('server.core.settings.init.before'); |
| 6 | - } |
|
| 6 | + } |
|
| 7 | 7 | |
| 8 | - /** |
|
| 9 | - * Function is executed when a hook is triggered by the PluginManager |
|
| 10 | - * |
|
| 11 | - * @param string $eventID the id of the triggered hook |
|
| 12 | - * @param mixed $data object(s) related to the hook |
|
| 13 | - */ |
|
| 14 | - function execute($eventID, &$data){ |
|
| 8 | + /** |
|
| 9 | + * Function is executed when a hook is triggered by the PluginManager |
|
| 10 | + * |
|
| 11 | + * @param string $eventID the id of the triggered hook |
|
| 12 | + * @param mixed $data object(s) related to the hook |
|
| 13 | + */ |
|
| 14 | + function execute($eventID, &$data){ |
|
| 15 | 15 | if($eventID == 'server.core.settings.init.before'){ |
| 16 | - $this->injectPluginSettings($data); |
|
| 16 | + $this->injectPluginSettings($data); |
|
| 17 | + } |
|
| 17 | 18 | } |
| 18 | - } |
|
| 19 | 19 | |
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * Called when the core Settings class is initialized and ready to accept sysadmin default |
|
| 23 | - * settings. |
|
| 24 | - * @param Array $data Reference to the data of the triggered hook |
|
| 25 | - */ |
|
| 26 | - function injectPluginSettings(&$data){ |
|
| 21 | + /** |
|
| 22 | + * Called when the core Settings class is initialized and ready to accept sysadmin default |
|
| 23 | + * settings. |
|
| 24 | + * @param Array $data Reference to the data of the triggered hook |
|
| 25 | + */ |
|
| 26 | + function injectPluginSettings(&$data){ |
|
| 27 | 27 | if(defined('MEET_DEFAULTS') && is_array(MEET_DEFAULTS)){ |
| 28 | - $data['settingsObj']->addSysAdminDefaults( |
|
| 28 | + $data['settingsObj']->addSysAdminDefaults( |
|
| 29 | 29 | Array( |
| 30 | - 'zarafa' => Array( |
|
| 30 | + 'zarafa' => Array( |
|
| 31 | 31 | 'v1' => Array( |
| 32 | - 'plugins' => Array( |
|
| 32 | + 'plugins' => Array( |
|
| 33 | 33 | 'meet' => MEET_DEFAULTS |
| 34 | - ) |
|
| 34 | + ) |
|
| 35 | + ) |
|
| 35 | 36 | ) |
| 36 | - ) |
|
| 37 | 37 | ) |
| 38 | - ); |
|
| 38 | + ); |
|
| 39 | + } |
|
| 39 | 40 | } |
| 40 | - } |
|
| 41 | 41 | } |
| 42 | 42 | ?> |
| 43 | 43 | \ No newline at end of file |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -class Pluginmeet extends Plugin{ |
|
| 2 | +class Pluginmeet extends Plugin { |
|
| 3 | 3 | |
| 4 | - function init(){ |
|
| 4 | + function init() { |
|
| 5 | 5 | $this->registerHook('server.core.settings.init.before'); |
| 6 | 6 | } |
| 7 | 7 | |
@@ -11,8 +11,8 @@ discard block |
||
| 11 | 11 | * @param string $eventID the id of the triggered hook |
| 12 | 12 | * @param mixed $data object(s) related to the hook |
| 13 | 13 | */ |
| 14 | - function execute($eventID, &$data){ |
|
| 15 | - if($eventID == 'server.core.settings.init.before'){ |
|
| 14 | + function execute($eventID, &$data) { |
|
| 15 | + if ($eventID == 'server.core.settings.init.before') { |
|
| 16 | 16 | $this->injectPluginSettings($data); |
| 17 | 17 | } |
| 18 | 18 | } |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | * settings. |
| 24 | 24 | * @param Array $data Reference to the data of the triggered hook |
| 25 | 25 | */ |
| 26 | - function injectPluginSettings(&$data){ |
|
| 27 | - if(defined('MEET_DEFAULTS') && is_array(MEET_DEFAULTS)){ |
|
| 26 | + function injectPluginSettings(&$data) { |
|
| 27 | + if (defined('MEET_DEFAULTS') && is_array(MEET_DEFAULTS)) { |
|
| 28 | 28 | $data['settingsObj']->addSysAdminDefaults( |
| 29 | 29 | Array( |
| 30 | 30 | 'zarafa' => Array( |
@@ -4,11 +4,11 @@ |
||
| 4 | 4 | |
| 5 | 5 | abstract class AbstractJSLoader |
| 6 | 6 | { |
| 7 | - protected $jsBuffer = ""; |
|
| 7 | + protected $jsBuffer = ""; |
|
| 8 | 8 | |
| 9 | - // path to js folder |
|
| 10 | - protected $JS_PATH; |
|
| 9 | + // path to js folder |
|
| 10 | + protected $JS_PATH; |
|
| 11 | 11 | |
| 12 | - // get combined javascript string |
|
| 13 | - abstract public function get_combined_js($debug = false); |
|
| 12 | + // get combined javascript string |
|
| 13 | + abstract public function get_combined_js($debug = false); |
|
| 14 | 14 | } |
| 15 | 15 | \ No newline at end of file |
@@ -3,19 +3,19 @@ |
||
| 3 | 3 | |
| 4 | 4 | interface iFeatureStreaming |
| 5 | 5 | { |
| 6 | - /** |
|
| 7 | - * Open a readable stream to a remote file |
|
| 8 | - * |
|
| 9 | - * @param string $path |
|
| 10 | - * @return resource a read only stream with the contents of the remote file |
|
| 11 | - */ |
|
| 12 | - public function getStreamreader($path); |
|
| 6 | + /** |
|
| 7 | + * Open a readable stream to a remote file |
|
| 8 | + * |
|
| 9 | + * @param string $path |
|
| 10 | + * @return resource a read only stream with the contents of the remote file |
|
| 11 | + */ |
|
| 12 | + public function getStreamreader($path); |
|
| 13 | 13 | |
| 14 | - /** |
|
| 15 | - * Open a writable stream to a remote file |
|
| 16 | - * |
|
| 17 | - * @param string $path |
|
| 18 | - * @return resource a write only stream to upload a remote file |
|
| 19 | - */ |
|
| 20 | - public function getStreamwriter($path); |
|
| 14 | + /** |
|
| 15 | + * Open a writable stream to a remote file |
|
| 16 | + * |
|
| 17 | + * @param string $path |
|
| 18 | + * @return resource a write only stream to upload a remote file |
|
| 19 | + */ |
|
| 20 | + public function getStreamwriter($path); |
|
| 21 | 21 | } |
| 22 | 22 | \ No newline at end of file |
@@ -4,71 +4,71 @@ |
||
| 4 | 4 | interface iFeatureSharing |
| 5 | 5 | { |
| 6 | 6 | |
| 7 | - /** |
|
| 8 | - * Get all shares in the specified folder |
|
| 9 | - * |
|
| 10 | - * Returned value should like: |
|
| 11 | - * |
|
| 12 | - * array( |
|
| 13 | - * path1 => array( |
|
| 14 | - * id1 => details1, |
|
| 15 | - * id2 => details2 |
|
| 16 | - * ), |
|
| 17 | - * path2 => array( |
|
| 18 | - * id1 => .... |
|
| 19 | - * ) |
|
| 20 | - * ) |
|
| 21 | - * |
|
| 22 | - * @param $path |
|
| 23 | - * @return array |
|
| 24 | - */ |
|
| 25 | - public function getShares($path); |
|
| 7 | + /** |
|
| 8 | + * Get all shares in the specified folder |
|
| 9 | + * |
|
| 10 | + * Returned value should like: |
|
| 11 | + * |
|
| 12 | + * array( |
|
| 13 | + * path1 => array( |
|
| 14 | + * id1 => details1, |
|
| 15 | + * id2 => details2 |
|
| 16 | + * ), |
|
| 17 | + * path2 => array( |
|
| 18 | + * id1 => .... |
|
| 19 | + * ) |
|
| 20 | + * ) |
|
| 21 | + * |
|
| 22 | + * @param $path |
|
| 23 | + * @return array |
|
| 24 | + */ |
|
| 25 | + public function getShares($path); |
|
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * Get details about the shared files/folders. |
|
| 29 | - * |
|
| 30 | - * Returned value should like: |
|
| 31 | - * |
|
| 32 | - * array( |
|
| 33 | - * path1 => array( |
|
| 34 | - * id1 => details1, |
|
| 35 | - * id2 => details2 |
|
| 36 | - * ), |
|
| 37 | - * path2 => array( |
|
| 38 | - * id1 => .... |
|
| 39 | - * ) |
|
| 40 | - * ) |
|
| 41 | - * |
|
| 42 | - * @param $patharray Simple array with path's to files or folders. |
|
| 43 | - * @return array |
|
| 44 | - */ |
|
| 45 | - public function sharingDetails($patharray); |
|
| 27 | + /** |
|
| 28 | + * Get details about the shared files/folders. |
|
| 29 | + * |
|
| 30 | + * Returned value should like: |
|
| 31 | + * |
|
| 32 | + * array( |
|
| 33 | + * path1 => array( |
|
| 34 | + * id1 => details1, |
|
| 35 | + * id2 => details2 |
|
| 36 | + * ), |
|
| 37 | + * path2 => array( |
|
| 38 | + * id1 => .... |
|
| 39 | + * ) |
|
| 40 | + * ) |
|
| 41 | + * |
|
| 42 | + * @param $patharray Simple array with path's to files or folders. |
|
| 43 | + * @return array |
|
| 44 | + */ |
|
| 45 | + public function sharingDetails($patharray); |
|
| 46 | 46 | |
| 47 | - /** |
|
| 48 | - * Share one or multiple files. |
|
| 49 | - * As the sharing dialog might differ for different backends, it is implemented as |
|
| 50 | - * MetaForm - meaning that the argumentnames/count might differ. |
|
| 51 | - * That's the cause why this function uses an array as parameter. |
|
| 52 | - * |
|
| 53 | - * $shareparams should look somehow like this: |
|
| 54 | - * |
|
| 55 | - * array( |
|
| 56 | - * "path1" => options1, |
|
| 57 | - * "path2" => options2 |
|
| 58 | - * ) |
|
| 59 | - * |
|
| 60 | - * @param $shareparams |
|
| 61 | - * @param bool $update |
|
| 62 | - * @return bool |
|
| 63 | - */ |
|
| 64 | - public function share($shareparams, $update = false); |
|
| 47 | + /** |
|
| 48 | + * Share one or multiple files. |
|
| 49 | + * As the sharing dialog might differ for different backends, it is implemented as |
|
| 50 | + * MetaForm - meaning that the argumentnames/count might differ. |
|
| 51 | + * That's the cause why this function uses an array as parameter. |
|
| 52 | + * |
|
| 53 | + * $shareparams should look somehow like this: |
|
| 54 | + * |
|
| 55 | + * array( |
|
| 56 | + * "path1" => options1, |
|
| 57 | + * "path2" => options2 |
|
| 58 | + * ) |
|
| 59 | + * |
|
| 60 | + * @param $shareparams |
|
| 61 | + * @param bool $update |
|
| 62 | + * @return bool |
|
| 63 | + */ |
|
| 64 | + public function share($shareparams, $update = false); |
|
| 65 | 65 | |
| 66 | - /** |
|
| 67 | - * Disable sharing for the given files/folders. |
|
| 68 | - * |
|
| 69 | - * @param $patharray Simple array with path's to files or folders. |
|
| 70 | - * @return bool |
|
| 71 | - */ |
|
| 72 | - public function unshare($patharray); |
|
| 66 | + /** |
|
| 67 | + * Disable sharing for the given files/folders. |
|
| 68 | + * |
|
| 69 | + * @param $patharray Simple array with path's to files or folders. |
|
| 70 | + * @return bool |
|
| 71 | + */ |
|
| 72 | + public function unshare($patharray); |
|
| 73 | 73 | |
| 74 | 74 | } |