Module: nagvis Branch: master Commit: da31de0183c0ff5abb1784d67a3ee6e14fea6cc5 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=da31de0183c0ff5abb1784d67a3ee6e14fea6cc5
Author: Lars Michelsen <[email protected]> Date: Sat Oct 17 13:36:59 2009 +0200 Fixed several coding errors --- share/frontend/nagvis-js/js/frontend.js | 16 +++++----------- share/server/core/classes/GlobalMessage.php | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/share/frontend/nagvis-js/js/frontend.js b/share/frontend/nagvis-js/js/frontend.js index 83cb10f..b41171b 100644 --- a/share/frontend/nagvis-js/js/frontend.js +++ b/share/frontend/nagvis-js/js/frontend.js @@ -185,9 +185,9 @@ function getObjectsToUpdate(aObjs) { */ function getCfgFileAges() { if(oPageProperties.view_type === 'map') { - return getSyncRequest(oGeneralProperties.path_htmlserver+'?action=getCfgFileAges&f[]=mainCfg&m[]='+oGeneralProperties.map_name, true); + return getSyncRequest(oGeneralProperties.path_htmlserver+'?action=getCfgFileAges&f[]=mainCfg&m[]='+escapeUrlValues(oPageProperties.map_name), true); } else if(oPageProperties.view_type === 'automap') { - return getSyncRequest(oGeneralProperties.path_htmlserver+'?action=getCfgFileAges&f[]=mainCfg&am[]='+oGeneralProperties.map_name, true); + return getSyncRequest(oGeneralProperties.path_htmlserver+'?action=getCfgFileAges&f[]=mainCfg&am[]='+escapeUrlValues(oPageProperties.map_name), true); } else { return getSyncRequest(oGeneralProperties.path_htmlserver+'?action=getCfgFileAges&f[]=mainCfg', true); } @@ -1805,9 +1805,9 @@ function workerUpdate(iCount, sType, sIdentifier) { // FIXME: Set new background image (renew random value at the end) // Reparse the automap on changed map configuration - eventlog("worker", "info", "Map configuration file was updated. Reparsing the map."); + eventlog("worker", "info", "Automap configuration file was updated. Reparsing the map."); if(parseAutomap(oCurrentFileAges[oPageProperties.map_name], oPageProperties.map_name) === false) { - eventlog("worker", "error", "Problem while reparsing the map after new map configuration"); + eventlog("worker", "error", "Problem while reparsing the automap after new configuration"); } } @@ -1845,7 +1845,7 @@ function workerUpdate(iCount, sType, sIdentifier) { var map = oPageProperties.map_name; // Create request string - var sUrlPart = '&i[]='+obj_id+'&m[]='+map+'&t[]='+type+'&n1[]='+name; + var sUrlPart = '&i[]='+escapeUrlValues(obj_id)+'&m[]='+escapeUrlValues(map)+'&t[]='+type+'&n1[]='+name; if(service_description) { sUrlPart = sUrlPart + '&n2[]='+escapeUrlValues(service_description); } else { @@ -1876,12 +1876,6 @@ function workerUpdate(iCount, sType, sIdentifier) { o = null; aUrlParts = null; - // Update shapes when needed - if(aShapesToUpdate.length > 0) { - updateShapes(aShapesToUpdate); - } - aShapesToUpdate = null; - // When some state changed on the map update the title and favicon if(bStateChanged) { updateMapBasics(); diff --git a/share/server/core/classes/GlobalMessage.php b/share/server/core/classes/GlobalMessage.php index 7a898bf..86d5590 100644 --- a/share/server/core/classes/GlobalMessage.php +++ b/share/server/core/classes/GlobalMessage.php @@ -82,7 +82,7 @@ class GlobalMessage { // Build an ajax compatible message or a message in HTML format depending on // page which is being called if(CONST_AJAX) { - $MSG = new CoreMessage(strtolower($type), $message, $pathHtmlBase, $title, $bReload, $sRedirect); + $MSG = new CoreMessage(strtolower($type), $message, $pathHtmlBase, $title); print($MSG); } else { $MSG = new FrontendMessage(strtolower($type), $message, $pathHtmlBase, $title); ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
