mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
Latest data model (Erwan) and few cosmetic changes (safer display of object hyperlinks)
SVN:trunk[119]
This commit is contained in:
@@ -54,6 +54,11 @@ class CoreException extends Exception
|
||||
return MyHelpers::get_callstack_html(0, $this->getTrace());
|
||||
// return "<pre>\n".$this->getTraceAsString()."</pre>\n";
|
||||
}
|
||||
|
||||
public function addInfo($sKey, $value)
|
||||
{
|
||||
$this->m_aContextData[$sKey] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
class CoreWarning extends CoreException
|
||||
|
||||
@@ -1210,7 +1210,8 @@ abstract class MetaModel
|
||||
// Query caching
|
||||
//
|
||||
$bQueryCacheEnabled = true;
|
||||
$sOqlQuery = $oFilter->ToOql();
|
||||
$aParams = array();
|
||||
$sOqlQuery = $oFilter->ToOql($aParams); // Render with arguments in clear
|
||||
if ($bQueryCacheEnabled)
|
||||
{
|
||||
if (array_key_exists($sOqlQuery, self::$m_aQueryStructCache))
|
||||
@@ -1254,7 +1255,17 @@ abstract class MetaModel
|
||||
// Go
|
||||
//
|
||||
$aScalarArgs = array_merge(self::PrepareQueryArguments($aArgs), $oFilter->GetInternalParams());
|
||||
$sRes = $oSelect->RenderSelect($aOrderBy, $aScalarArgs);
|
||||
|
||||
try
|
||||
{
|
||||
$sRes = $oSelect->RenderSelect($aOrderBy, $aScalarArgs);
|
||||
}
|
||||
catch (MissingQueryArgument $e)
|
||||
{
|
||||
// Add some information...
|
||||
$e->addInfo('OQL', $sOqlQuery);
|
||||
throw $e;
|
||||
}
|
||||
|
||||
if (self::$m_bTraceQueries)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user