[Mapbender-commits] r2095 - branches/2.4.5/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Feb 18 09:18:16 EST 2008


Author: christoph
Date: 2008-02-18 09:18:16 -0500 (Mon, 18 Feb 2008)
New Revision: 2095

Modified:
   branches/2.4.5/http/php/mod_createUser.php
   branches/2.4.5/http/php/mod_deleteGUI.php
   branches/2.4.5/http/php/mod_deleteWFS.php
   branches/2.4.5/http/php/mod_editElementVars.php
   branches/2.4.5/http/php/mod_forgottenPassword.php
   branches/2.4.5/http/php/mod_gazLayerObj_conf.php
   branches/2.4.5/http/php/mod_gazLayerObj_edit.php
   branches/2.4.5/http/php/mod_gazetteer_conf.php
   branches/2.4.5/http/php/mod_gazetteer_edit.php
   branches/2.4.5/http/php/mod_loadCapabilitiesList.php
   branches/2.4.5/http/php/mod_loadWFSCapabilities.php
   branches/2.4.5/http/php/mod_loadwfs.php
   branches/2.4.5/http/php/mod_log.php
   branches/2.4.5/http/php/mod_owsproxy_conf.php
   branches/2.4.5/http/php/mod_renameGUI.php
   branches/2.4.5/http/php/mod_treefolderAdmin.php
   branches/2.4.5/http/php/mod_treefolderClient.php
   branches/2.4.5/http/php/mod_wfs_conf.php
   branches/2.4.5/http/php/mod_wfs_edit.php
   branches/2.4.5/http/php/mod_wfs_result.php
   branches/2.4.5/http/php/nestedSets.php
Log:
added permission/session check to admin modules

Modified: branches/2.4.5/http/php/mod_createUser.php
===================================================================
--- branches/2.4.5/http/php/mod_createUser.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_createUser.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -20,6 +20,7 @@
 
 import_request_variables("PG");
 require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 if(PORTAL != true){
 	echo "This module is disabled. Please check your mapbender.conf.";
 	die;	

Modified: branches/2.4.5/http/php/mod_deleteGUI.php
===================================================================
--- branches/2.4.5/http/php/mod_deleteGUI.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_deleteGUI.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -19,7 +19,7 @@
 
 session_start();
 import_request_variables("PG");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
 require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
 $con = db_connect($DBSERVER,$OWNER,$PW);
 db_select_db(DB,$con);

Modified: branches/2.4.5/http/php/mod_deleteWFS.php
===================================================================
--- branches/2.4.5/http/php/mod_deleteWFS.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_deleteWFS.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -19,7 +19,7 @@
 
 session_start();
 import_request_variables("PG");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
 require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
 $con = db_connect($DBSERVER,$OWNER,$PW);
 db_select_db(DB,$con);

Modified: branches/2.4.5/http/php/mod_editElementVars.php
===================================================================
--- branches/2.4.5/http/php/mod_editElementVars.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_editElementVars.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -19,7 +19,7 @@
 
 import_request_variables("PG");
 session_start();
-//include(dirname(__FILE__)."/../php/mb_validateSession.php");
+include(dirname(__FILE__)."/../php/mb_validateSession.php");
 require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
 $con = db_connect($DBSERVER,$OWNER,$PW);
 db_select_db(DB,$con);

Modified: branches/2.4.5/http/php/mod_forgottenPassword.php
===================================================================
--- branches/2.4.5/http/php/mod_forgottenPassword.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_forgottenPassword.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -19,6 +19,7 @@
 
 require_once(dirname(__FILE__)."/../classes/class_administration.php");
 require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 import_request_variables("PG");
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Modified: branches/2.4.5/http/php/mod_gazLayerObj_conf.php
===================================================================
--- branches/2.4.5/http/php/mod_gazLayerObj_conf.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_gazLayerObj_conf.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -17,6 +17,7 @@
 # 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(dirname(__FILE__)."/../php/mb_validateSession.php");
 require(dirname(__FILE__)."/../classes/class_wfs_conf.php");
 require(dirname(__FILE__)."/../../conf/mapbender.conf");
 ?>

Modified: branches/2.4.5/http/php/mod_gazLayerObj_edit.php
===================================================================
--- branches/2.4.5/http/php/mod_gazLayerObj_edit.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_gazLayerObj_edit.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -17,6 +17,7 @@
 # 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(dirname(__FILE__)."/../php/mb_validateSession.php");
 require(dirname(__FILE__)."/../../conf/mapbender.conf");
 ?>
 <html>

Modified: branches/2.4.5/http/php/mod_gazetteer_conf.php
===================================================================
--- branches/2.4.5/http/php/mod_gazetteer_conf.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_gazetteer_conf.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -17,6 +17,7 @@
 # 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(dirname(__FILE__)."/../php/mb_validateSession.php");
 require(dirname(__FILE__)."/../classes/class_wfs_conf.php");
 require(dirname(__FILE__)."/../../conf/mapbender.conf");
 ?>
@@ -127,7 +128,7 @@
 			echo "<tr><td>Title:</td><td>".$aWFS->wfs_title[$i]."</td></tr>";
 			echo "<tr><td>Abstract:</td><td>".$aWFS->wfs_abstract[$i]."</td></tr>";
 			echo "<tr><td>Capabilities:</td><td>".$aWFS->wfs_getcapabilities[$i]."</td></tr>";
-			echo "<tr><td>FeaturTypes:</td><td>".$aWFS->wfs_describefeaturetype[$i]."</td></tr>";
+			echo "<tr><td>FeatureTypes:</td><td>".$aWFS->wfs_describefeaturetype[$i]."</td></tr>";
 			echo "<tr><td>Feature:</td><td>".$aWFS->wfs_getfeature[$i]."</td></tr>";
 			echo "</table>";
 		}

