[Mapbender-commits] r5741 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Mar 10 02:38:49 EST 2010
Author: verenadiewald
Date: 2010-03-10 02:38:40 -0500 (Wed, 10 Mar 2010)
New Revision: 5741
Modified:
trunk/mapbender/http/plugins/mb_initWmc.php
Log:
set case if no wmc id is given by request url
Modified: trunk/mapbender/http/plugins/mb_initWmc.php
===================================================================
--- trunk/mapbender/http/plugins/mb_initWmc.php 2010-03-09 16:25:52 UTC (rev 5740)
+++ trunk/mapbender/http/plugins/mb_initWmc.php 2010-03-10 07:38:40 UTC (rev 5741)
@@ -34,6 +34,9 @@
* http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
*/
require_once(dirname(__FILE__) . "/../classes/class_wmc.php");
+
+$wmcId = Mapbender::session()->get("mb_myWmc");
+$wmcAction = Mapbender::session()->get("mb_myWmc_action");
?>
var myTarget = options.target ? options.target[0] : "mapframe1";
var myId = options ? options.id : "initWmc";
@@ -43,11 +46,8 @@
var that = this;
<?php
- function initWmcById () {
- global $firephp;
+ function initWmcById ($wmcId,$wmcAction) {
- $wmcId = Mapbender::session()->get("mb_myWmc");
- $wmcAction = Mapbender::session()->get("mb_myWmc_action");
$wmc = new wmc();
@@ -66,7 +66,9 @@
$e = new mb_exception("WMC could not be loaded.");
}
}
- initWmcById();
+ if($wmcId != "") {
+ initWmcById($wmcId,$wmcAction);
+ }
?>
};
More information about the Mapbender_commits
mailing list