Remove AFTER_DISPLAY_PAGE Event

This commit is contained in:
Eric Espie
2022-06-02 17:23:07 +02:00
parent 4c31081de2
commit 86a2db7e7f
10 changed files with 0 additions and 30 deletions

View File

@@ -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();
}

View File

@@ -15,8 +15,6 @@
//
// You should have received a copy of the GNU Affero General Public License
// along with iTop. If not, see <http://www.gnu.org/licenses/>
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;

View File

@@ -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();

View File

@@ -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();
}
}

View File

@@ -100,7 +100,6 @@ class JsonPage extends WebPage
echo $sJSON;
$oKpi->ComputeAndReport('Echoing ('.round(strlen($sJSON) / 1024).' Kb)');
$this->FireAfterDisplayEvent();
ExecutionKPI::ReportStats();
}

View File

@@ -157,7 +157,6 @@ EOF
}
$this->flush();
echo $this->oPdf->Output($this->s_title.'.pdf', 'S');
$this->FireAfterDisplayEvent();
}
public function get_pdf()

View File

@@ -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();
}

View File

@@ -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
*

View File

@@ -72,7 +72,6 @@ class XMLPage extends WebPage
if (class_exists('DBSearch')) {
DBSearch::RecordQueryTrace();
}
$this->FireAfterDisplayEvent();
ExecutionKPI::ReportStats();
}

View File

@@ -950,7 +950,6 @@ HTML;
$oKpi->ComputeAndReport('Echoing ('.round(strlen($sHtml) / 1024).' Kb)');
DBSearch::RecordQueryTrace();
$this->FireAfterDisplayEvent();
ExecutionKPI::ReportStats();
return;