Modified: branches/2.4.5/http/php/mod_gazetteer_edit.php
===================================================================
--- branches/2.4.5/http/php/mod_gazetteer_edit.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_gazetteer_edit.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -17,6 +17,7 @@
 # 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(dirname(__FILE__)."/../php/mb_validateSession.php");
 require(dirname(__FILE__)."/../../conf/mapbender.conf");
 ?>
 <html>

Modified: branches/2.4.5/http/php/mod_loadCapabilitiesList.php
===================================================================
--- branches/2.4.5/http/php/mod_loadCapabilitiesList.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_loadCapabilitiesList.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -22,7 +22,7 @@
 $con = db_connect(DBSERVER,OWNER,PW);
 db_select_db(DB,$con);
 
-include(dirname(__FILE__)."/../php/mb_validateSession.php");
+include(dirname(__FILE__)."/../php/mb_validatePermission.php");
 import_request_variables("PG");
 ?>
 

Modified: branches/2.4.5/http/php/mod_loadWFSCapabilities.php
===================================================================
--- branches/2.4.5/http/php/mod_loadWFSCapabilities.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_loadWFSCapabilities.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -19,7 +19,7 @@
 
 session_start();
 
-include(dirname(__FILE__)."/../php/mb_validateSession.php");
+include(dirname(__FILE__)."/../php/mb_validatePermission.php");
 include(dirname(__FILE__)."/../../conf/mapbender.conf");
 $con = db_connect(DBSERVER,OWNER,PW);
 db_select_db(DB,$con);

Modified: branches/2.4.5/http/php/mod_loadwfs.php
===================================================================
--- branches/2.4.5/http/php/mod_loadwfs.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_loadwfs.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -20,6 +20,7 @@
 session_start();
 
 require_once(dirname(__FILE__)."/mb_validateInput.php");
+include(dirname(__FILE__)."/../php/mb_validateSession.php");
 require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
 require_once(dirname(__FILE__)."/../classes/class_wfs.php"); 
 echo "file: ".$_REQUEST["xml_file"];

