diff --git a/application/utils.inc.php b/application/utils.inc.php
index 5268e6c41..68c7d40b6 100644
--- a/application/utils.inc.php
+++ b/application/utils.inc.php
@@ -39,6 +39,7 @@ class FileUploadException extends Exception
*/
class utils
{
+ private static $m_sConfigFile = ITOP_CONFIG_FILE;
private static $m_oConfig = null;
public static function ReadParam($sName, $defaultValue = "")
@@ -136,6 +137,15 @@ class utils
return file_get_contents($sFileName);
}
+ /**
+ * Specify the application config file
+ * @param string path to the config file
+ * @return void
+ */
+ public static function SpecifyConfigFile($sFilePath)
+ {
+ self::$m_sConfigFile = $sFilePath;
+ }
/**
* Get access to the application config file
* @param none
@@ -145,7 +155,7 @@ class utils
{
if (self::$m_oConfig == null)
{
- self::$m_oConfig = new Config(ITOP_CONFIG_FILE);
+ self::$m_oConfig = new Config(self::$m_sConfigFile);
}
return self::$m_oConfig;
}
diff --git a/core/dbobject.class.php b/core/dbobject.class.php
index 331a0e933..932823bf4 100644
--- a/core/dbobject.class.php
+++ b/core/dbobject.class.php
@@ -1096,6 +1096,10 @@ abstract class DBObject
}
// Make standard context arguments
+ // Note: Needs to be reviewed because it is currently called once per attribute when an object is written (CheckToWrite / CheckValue)
+ // Several options here:
+ // 1) cache the result
+ // 2) set only the object ref and resolve the values iif needed from contextual templates and queries (easy for the queries, not for the templates)
public function ToArgs($sArgName = 'this')
{
$aScalarArgs = array();
@@ -1109,6 +1113,11 @@ abstract class DBObject
foreach(MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef)
{
$aScalarArgs[$sArgName.'->'.$sAttCode] = $this->Get($sAttCode);
+ if ($oAttDef->IsScalar())
+ {
+ $aScalarArgs[$sArgName.'->html('.$sAttCode.')'] = $this->GetAsHtml($sAttCode);
+ $aScalarArgs[$sArgName.'->label('.$sAttCode.')'] = strip_tags($this->GetAsHtml($sAttCode));
+ }
}
return $aScalarArgs;
}
diff --git a/modules/itop-tickets-1.0.0/data.struct.ta-actions.xml b/modules/itop-tickets-1.0.0/data.struct.ta-actions.xml
index 3d776a69f..e42d0557b 100644
--- a/modules/itop-tickets-1.0.0/data.struct.ta-actions.xml
+++ b/modules/itop-tickets-1.0.0/data.struct.ta-actions.xml
@@ -10,7 +10,7 @@