diff options
author | Michal Čihař <mcihar@suse.cz> | 2013-04-16 19:26:08 +0400 |
---|---|---|
committer | Michal Čihař <mcihar@suse.cz> | 2013-04-16 19:26:08 +0400 |
commit | b5d3b8c7b8f25d8af169574ac0277959a040f21d (patch) | |
tree | 9c03123baeef9bd24387489ccd5e46bff0b971b1 /js/gis_data_editor.js | |
parent | 3361442b615b2405d3ff4cb1addb2229a1b15f4e (diff) |
Declare variables just once
Variables should be declared just once in a function.
Diffstat (limited to 'js/gis_data_editor.js')
-rw-r--r-- | js/gis_data_editor.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/js/gis_data_editor.js b/js/gis_data_editor.js index 8c84f0bd88..30f5029571 100644 --- a/js/gis_data_editor.js +++ b/js/gis_data_editor.js @@ -314,12 +314,13 @@ AJAX.registerOnload('gis_data_editor.js', function () { // Add the new linesting of inner ring based on the type var html = '<br/>'; + var noOfPoints; if (type == 'MULTILINESTRING') { html += PMA_messages.strLineString + ' ' + (noOfLines + 1) + ':'; - var noOfPoints = 2; + noOfPoints = 2; } else { html += PMA_messages.strInnerRing + ' ' + noOfLines + ':'; - var noOfPoints = 4; + noOfPoints = 4; } html += '<input type="hidden" name="' + prefix + '[' + noOfLines + '][no_of_points]" value="' + noOfPoints + '"/>'; for (var i = 0; i < noOfPoints; i++) { |