#485 Improved the end-user experience with Excel and the web queries (added a phrasebook) + link to test the OQL attributes (query phrasebook or email actions, etc.) including the handlink of query arguments) + fixed wrong prototypes for a few implementations of GetBareProperties()

SVN:1.2[1719]
This commit is contained in:
Romain Quetiez
2011-12-14 17:44:06 +00:00
parent 281adfb043
commit c149ec8e2c
15 changed files with 262 additions and 37 deletions

View File

@@ -1880,6 +1880,7 @@ class AttributeIPAddress extends AttributeString
*/
class AttributeOQL extends AttributeText
{
public function GetEditClass() {return "OQLExpression";}
}
/**

View File

@@ -562,6 +562,7 @@ class Config
'application/menunode.class.inc.php',
'application/user.preferences.class.inc.php',
'application/audit.rule.class.inc.php',
'application/query.class.inc.php',
// Romain - That's dirty, because those classes are in fact part of the core
// but I needed those classes to be derived from cmdbAbstractObject
// (to be managed via the GUI) and this class in not really known from

View File

@@ -737,11 +737,24 @@ class DBObjectSearch
{
return $this->m_aRelatedTo;
}
public function SetInternalParams($aParams)
{
return $this->m_aParams = $aParams;
}
public function GetInternalParams()
{
return $this->m_aParams;
}
public function GetQueryParams()
{
$aParams = array();
$this->m_oSearchCondition->Render($aParams, true);
return $aParams;
}
public function ListConstantFields()
{
return $this->m_oSearchCondition->ListConstantFields();

View File

@@ -103,7 +103,7 @@ class Event extends DBObject implements iDisplay
$this->DisplayBareProperties($oPage, $bEditMode);
}
function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $aExtraParams = array())
function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix = '', $aExtraParams = array())
{
if ($bEditMode) return; // Not editable

View File

@@ -282,16 +282,7 @@ class UnaryExpression extends Expression
// recursive rendering
public function Render(&$aArgs = null, $bRetrofitParams = false)
{
if ($bRetrofitParams)
{
$iParamIndex = count($aArgs) + 1; // 1-based indexation
$aArgs['param'.$iParamIndex] = $this->m_value;
return ':param'.$iParamIndex;
}
else
{
return CMDBSource::Quote($this->m_value);
}
return CMDBSource::Quote($this->m_value);
}
public function GetUnresolvedFields($sAlias, &$aUnresolved)
@@ -483,7 +474,7 @@ class VariableExpression extends UnaryExpression
}
elseif ($bRetrofitParams)
{
//$aArgs[$this->m_sName] = null;
$aArgs[$this->m_sName] = null;
return ':'.$this->m_sName;
}
else