tworabbits / Pico-Gzip

PicoCMS plugin enabling gzip compression
MIT License
2 stars 0 forks source link

Minor improvements #1

Closed PhrozenByte closed 8 years ago

PhrozenByte commented 8 years ago

I was wondering how you've implemented this, nice and dead simple solution! I like it :+1: :smiley:

However, you should remove the PicoParsePagesContent dependency (i.e. remove line 38). You actually don't depend on it, as you're compressing the current page only. Furthermore you should move the contents of onPluginsLoaded to onConfigLoaded. onPluginsLoaded is triggered before onConfigLoaded, thus $this->disabled will never be FALSE if a users tries to disable the plugin in his config. This happens not until onConfigLoaded.

boggyhole commented 8 years ago

Thanks a lot for your feedback! I know the PicoCMS since yesterday, so apparently I am not really into it yet ;) I moved the enabled and php extension checks, removed the PicoParsePagesContent dependency and tested successfully on my machine.

Cheers, Jonas

PhrozenByte commented 8 years ago

:+1: