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

@@ -547,7 +547,7 @@ class AttributeString extends AttributeDBField
}
public function ScalarToSQL($value)
{
if (!is_string($value))
if (!is_string($value) && !is_null($value))
{
throw new CoreWarning('Expected the attribute value to be a string', array('found_type' => gettype($value), 'value' => $value, 'class' => $this->GetCode(), 'attribute' => $this->GetHostClass()));
}
@@ -615,6 +615,66 @@ class AttributeText extends AttributeString
}
}
/**
* Specialization of a string: email
*
* @package iTopORM
* @author Romain Quetiez <romainquetiez@yahoo.fr>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.itop.com
* @since 1.0
* @version $itopversion$
*/
class AttributeEmailAddress extends AttributeString
{
public function GetTypeDesc() {return "Email address(es)";}
}
/**
* Specialization of a string: OQL expression
*
* @package iTopORM
* @author Romain Quetiez <romainquetiez@yahoo.fr>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.itop.com
* @since 1.0
* @version $itopversion$
*/
class AttributeOQL extends AttributeString
{
public function GetTypeDesc() {return "OQL expression";}
}
/**
* Specialization of a string: template
*
* @package iTopORM
* @author Romain Quetiez <romainquetiez@yahoo.fr>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.itop.com
* @since 1.0
* @version $itopversion$
*/
class AttributeTemplateString extends AttributeString
{
public function GetTypeDesc() {return "Template string";}
}
/**
* Specialization of a text: template
*
* @package iTopORM
* @author Romain Quetiez <romainquetiez@yahoo.fr>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.itop.com
* @since 1.0
* @version $itopversion$
*/
class AttributeTemplateText extends AttributeText
{
public function GetTypeDesc() {return "Multiline template string";}
}
/**
* Map a enum column to an attribute
*