Skip to content

Commit

Permalink
bugfix: logger configuration doesn't take effect in PHP connector #123
Browse files Browse the repository at this point in the history
  • Loading branch information
psolom committed Mar 15, 2017
1 parent 351a747 commit 82c6f60
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions connectors/php/application/FmApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public function getInstance($custom_config = array())
$base_config = require_once(FM_ROOT_PATH . '/config.php');
$configuration = FmHelper::mergeConfigs($base_config, $custom_config);

if (isset($configuration['logger']) && $configuration['logger']['enabled'] == true ) {
$this->logger->enabled = true;
}

if (isset($configuration['plugin']) && !empty($configuration['plugin'])) {
$plugin_name = $configuration['plugin'];
$plugin_path = FM_ROOT_PATH . "/plugins/{$plugin_name}/";
Expand All @@ -36,10 +40,6 @@ public function getInstance($custom_config = array())
$fm = new LocalFilemanager($configuration);
}

if (isset($configuration['logger']) && $configuration['logger']['enabled'] == true ) {
$this->logger->enabled = true;
}

if(!auth()) {
$fm->error($fm->lang('AUTHORIZATION_REQUIRED'));
}
Expand Down
2 changes: 1 addition & 1 deletion connectors/php/application/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Logger {
/**
* @var boolean
*/
public $enabled = true;
public $enabled = false;


public function __construct()
Expand Down
2 changes: 1 addition & 1 deletion connectors/php/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Configure Logger class
*/
"logger" => [
"enabled" => true,
"enabled" => false,
],
/**
* General options section
Expand Down

0 comments on commit 82c6f60

Please sign in to comment.