diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-06-26 08:23:50 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-06-26 08:23:50 +0000 |
| commit | d08f774dbdc1ec11793acf0ce395b942ca1e56eb (patch) | |
| tree | cf697bf9bebdcfe723ee5ce27c34c69a9af64744 /frontends/php/include | |
| parent | dfbb4a4388893c8c86e2ca78ceb02091ac3ee499 (diff) | |
- [DEV-137] fixes in profiles (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5795 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/hosts.inc.php | 4 | ||||
| -rw-r--r-- | frontends/php/include/profiles.inc.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/frontends/php/include/hosts.inc.php b/frontends/php/include/hosts.inc.php index 0923fc2b..9791b6b4 100644 --- a/frontends/php/include/hosts.inc.php +++ b/frontends/php/include/hosts.inc.php @@ -843,7 +843,7 @@ require_once "include/httptest.inc.php"; * Comments: * */ - function validate_group_with_host($perm, $options = array(),$group_var=null,$host_var=null){ + function validate_group_with_host($perm, $options = array(),$group_var=null,$host_var=null){ if(is_null($group_var)) $group_var = "web.latest.groupid"; if(is_null($host_var)) $host_var = "web.latest.hostid"; @@ -867,7 +867,7 @@ require_once "include/httptest.inc.php"; $_REQUEST["groupid"] = $result["groupid"]; $_REQUEST["hostid"] = $result["hostid"]; - + update_profile($host_var,$_REQUEST["hostid"], PROFILE_TYPE_ID); update_profile($group_var,$_REQUEST["groupid"], PROFILE_TYPE_ID); } diff --git a/frontends/php/include/profiles.inc.php b/frontends/php/include/profiles.inc.php index b062b461..465a7f0b 100644 --- a/frontends/php/include/profiles.inc.php +++ b/frontends/php/include/profiles.inc.php @@ -40,8 +40,8 @@ function get_profile($idx,$default_value=null,$type=PROFILE_TYPE_UNKNOWN,$idx2=n ' AND idx='.zbx_dbstr($idx). $sql_cond. ' ORDER BY profileid ASC'; - $db_profiles = DBselect($sql); + $db_profiles = DBselect($sql); if($profile=DBfetch($db_profiles)){ if(profile_type($type,'unknown')) $type = $profile['type']; @@ -314,7 +314,7 @@ function profile_value_by_type(&$value,$type){ switch($type){ case PROFILE_TYPE_ID: case PROFILE_TYPE_INT: - $result = zbx_numeric($value)?intval($value):false; + $result = zbx_numeric($value)?$value:false; break; case PROFILE_TYPE_STR: $result = strval($value); |
