diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-03-26 13:28:43 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-03-26 13:28:43 +0000 |
| commit | 84b76acee504a3160ab2b568ab7517aedc8e5eb5 (patch) | |
| tree | 56b02f3a783860393fe18603104c71b8070f875e /frontends/php/include/classes | |
| parent | 45dd16822e8717f9685eb05ec2d6f7c5c43f1e3a (diff) | |
| download | zabbix-84b76acee504a3160ab2b568ab7517aedc8e5eb5.tar.gz zabbix-84b76acee504a3160ab2b568ab7517aedc8e5eb5.tar.xz zabbix-84b76acee504a3160ab2b568ab7517aedc8e5eb5.zip | |
- support of multiple actions per set of conidtions (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3927 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes')
| -rw-r--r-- | frontends/php/include/classes/clink.inc.php | 3 | ||||
| -rw-r--r-- | frontends/php/include/classes/ctag.inc.php | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/frontends/php/include/classes/clink.inc.php b/frontends/php/include/classes/clink.inc.php index eb785941..ecb6ca00 100644 --- a/frontends/php/include/classes/clink.inc.php +++ b/frontends/php/include/classes/clink.inc.php @@ -22,7 +22,7 @@ class CLink extends CTag { /* public */ - function CLink($item=NULL,$url=NULL,$class=NULL) + function CLink($item=NULL,$url=NULL,$class=NULL,$action=NULL) { parent::CTag("a","yes"); @@ -34,6 +34,7 @@ if(!is_null($class)) $this->SetClass($class); if(!is_null($item)) $this->AddItem($item); if(!is_null($url)) $this->SetUrl($url); + if(!is_null($action)) $this->SetAction($action); } function SetAction($value=NULL) { diff --git a/frontends/php/include/classes/ctag.inc.php b/frontends/php/include/classes/ctag.inc.php index 93671c81..abc6bd4b 100644 --- a/frontends/php/include/classes/ctag.inc.php +++ b/frontends/php/include/classes/ctag.inc.php @@ -51,6 +51,16 @@ return $res; } + function implode_objects($glue, &$pieces) + { + if( !is_array($pieces) ) return unpack_object($pieces); + + foreach($pieces as $id => $piece) + $pieces[$id] = unpack_object($piece); + + return implode($glue, $pieces); + } + class CObject { function CObject($items=null) @@ -240,7 +250,7 @@ function AddAction($name, $value) { if(!empty($value)) - $this->options[$name] = htmlentities(str_replace("\n", '', strval($value)),ENT_COMPAT); + $this->options[$name] = htmlentities(str_replace(array("\r", "\n"), '', strval($value)),ENT_COMPAT); } function AddOption($name, $value) |
