david-szabo97 / grav-plugin-admin-addon-revisions

An extension for Grav Admin plugin which adds revisions for pages.
MIT License
11 stars 8 forks source link

Update admin-addon-revisions.php #6

Closed CSixtyFour closed 7 years ago

CSixtyFour commented 7 years ago

Drop any "addMessage" lines if show debug messages has been enabled so as to reduce output messages without messing with any of the plugin functionality

david-szabo97 commented 7 years ago

Hi there!

I appreciate your PR. These are my concerns:

Update admin-addon-revisions.php as commit message doesn't include any information about the changes. It's a rather small change so we can easily state what this commits do in the message rather than in the description. Something like Show debug messages based on configuration would be more informative.

I would prefer something like

$debugEnabled = $this->config->get(self::CONFIG_KEY . '.debug');

This line is totally unneccessary

        //Else no debugMessage output

Missing spaces between conditional statement parantheses and brackets.

if($admin_show_debug){

->

if ($debugEnabled) {
david-szabo97 commented 7 years ago

Implemented by v1.1.0 (https://github.com/david-szabo97/grav-plugin-admin-addon-revisions/commit/edc851c7b566373c53f83d56c1b603fd31cdf4d0)