Opened 14 years ago

Closed 14 years ago

#627 closed defect (fixed)

gazetteer WFS delivers all WFS confs.....

Reported by: marc Owned by: marc
Priority: major Milestone: 2.6.1 release
Component: administration Version: 2.6.1
Keywords: wfs Cc: verenadiewald

Description

... even if they're not defined over the element vars. Status:
(Fresh installation from 2.6 branch).

Change History (3)

comment:1 by marc, 14 years ago

I think function names were mixed up.

if ($command == "getWfsConf") {
	
	$wfsConfIdString = $_GET["wfsConfIdString"];
	
	if ($wfsConfIdString != "") {
		//array_keys(array_flip()) produces an array with unique entries
		$wfsConfIdArray = array_keys(array_flip(mb_split(",", $wfsConfIdString)));
	}
	else {
		echo "please specify wfs conf id.";
		die();
	}
	
	$obj = new WfsConf();
	$obj->load($wfsConfIdArray);
	$json = new Mapbender_JSON();
	$output = $json->encode($obj->confArray);
	echo $output;
}
elseif ($command == "getWfsConfsForThisApplication") {
	
	$user = new User($_SESSION["mb_user_id"]);

	// get all WFS conf IDs for this application
	$availableWfsConfIds = $user->getWfsConfByPermission($_SESSION["gui_id"]);
	
	$obj = new WfsConf();
	$obj->load($availableWfsConfIds);
	$json = new Mapbender_JSON();
	$output = $json->encode($obj->confArray);
	echo $output;
}

comment:2 by marc, 14 years ago

Cc: verenadiewald added
Version: 2.6 rc12.6.1

above-mentioned is a code snipped of mod_wfs_gazetteer_server.

$command == "getWfsConf"

delivers all wfs Conf's by this application

$command == "getWfsConfsForThisApplication"

delivers all wfs Confs by by User

comment:3 by tbaschetti, 14 years ago

Resolution: fixed
Status: newclosed

fixed, user-permission and element_vars are now respected

Note: See TracTickets for help on using tickets.