From 4182bc6afb20b00fa27a54c67056bb98a58a49bb Mon Sep 17 00:00:00 2001 From: osmiy Date: Fri, 12 May 2006 14:23:12 +0000 Subject: - speed improvement for Overview screens (Eugene) - developed 'net.if.total[*]' parameter (Eugene) - fixed new map link adding (Eugene) - fixed host group adding (Eugene) - fixed map displaying (Eugene) - fixed 'No permissions' for 'Latest data','Triggers','Alarms' screens (Eugene) - fixed permision deletion (Eugene) - fixed 'get_map_by_sysmapid' function calls(Eugene) - improved php code execution speed (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@2825 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/classes/ctextarea.inc.php | 72 +++++-------------------- 1 file changed, 14 insertions(+), 58 deletions(-) (limited to 'frontends/php/include/classes/ctextarea.inc.php') diff --git a/frontends/php/include/classes/ctextarea.inc.php b/frontends/php/include/classes/ctextarea.inc.php index 5ea51f70..af5b0127 100644 --- a/frontends/php/include/classes/ctextarea.inc.php +++ b/frontends/php/include/classes/ctextarea.inc.php @@ -21,82 +21,38 @@ SetClass("biginput"); - $this->AddOption('wrap','soft'); - $this->SetName($name); - $this->SetCols($cols); - $this->SetRows($rows); - $this->SetCaption($caption); - $this->SetValue($value); + $this->options['class'] = 'biginput'; + $this->options['wrap'] = 'soft'; + $this->options['name'] = $name; + $this->options['rows'] = $rows; + $this->options['cols'] = $cols; $this->SetReadonly($readonly); - } - function Show() - { - if(isset($this->caption)) - echo $this->caption." "; - parent::Show(); - } - function SetName($value='textarea') - { - if(!is_string($value)) - { - return $this->error("Incorrect value for SetName [$value]"); - } - return $this->AddOption("name",$value); - } - function SetCaption($value=NULL) - { - if(is_null($value)) - unset($this->caption); - elseif(is_string($value)) - $this->caption = $value; - else - { - return $this->error("Incorrect value for SetCaption [$value]"); - } - return 0; + + $this->AddItem($value); } function SetReadonly($value='yes') { - if(is_string($value)) - { - if($value=='no') - return $this->DelOption("readonly"); - elseif($value=='yes') - return $this->AddOption("readonly",'readonly'); - } - return $this->error("Incorrect value for SetReadonly [$value]"); + if($value=='yes') + return $this->options['readonly'] = 'readonly'; + + $this->DelOption("readonly"); } function SetValue($value="") { - if(!is_string($value)) - { - return $this->error("Incorrect value for SetValue [$value]"); - } return $this->AddItem($value); } function SetRows($value) { - if(!is_numeric($value)) - { - return $this->error("Incorrect value for SetRows [$value]"); - } - return $this->AddOption("rows",strval($value)); + return $this->options['rows'] = $value; } function SetCols($value) { - if(!is_numeric($value)) - { - return $this->error("Incorrect value for SetCols [$value]"); - } - return $this->AddOption("cols",strval($value)); + return $this->options['cols'] = $value; } } -- cgit