Module: nagvis Branch: master Commit: 4b71c7cb8a3c3b08fc607cba8a1c122bbaac5ba9 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=4b71c7cb8a3c3b08fc607cba8a1c122bbaac5ba9
Author: Lars Michelsen <[email protected]> Date: Wed Nov 17 20:48:34 2010 +0100 Fixed handling of manual input of backend ids using the WUI --- share/frontend/wui/js/ajax.js | 3 +++ share/server/core/classes/CoreBackendMgmt.php | 2 +- share/server/core/classes/CoreModMap.php | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/share/frontend/wui/js/ajax.js b/share/frontend/wui/js/ajax.js index 31e9181..d7e8083 100644 --- a/share/frontend/wui/js/ajax.js +++ b/share/frontend/wui/js/ajax.js @@ -31,6 +31,9 @@ function getObjects(backend_id, type, field, selected, name1) { oOpt.selected = selected; oOpt.type = type; + if(backend_id === lang['manualInput']) + return true; + if(type === 'service' && (typeof name1 === 'undefined' || name1 == '' || name1 === lang['manualInput'])) { diff --git a/share/server/core/classes/CoreBackendMgmt.php b/share/server/core/classes/CoreBackendMgmt.php index ab8439a..d48553c 100644 --- a/share/server/core/classes/CoreBackendMgmt.php +++ b/share/server/core/classes/CoreBackendMgmt.php @@ -368,7 +368,7 @@ class CoreBackendMgmt { * @return Boolean Is Successful? * @author Lars Michelsen <[email protected]> */ - private function checkBackendExists($backendId, $printErr) { + public function checkBackendExists($backendId, $printErr) { if($this->CORE->checkExisting($this->CORE->getMainCfg()->getValue('paths','class').'GlobalBackend'.$this->CORE->getMainCfg()->getValue('backend_'.$backendId,'backendtype').'.php', false)) return true; diff --git a/share/server/core/classes/CoreModMap.php b/share/server/core/classes/CoreModMap.php index 366d270..8f1fe65 100644 --- a/share/server/core/classes/CoreModMap.php +++ b/share/server/core/classes/CoreModMap.php @@ -333,8 +333,9 @@ class CoreModMap extends CoreModule { protected function getObjects($a) { // Initialize the backend $BACKEND = new CoreBackendMgmt($this->CORE); - + try { + $BACKEND->checkBackendExists($a['backendid'], true); $BACKEND->checkBackendFeature($a['backendid'], 'getObjects', true); } catch(BackendConnectionProblem $e) { new GlobalMessage('ERROR', $CORE->getLang()->getText('Connection Problem (Backend: [BACKENDID]): [MSG]', ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
