From f410f12d1691eff0406f258dccdc2b9fc5e5283b Mon Sep 17 00:00:00 2001 From: dignajar Date: Sat, 6 Feb 2016 18:05:58 -0300 Subject: [PATCH] Improves, Disqus plugin --- bl-plugins/disqus/plugin.php | 11 ++++++----- index.php | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bl-plugins/disqus/plugin.php b/bl-plugins/disqus/plugin.php index 427da613..3eb8bb67 100644 --- a/bl-plugins/disqus/plugin.php +++ b/bl-plugins/disqus/plugin.php @@ -32,10 +32,6 @@ class pluginDisqus extends Plugin { { $this->enable = true; } - - if(!$Url->notFound()) { - $this->enable = false; - } } public function form() @@ -76,7 +72,12 @@ class pluginDisqus extends Plugin { public function pageEnd() { - if( $this->enable ) { + global $Url; + + // Bludit check not-found page after the plugin method construct. + // It's necesary check here the page not-found. + + if( $this->enable && !$Url->notFound()) { return '
'; } diff --git a/index.php b/index.php index 1be0dbf9..dec231f3 100644 --- a/index.php +++ b/index.php @@ -37,4 +37,4 @@ if($Url->whereAmI()==='admin') { // Site else { require(PATH_BOOT.'site.php'); -} +} \ No newline at end of file