Module: nagvis Branch: master Commit: b460c6a0b9118a515ec151b1b9ca0d92ee3ce3a0 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=b460c6a0b9118a515ec151b1b9ca0d92ee3ce3a0
Author: Lars Michelsen <[email protected]> Date: Fri May 7 21:40:36 2010 +0200 Only object states of maps and automaps can be fetched using the General getObjectStates action --- share/server/core/classes/CoreModGeneral.php | 14 +------------- 1 files changed, 1 insertions(+), 13 deletions(-) diff --git a/share/server/core/classes/CoreModGeneral.php b/share/server/core/classes/CoreModGeneral.php index 2c7c035..e819695 100644 --- a/share/server/core/classes/CoreModGeneral.php +++ b/share/server/core/classes/CoreModGeneral.php @@ -165,18 +165,6 @@ class CoreModGeneral extends CoreModule { $objConf['object_id'] = $arrObjId[$i]; switch($arrType[$i]) { - case 'host': - $OBJ = new NagVisHost($this->CORE, $BACKEND, $objConf['backend_id'], $arrName1[$i]); - break; - case 'service': - $OBJ = new NagVisService($this->CORE, $BACKEND, $objConf['backend_id'], $arrName1[$i], $arrName2[$i]); - break; - case 'hostgroup': - $OBJ = new NagVisHostgroup($this->CORE, $BACKEND, $objConf['backend_id'], $arrName1[$i]); - break; - case 'servicegroup': - $OBJ = new NagVisServicegroup($this->CORE, $BACKEND, $objConf['backend_id'], $arrName1[$i]); - break; case 'map': // Skip unpermitted maps if($this->CORE->getAuthorization() === null || !$this->CORE->getAuthorization()->isPermitted('Map', 'view', $arrName1[$i])) @@ -219,7 +207,7 @@ class CoreModGeneral extends CoreModule { $OBJ = $MAP->MAPOBJ; break; default: - echo 'Error: '.$CORE->getLang()->getText('unknownObject', Array('TYPE' => $arrType[$i], 'MAPNAME' => '')); + new GlobalMessage('ERROR', $CORE->getLang()->getText('Only map and automap states can be fetched using this module/action.')); break; } ------------------------------------------------------------------------------ _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
