Module: nagvis
Branch: nagvis-1.5
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]',


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to