Modified: branches/2.4.5/http/php/mod_log.php
===================================================================
--- branches/2.4.5/http/php/mod_log.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_log.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -17,6 +17,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+include(dirname(__FILE__)."/../php/mb_validateSession.php");
 $con = db_connect(DBSERVER,OWNER,PW);
 db_select_db(DB,$con);
 if($_REQUEST['req']){

Modified: branches/2.4.5/http/php/mod_owsproxy_conf.php
===================================================================
--- branches/2.4.5/http/php/mod_owsproxy_conf.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_owsproxy_conf.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -17,7 +17,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-include(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
 include(dirname(__FILE__)."/../classes/class_administration.php");
 $admin = new administration();
 $ownwms = $admin->getWmsByOwner($_SESSION["mb_user_id"]);

Modified: branches/2.4.5/http/php/mod_renameGUI.php
===================================================================
--- branches/2.4.5/http/php/mod_renameGUI.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_renameGUI.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -22,7 +22,7 @@
 $con = db_connect(DBSERVER,OWNER,PW);
 db_select_db(DB,$con);
 import_request_variables("PG");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
 $self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
 ?>
 

Modified: branches/2.4.5/http/php/mod_treefolderAdmin.php
===================================================================
--- branches/2.4.5/http/php/mod_treefolderAdmin.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_treefolderAdmin.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -20,6 +20,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 import_request_variables("PG");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
 $con = db_connect($DBSERVER,$OWNER,$PW);
 db_select_db(DB,$con);

Modified: branches/2.4.5/http/php/mod_treefolderClient.php
===================================================================
--- branches/2.4.5/http/php/mod_treefolderClient.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_treefolderClient.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -20,6 +20,7 @@
 session_start();
 
 import_request_variables("PG");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
 $con = db_connect($DBSERVER,$OWNER,$PW);
 db_select_db(DB,$con);

Modified: branches/2.4.5/http/php/mod_wfs_conf.php
===================================================================
--- branches/2.4.5/http/php/mod_wfs_conf.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_wfs_conf.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -19,6 +19,8 @@
 
 require(dirname(__FILE__)."/../classes/class_wfs_conf.php");
 require(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
 $con = db_connect(DBSERVER,OWNER,PW);
 db_select_db(DB,$con);
 ?>

Modified: branches/2.4.5/http/php/mod_wfs_edit.php
===================================================================
--- branches/2.4.5/http/php/mod_wfs_edit.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_wfs_edit.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -18,6 +18,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 require(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
 ?>
 <html>
 <head>

Modified: branches/2.4.5/http/php/mod_wfs_result.php
===================================================================
--- branches/2.4.5/http/php/mod_wfs_result.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/mod_wfs_result.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -18,7 +18,11 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 $filter = stripslashes($_REQUEST["filter"]);
-$url = stripslashes($_REQUEST['url']);
+$url = stripslashes($_REQUEST["url"]);
+$js_wfs_conf_id = $_REQUEST["js_wfs_conf_id"];
+$db_wfs_conf_id = $_REQUEST["db_wfs_conf_id"];
+$typename = $_REQUEST["typename"];
+
 //echo $filter; die();
 require_once("../../conf/mapbender.conf");
 require_once("../classes/class_stripRequest.php");
@@ -60,7 +64,6 @@
 $el = -1;
 $fid = -1;
 
-$typename = $_REQUEST["typename"];
 $element_str = "";
 $geom_str = "";
 foreach ($values as $element) {
@@ -106,7 +109,7 @@
 		}
 		// TO DO: the following is added twice! Once suffices.
 		$element_str .= "geom.get(" . $member . ").e.setElement('fid', '".$fid."');\n";
-		$element_str .= "geom.get(" . $member . ").wfs_conf = ".$_REQUEST['wfs_conf_id'].";\n";
+		$element_str .= "geom.get(" . $member . ").wfs_conf = ".$js_wfs_conf_id.";\n";
 	}
 	else if(strtoupper($element[tag]) == strtoupper("gml:coordinates") && $geom == true){
 		$tmp =  str_replace(",,","",str_replace(" ",",",trim($element[value])));

Modified: branches/2.4.5/http/php/nestedSets.php
===================================================================
--- branches/2.4.5/http/php/nestedSets.php	2008-02-18 14:10:09 UTC (rev 2094)
+++ branches/2.4.5/http/php/nestedSets.php	2008-02-18 14:18:16 UTC (rev 2095)
@@ -20,7 +20,7 @@
 session_start();
 require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
 import_request_variables("PG");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
 $con = db_connect($DBSERVER,$OWNER,$PW);
 db_select_db(DB,$con);
 ?>



More information about the Mapbender_commits mailing list