[Chameleon-dev] [Bug 1216] New: repeated code in cwcjsapi/cwcjsapi.widget.php

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Thu Dec 15 09:56:18 EST 2005


http://bugzilla.maptools.org/show_bug.cgi?id=1216

           Summary: repeated code in cwcjsapi/cwcjsapi.widget.php
           Product: Chameleon
           Version: 2.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: chameleon-dev at lists.maptools.org
        ReportedBy: mcgrawj at agr.gc.ca


The following code appears in cwcjsapi/cwcjsapi.widget.php's 
GetJavascriptFunctions() (around line 207 - after the CWCJSAPICreateLayer 
function is defined). Both blocks of code are the exact same, except that in 
the second block there is an 'aLayerconnectiontype' set after 
the 'aLayerconnection'. Basically, the first block of code can be removed 
because the second block directly after it is doing the exact same thing, plus 
adding an 'aLayerconnectiontype' to the array.


      $szLayerInfo .="aLayerconnection[".$i."] = '" .  $poLayer-
>connection . "';\n";
      $szLayerInfo .="aLayeronlineresource[".$i."] = '" . $poLayer->getMetaData
("wms_onlineresource")  . "';\n";
      $szLayerInfo .="aLayersrs[".$i."] = '" .  $poLayer->getMetaData
("wms_srs") . "';\n";
      $szLayerInfo .="aLayerversion[".$i."] = '" .  $poLayer->getMetaData
("wms_server_version") . "';\n";
      $szLayerInfo .="aLayerformat[".$i."] = '" .  $poLayer->getMetaData
("wms_format") . "';\n";
      $szLayerInfo .="aLayerformatlist[".$i."] = '" .  $poLayer->getMetaData
("wms_formatlist") . "';\n";


      $szLayerInfo .="aLayerconnection[".$i."] = '" .  $poLayer-
>connection . "';\n";
      $szLayerInfo .="aLayerconnectiontype[".$i."] = '" .  $poLayer-
>connectiontype . "';\n";
      $szLayerInfo .="aLayeronlineresource[".$i."] = '" . $poLayer->getMetaData
("wms_onlineresource")  . "';\n";
      $szLayerInfo .="aLayersrs[".$i."] = '" .  $poLayer->getMetaData
("wms_srs") . "';\n";
      $szLayerInfo .="aLayerversion[".$i."] = '" .  $poLayer->getMetaData
("wms_server_version") . "';\n";
      $szLayerInfo .="aLayerformat[".$i."] = '" .  $poLayer->getMetaData
("wms_format") . "';\n";
      $szLayerInfo .="aLayerformatlist[".$i."] = '" .  $poLayer->getMetaData
("wms_formatlist") . "';\n";



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.


More information about the Chameleon-dev mailing list