From 86a2db7e7fb8ba4ac0a016febab8df63cf9e4f74 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Thu, 2 Jun 2022 17:23:07 +0200 Subject: [PATCH] Remove AFTER_DISPLAY_PAGE Event --- sources/Application/WebPage/AjaxPage.php | 1 - sources/Application/WebPage/CLIPage.php | 10 ---------- sources/Application/WebPage/CSVPage.php | 1 - sources/Application/WebPage/DownloadPage.php | 1 - sources/Application/WebPage/JsonPage.php | 1 - sources/Application/WebPage/PDFPage.php | 1 - .../Application/WebPage/UnauthenticatedWebPage.php | 1 - sources/Application/WebPage/WebPage.php | 12 ------------ sources/Application/WebPage/XMLPage.php | 1 - sources/Application/WebPage/iTopWebPage.php | 1 - 10 files changed, 30 deletions(-) diff --git a/sources/Application/WebPage/AjaxPage.php b/sources/Application/WebPage/AjaxPage.php index a5847104d..e046765d7 100644 --- a/sources/Application/WebPage/AjaxPage.php +++ b/sources/Application/WebPage/AjaxPage.php @@ -232,7 +232,6 @@ class AjaxPage extends WebPage implements iTabbedPage // Echo global HTML echo $sHtml; $oKpi->ComputeAndReport('Echoing ('.round(strlen($sHtml) / 1024).' Kb)'); - $this->FireAfterDisplayEvent(); ExecutionKPI::ReportStats(); } diff --git a/sources/Application/WebPage/CLIPage.php b/sources/Application/WebPage/CLIPage.php index ca1620706..3f64e2a0e 100644 --- a/sources/Application/WebPage/CLIPage.php +++ b/sources/Application/WebPage/CLIPage.php @@ -15,8 +15,6 @@ // // You should have received a copy of the GNU Affero General Public License // along with iTop. If not, see -use Combodo\iTop\Service\EventData; -use Combodo\iTop\Service\EventService; /** * CLI page @@ -39,7 +37,6 @@ class CLIPage implements Page public function output() { - $this->FireAfterDisplayEvent(); if (class_exists('DBSearch')) { DBSearch::RecordQueryTrace(); } @@ -48,13 +45,6 @@ class CLIPage implements Page } } - protected function FireAfterDisplayEvent() - { - $aData['debug_info'] = 'from: '.get_class($this).":[$this->s_title]"; - $aData['object'] = $this; - EventService::FireEvent(new EventData(EVENT_SERVICE_AFTER_DISPLAY_PAGE, get_class($this), $aData)); - } - public function add($sText) { echo $sText; diff --git a/sources/Application/WebPage/CSVPage.php b/sources/Application/WebPage/CSVPage.php index de3738baf..5783cba68 100644 --- a/sources/Application/WebPage/CSVPage.php +++ b/sources/Application/WebPage/CSVPage.php @@ -53,7 +53,6 @@ class CSVPage extends WebPage echo trim($this->s_content); echo "\n"; $oKpi->ComputeAndReport('Echoing ('.round(strlen($this->s_content) / 1024).' Kb)'); - $this->FireAfterDisplayEvent(); if (class_exists('DBSearch')) { DBSearch::RecordQueryTrace(); diff --git a/sources/Application/WebPage/DownloadPage.php b/sources/Application/WebPage/DownloadPage.php index 5fa1ea1f4..f402709a4 100644 --- a/sources/Application/WebPage/DownloadPage.php +++ b/sources/Application/WebPage/DownloadPage.php @@ -53,7 +53,6 @@ class DownloadPage extends AjaxPage $oKpi->ComputeAndReport(get_class($this).' output'); echo $sContent; $oKpi->ComputeAndReport('Echoing ('.round(strlen($sContent) / 1024).' Kb)'); - $this->FireAfterDisplayEvent(); ExecutionKPI::ReportStats(); } } diff --git a/sources/Application/WebPage/JsonPage.php b/sources/Application/WebPage/JsonPage.php index 1183164f4..03e2558bf 100644 --- a/sources/Application/WebPage/JsonPage.php +++ b/sources/Application/WebPage/JsonPage.php @@ -100,7 +100,6 @@ class JsonPage extends WebPage echo $sJSON; $oKpi->ComputeAndReport('Echoing ('.round(strlen($sJSON) / 1024).' Kb)'); - $this->FireAfterDisplayEvent(); ExecutionKPI::ReportStats(); } diff --git a/sources/Application/WebPage/PDFPage.php b/sources/Application/WebPage/PDFPage.php index aa0ee816c..526a3a0e4 100644 --- a/sources/Application/WebPage/PDFPage.php +++ b/sources/Application/WebPage/PDFPage.php @@ -157,7 +157,6 @@ EOF } $this->flush(); echo $this->oPdf->Output($this->s_title.'.pdf', 'S'); - $this->FireAfterDisplayEvent(); } public function get_pdf() diff --git a/sources/Application/WebPage/UnauthenticatedWebPage.php b/sources/Application/WebPage/UnauthenticatedWebPage.php index ccdd8a303..5f89d0853 100644 --- a/sources/Application/WebPage/UnauthenticatedWebPage.php +++ b/sources/Application/WebPage/UnauthenticatedWebPage.php @@ -174,7 +174,6 @@ class UnauthenticatedWebPage extends NiceWebPage $oKpi->ComputeAndReport(get_class($this).' output'); echo $sHtml; $oKpi->ComputeAndReport('Echoing ('.round(strlen($sHtml) / 1024).' Kb)'); - $this->FireAfterDisplayEvent(); ExecutionKPI::ReportStats(); } diff --git a/sources/Application/WebPage/WebPage.php b/sources/Application/WebPage/WebPage.php index 7b56c4bd1..005902b49 100644 --- a/sources/Application/WebPage/WebPage.php +++ b/sources/Application/WebPage/WebPage.php @@ -17,8 +17,6 @@ use Combodo\iTop\Application\UI\Base\Layout\iUIContentBlock; use Combodo\iTop\Application\UI\Base\Layout\UIContentBlock; use Combodo\iTop\Renderer\BlockRenderer; use Combodo\iTop\Renderer\Console\ConsoleBlockRenderer; -use Combodo\iTop\Service\EventData; -use Combodo\iTop\Service\EventService; /** @@ -1346,19 +1344,9 @@ JS; if (class_exists('DBSearch')) { DBSearch::RecordQueryTrace(); } - $this->FireAfterDisplayEvent(); ExecutionKPI::ReportStats(); } - const EVENT_SERVICE_AFTER_DISPLAY_PAGE = 'AfterDisplayPage'; - - protected function FireAfterDisplayEvent() - { - $aData['debug_info'] = 'from: '.get_class($this).":[$this->s_title]"; - $aData['object'] = $this; - EventService::FireEvent(new EventData(self::EVENT_SERVICE_AFTER_DISPLAY_PAGE, get_class($this), $aData)); - } - /** * Build a series of hidden field[s] from an array * diff --git a/sources/Application/WebPage/XMLPage.php b/sources/Application/WebPage/XMLPage.php index 42d4f6f42..18acc8896 100644 --- a/sources/Application/WebPage/XMLPage.php +++ b/sources/Application/WebPage/XMLPage.php @@ -72,7 +72,6 @@ class XMLPage extends WebPage if (class_exists('DBSearch')) { DBSearch::RecordQueryTrace(); } - $this->FireAfterDisplayEvent(); ExecutionKPI::ReportStats(); } diff --git a/sources/Application/WebPage/iTopWebPage.php b/sources/Application/WebPage/iTopWebPage.php index 3585f5217..16ec6c91e 100644 --- a/sources/Application/WebPage/iTopWebPage.php +++ b/sources/Application/WebPage/iTopWebPage.php @@ -950,7 +950,6 @@ HTML; $oKpi->ComputeAndReport('Echoing ('.round(strlen($sHtml) / 1024).' Kb)'); DBSearch::RecordQueryTrace(); - $this->FireAfterDisplayEvent(); ExecutionKPI::ReportStats(); return;