Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind Moodle $CFG->debug to $loggingenabled #141

Merged
merged 3 commits into from
Oct 6, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions classes/log/store.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,16 @@ class store extends php_obj implements log_writer {
* @param log_manager $manager
*/
public function __construct(log_manager $manager) {
global $CFG;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all white spaces (Moodle coding style)

$this->helper_setup($manager);
$this->logguests = $this->get_config('logguests', 1);
$routes = $this->get_config('routes', '');
$this->routes = $routes === '' ? [] : explode(',', $routes);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all white spaces (Moodle coding style)

if (!empty($CFG->debug) and $CFG->debug >= DEBUG_DEVELOPER) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have used && instead of and to protect against future changes, since some people don't understand there's a slight difference in precedence between the two. Not too worried about that though, just something to be aware of 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I Agree, just used an old piece of code from another plugin I have.
Better fix it, at some point.

$this->loggingenabled = true;
}
}

/**
Expand Down