svn commit: r922 - trunk/mapbender/http/javascripts/mod_loadwmc.php
christoph at osgeo.org
christoph at osgeo.org
Tue Nov 21 07:22:21 EST 2006
Author: christoph
Date: 2006-11-21 12:22:20+0000
New Revision: 922
Modified:
trunk/mapbender/http/javascripts/mod_loadwmc.php
Log:
* include via dirname(__FILE__)
* commented load options (layer_preview etc)
Modified: trunk/mapbender/http/javascripts/mod_loadwmc.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_loadwmc.php?view=diff&rev=922&p1=trunk/mapbender/http/javascripts/mod_loadwmc.php&p2=trunk/mapbender/http/javascripts/mod_loadwmc.php&r1=921&r2=922
==============================================================================
--- trunk/mapbender/http/javascripts/mod_loadwmc.php (original)
+++ trunk/mapbender/http/javascripts/mod_loadwmc.php 2006-11-21 12:22:20+0000
@@ -17,8 +17,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-require_once("../../conf/mapbender.conf");
-require_once("../classes/class_wmc.php");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../classes/class_wmc.php");
$gui_id = $_REQUEST["gui_id"];
@@ -44,13 +44,23 @@
function load_wmc_session() {
<?php
- if ($_SESSION['mb_wmc']) {
+ if (isset($_SESSION['mb_wmc'])) {
$wmc = new wmc();
- $wmc->createObjFromWMC_xml($_SESSION['mb_wmc']);
-
- $js = $wmc->createJsObjFromWMC("", $e_target, "load");
- echo $js;
-
+ if ($wmc->createObjFromWMC_xml($_SESSION['mb_wmc'])) {
+/*
+ if ($_SESSION['layer_preview']) {
+ $js = $wmc->createJsObjFromWMC("", $e_target, "load");
+ }
+ else if ($_SESSION['startup'] == true) {
+ $js = $wmc->createJsObjFromWMC("", $e_target, "merge");
+ $_SESSION['startup'] = false;
+ }
+ else {
+*/
+ $js = $wmc->createJsObjFromWMC("", $e_target, "load");
+// }
+ echo $js;
+ }
}
?>
}
More information about the Mapbender_commits
mailing list