mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Trac #57 - Implemented beta version of email notifications (triggers and actions)
SVN:trunk[225]
This commit is contained in:
@@ -16,7 +16,7 @@ class DisplayTemplate
|
||||
|
||||
public function Render(web_page $oPage, $aParams = array())
|
||||
{
|
||||
$this->ApplyParams($aParams);
|
||||
$this->m_sTemplate = MetaModel::ApplyParams($this->m_sTemplate, $aParams);
|
||||
$iStart = 0;
|
||||
$iEnd = strlen($this->m_sTemplate);
|
||||
$iCount = 0;
|
||||
@@ -40,21 +40,6 @@ class DisplayTemplate
|
||||
$oPage->add(substr($this->m_sTemplate, $iAfterTagPos));
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces all the parameters by the values passed in the hash array
|
||||
*/
|
||||
public function ApplyParams($aParams)
|
||||
{
|
||||
$aSearches = array();
|
||||
$aReplacements = array();
|
||||
foreach($aParams as $sSearch => $sReplace)
|
||||
{
|
||||
$aSearches[] = '$'.$sSearch.'$';
|
||||
$aReplacements[] = $sReplace;
|
||||
}
|
||||
$this->m_sTemplate = str_replace($aSearches, $aReplacements, $this->m_sTemplate);
|
||||
}
|
||||
|
||||
public function GetNextTag(&$iStartPos, &$iEndPos)
|
||||
{
|
||||
$iChunkStartPos = $iStartPos;
|
||||
|
||||
Reference in New Issue
Block a user