Trac #57 - Implemented beta version of email notifications (triggers and actions)

SVN:trunk[225]
This commit is contained in:
Romain Quetiez
2010-01-06 08:51:08 +00:00
parent 644d936c26
commit 5a15dcb849
9 changed files with 224 additions and 29 deletions

View File

@@ -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;