[Mapbender-commits] r9144 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jan 12 01:54:40 PST 2015
Author: verenadiewald
Date: 2015-01-12 01:54:40 -0800 (Mon, 12 Jan 2015)
New Revision: 9144
Modified:
trunk/mapbender/http/plugins/mb_owsproxy_log_csv.php
Log:
reverted last change ("enable two ways of filling the user select box in the form for owsproxy_csv")
Modified: trunk/mapbender/http/plugins/mb_owsproxy_log_csv.php
===================================================================
--- trunk/mapbender/http/plugins/mb_owsproxy_log_csv.php 2015-01-09 10:21:41 UTC (rev 9143)
+++ trunk/mapbender/http/plugins/mb_owsproxy_log_csv.php 2015-01-12 09:54:40 UTC (rev 9144)
@@ -1,7 +1,6 @@
<?php
require_once dirname(__FILE__) . "/../../core/globalSettings.php";
-require_once dirname(__FILE__) . "/../../conf/geoportal.conf";
$LIMIT_INT = OWS_LOG_EXPORT_LIMIT;
@@ -28,61 +27,20 @@
if($_REQUEST['action'] == "getForm"){
$mb_user_id = $_SESSION['mb_user_id'];
-
- if (defined("SECURED_SERVICES_GUIS") && SECURED_SERVICES_GUIS !== "" ) {
- // SQL für WMS Services
- $v = array($mb_user_id);
- $t = array('i');
- $wmses = array();
- $sql = "SELECT DISTINCT w.wms_id,w.wms_title"
- ." FROM mb_proxy_log AS m INNER JOIN wms AS w ON"
- ." (m.fkey_wms_id = w.wms_id AND w.wms_owner=$1)"
- ." ORDER BY w.wms_title ";
- $result = db_prep_query($sql,$v,$t);
- while($row = db_fetch_assoc($result)){
- #$users[$row['mb_user_id']] = $row['mb_user_name'];
- $wmses[$row['wms_id']] = $row['wms_title'];
- }
-
- // SQL für User mit geschützten Diensten
- $securedServiceGuis = explode(",", SECURED_SERVICES_GUIS);
-
- $vUser = array();
- $tUser = array();
- $users = array();
- $sqlUser = "SELECT DISTINCT g.fkey_mb_user_id, u.mb_user_name FROM gui_mb_user g ".
- "LEFT JOIN mb_user u ON u.mb_user_id = g.fkey_mb_user_id ".
- "WHERE fkey_gui_id ";
- $inOffset = 1;
- foreach($securedServiceGuis as $gui) {
- $vUser[] = trim($gui);
- $tUser[] = "s";
- $inParams[] = "$".$inOffset;
- $inOffset++;
- }
- $sqlUser .= "IN (" .implode(",",$inParams) .")";
- $sqlUser .= " ORDER BY u.mb_user_name ASC;";
- $resultUser = db_prep_query($sqlUser,$vUser,$tUser);
- while($rowUser = db_fetch_assoc($resultUser)){
- $users[$rowUser['fkey_mb_user_id']] = $rowUser['mb_user_name'];
- }
- }
- else {
- $v = array($mb_user_id);
- $t = array('i');
- $users = array();
- $wmses = array();
- $sql = "SELECT DISTINCT u.mb_user_id, w.wms_id,w.wms_title,u.mb_user_name"
- ." FROM mb_proxy_log AS m INNER JOIN wms AS w ON"
- ." (m.fkey_wms_id = w.wms_id AND w.wms_owner=$1)"
- ." INNER JOIN mb_user u ON(m.fkey_mb_user_id = u.mb_user_id)"
- ." ORDER BY u.mb_user_name ASC, u.mb_user_id ";
- $result = db_prep_query($sql,$v,$t);
- while($row = db_fetch_assoc($result)){
- $users[$row['mb_user_id']] = $row['mb_user_name'];
- $wmses[$row['wms_id']] = $row['wms_title'];
- }
- }
+ $v = array($mb_user_id);
+ $t = array('i');
+ $users = array();
+ $wmses = array();
+ $sql = "SELECT DISTINCT u.mb_user_id, w.wms_id,w.wms_title,u.mb_user_name"
+ ." FROM mb_proxy_log AS m INNER JOIN wms AS w ON"
+ ." (m.fkey_wms_id = w.wms_id AND w.wms_owner=$1)"
+ ." INNER JOIN mb_user u ON(m.fkey_mb_user_id = u.mb_user_id)"
+ ." ORDER BY u.mb_user_name ASC, u.mb_user_id ";
+ $result = db_prep_query($sql,$v,$t);
+ while($row = db_fetch_assoc($result)){
+ $users[$row['mb_user_id']] = $row['mb_user_name'];
+ $wmses[$row['wms_id']] = $row['wms_title'];
+ }
$form = '<div class="form">
<input name="serviceType" id="serviceType" value="wms" type="hidden" />
More information about the Mapbender_commits
mailing list