mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Portal: Debug mode now logs external keys OQL queries used in forms. Helpful to understand the final query (DM OQL intersect Scope OQL)
SVN:trunk[4743]
This commit is contained in:
@@ -50,6 +50,10 @@ $oContex2 = new ContextTag('Portal:' . PORTAL_MODULE_ID);
|
||||
|
||||
// Checking if debug param is on
|
||||
$bDebug = (isset($_REQUEST['debug']) && ($_REQUEST['debug'] === 'true') );
|
||||
if($bDebug)
|
||||
{
|
||||
$oContexDebug = new ContextTag('debug');
|
||||
}
|
||||
|
||||
// Initializing Silex framework
|
||||
$oKPI = new ExecutionKPI();
|
||||
|
||||
@@ -28,6 +28,7 @@ use \UserRights;
|
||||
use \InlineImage;
|
||||
use \DBObjectSet;
|
||||
use \MetaModel;
|
||||
use \ContextTag;
|
||||
use \Combodo\iTop\Renderer\FieldRenderer;
|
||||
use \Combodo\iTop\Renderer\RenderingOutput;
|
||||
use \Combodo\iTop\Form\Field\SelectObjectField;
|
||||
@@ -60,6 +61,12 @@ class BsSelectObjectFieldRenderer extends FieldRenderer
|
||||
// Rendering field in edition mode
|
||||
if (!$this->oField->GetReadOnly() && !$this->oField->GetHidden())
|
||||
{
|
||||
// Debug trace: This is very useful when this kind of field doesn't return the expected values.
|
||||
if(ContextTag::Check('debug'))
|
||||
{
|
||||
IssueLog::Info('Form field #'.$this->oField->GetId().' OQL query: '.$this->oField->GetSearch()->ToOQL(true));
|
||||
}
|
||||
|
||||
// Rendering field
|
||||
// - Opening container
|
||||
$oOutput->AddHtml('<div class="form-group form_group_small ' . $sFieldMandatoryClass . '">');
|
||||
|
||||
Reference in New Issue
Block a user