mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 00:58:48 +02:00
New data model: alpha version
SVN:trunk[484]
This commit is contained in:
@@ -582,7 +582,8 @@ class AttributeString extends AttributeDBField
|
||||
}
|
||||
else
|
||||
{
|
||||
return preg_match(preg_escape($sRegExp), $value);
|
||||
$sRegExp = str_replace('/', '\\/', $sRegExp);
|
||||
return preg_match("/$sRegExp/", $value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -860,6 +861,27 @@ class AttributeTemplateText extends AttributeText
|
||||
public function GetTypeDesc() {return "Multiline template string";}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Specialization of a text: wiki formatting
|
||||
*
|
||||
* @package iTopORM
|
||||
*/
|
||||
class AttributeWikiText extends AttributeText
|
||||
{
|
||||
public function GetTypeDesc() {return "Multiline string with special formatting such as links to objects";}
|
||||
|
||||
public function GetAsHTML($value)
|
||||
{
|
||||
// [SELECT xxxx.... [label]] => hyperlink to a result list
|
||||
// {SELECT xxxx.... [label]} => result list displayed inline
|
||||
// [myclass/nnn [label]] => hyperlink to an object
|
||||
// {myclass/nnn/attcode} => attribute displayed inline
|
||||
// etc.
|
||||
return parent::GetAsHTML($value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Map a enum column to an attribute
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user