[Mapbender-commits] r8264 - branches/2.7/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Feb 27 04:15:21 EST 2012
Author: astrid_emde
Date: 2012-02-27 01:15:21 -0800 (Mon, 27 Feb 2012)
New Revision: 8264
Modified:
branches/2.7/http/classes/class_wms.php
Log:
only import < 1000 srs to db, rest will be ignored due to long loading time
Modified: branches/2.7/http/classes/class_wms.php
===================================================================
--- branches/2.7/http/classes/class_wms.php 2012-02-23 07:42:58 UTC (rev 8263)
+++ branches/2.7/http/classes/class_wms.php 2012-02-27 09:15:21 UTC (rev 8264)
@@ -912,13 +912,16 @@
}
if(mb_strtoupper($element[tag]) == "SRS"){
+ if(count($this->wms_srs) < 1000){ //workaround: only import up to 1000 srs
// unique srs only, see http://www.mapbender.org/index.php/Arrays_with_unique_entries
$this->wms_srs = array_keys(array_flip(array_merge($this->wms_srs, explode(" ", strtoupper($element[value])))));
+ }
}
#WMS 1.3.0
if(mb_strtoupper($element[tag]) == "CRS"){
+ if(count($this->wms_srs) < 1000){ //workaround: only import up to 1000 srs
// unique srs only, see http://www.mapbender.org/index.php/Arrays_with_unique_entries
- $this->wms_srs = array_keys(array_flip(array_merge($this->wms_srs, explode(" ", strtoupper($element[value])))));
+ $this->wms_srs = array_keys(array_flip(array_merge($this->wms_srs, explode(" ", strtoupper($element[value]))))); }
}
#WMS 1.3.0
if(mb_strtoupper($element[tag]) == "EX_GEOGRAPHICBOUNDINGBOX" && $element[type] == "open"){
@@ -1907,15 +1910,15 @@
}
}
function insertSRS($myWMS){
- for($i=0; $i<count($this->wms_srs);$i++){
- $sql ="INSERT INTO wms_srs (fkey_wms_id, wms_srs) values($1,$2)";
- $v = array($myWMS,mb_strtoupper($this->wms_srs[$i]));
- $t = array('i','s');
- $res = db_prep_query($sql,$v,$t);
- if(!$res){
- db_rollback();
+ for($i=0; $i<count($this->wms_srs);$i++){
+ $sql ="INSERT INTO wms_srs (fkey_wms_id, wms_srs) values($1,$2)";
+ $v = array($myWMS,mb_strtoupper($this->wms_srs[$i]));
+ $t = array('i','s');
+ $res = db_prep_query($sql,$v,$t);
+ if(!$res){
+ db_rollback();
+ }
}
- }
}
function insertTermsOfUse ($myWMS) {
if (!is_numeric($this->wms_termsofuse)) {
More information about the Mapbender_commits
mailing list