mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Remove AFTER_DISPLAY_PAGE Event
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,6 @@ class JsonPage extends WebPage
|
||||
|
||||
echo $sJSON;
|
||||
$oKpi->ComputeAndReport('Echoing ('.round(strlen($sJSON) / 1024).' Kb)');
|
||||
$this->FireAfterDisplayEvent();
|
||||
ExecutionKPI::ReportStats();
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,6 @@ EOF
|
||||
}
|
||||
$this->flush();
|
||||
echo $this->oPdf->Output($this->s_title.'.pdf', 'S');
|
||||
$this->FireAfterDisplayEvent();
|
||||
}
|
||||
|
||||
public function get_pdf()
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
@@ -72,7 +72,6 @@ class XMLPage extends WebPage
|
||||
if (class_exists('DBSearch')) {
|
||||
DBSearch::RecordQueryTrace();
|
||||
}
|
||||
$this->FireAfterDisplayEvent();
|
||||
ExecutionKPI::ReportStats();
|
||||
}
|
||||
|
||||
|
||||
@@ -950,7 +950,6 @@ HTML;
|
||||
$oKpi->ComputeAndReport('Echoing ('.round(strlen($sHtml) / 1024).' Kb)');
|
||||
|
||||
DBSearch::RecordQueryTrace();
|
||||
$this->FireAfterDisplayEvent();
|
||||
ExecutionKPI::ReportStats();
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user