[Mapbender-commits] r7675 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Mar 3 03:38:14 EST 2011
Author: armin11
Date: 2011-03-03 00:38:14 -0800 (Thu, 03 Mar 2011)
New Revision: 7675
Modified:
trunk/mapbender/http/php/mod_showMetadata.php
Log:
Bugfix: pull contact information for group from the right join.
Modified: trunk/mapbender/http/php/mod_showMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_showMetadata.php 2011-03-02 21:00:50 UTC (rev 7674)
+++ trunk/mapbender/http/php/mod_showMetadata.php 2011-03-03 08:38:14 UTC (rev 7675)
@@ -457,16 +457,16 @@
if (!isset($resourceMetadata['fkey_mb_group_id']) or isnull($resourceMetadata['fkey_mb_group_id'])){
$e = new mb_notice("mod_showMetadata: fkey_mb_group_id not found!");
//Get information about owning user of the relation mb_user_mb_group - alternatively the defined fkey_mb_group_id from the service must be used!
- $sqlDep = "SELECT mb_group_name as metdatapointofcontactorgname, mb_group_title as metdatapointofcontactorgtitle, mb_group_id, mb_group_logo_path as metdatapointofcontactorglogo, mb_group_address as metdatapointofcontactorgaddress, mb_group_email as metdatapointofcontactorgemail, mb_group_postcode as metdatapointofcontactorgpostcode, mb_group_city as metdatapointofcontactorgcity, mb_group_voicetelephone as metdatapointofcontactorgtelephone, mb_group_facsimiletelephone as metdatapointofcontactorgfax FROM mb_group AS a, mb_user AS b, mb_user_mb_group AS c WHERE b.mb_user_id = $1 AND b.mb_user_id = c.fkey_mb_user_id AND c.fkey_mb_group_id = a.mb_group_id AND b.mb_user_department = a.mb_group_description LIMIT 1";
+ $sqlDep = "SELECT mb_group_name as metadatapointofcontactorgname, mb_group_title as metadatapointofcontactorgtitle, mb_group_id, mb_group_logo_path as metadatapointofcontactorglogo, mb_group_address as metadatapointofcontactorgaddress, mb_group_email as metadatapointofcontactorgemail, mb_group_postcode as metadatapointofcontactorgpostcode, mb_group_city as metadatapointofcontactorgcity, mb_group_voicetelephone as metadatapointofcontactorgtelephone, mb_group_facsimiletelephone as metadatapointofcontactorgfax FROM mb_group AS a, mb_user AS b, mb_user_mb_group AS c WHERE b.mb_user_id = $1 AND b.mb_user_id = c.fkey_mb_user_id AND c.fkey_mb_group_id = a.mb_group_id AND c.mb_user_mb_group_type=1 LIMIT 1";
$vDep = array($resourceMetadata['owner']);
$tDep = array('i');
$resDep = db_prep_query($sqlDep, $vDep, $tDep);
$metadataContactGroup = db_fetch_array($resDep);
$e = new mb_notice("mod_showMetadata: mb_group_id: ".$metadataContactGroup['mb_group_id']);
- $e = new mb_notice("mod_showMetadata: mb_group_logo_path: ".$metadataContactGroup['metdatapointofcontactorglogo']);
+ $e = new mb_notice("mod_showMetadata: mb_group_logo_path: ".$metadataContactGroup['metadatapointofcontactorglogo']);
} else {
$e = new mb_notice("mod_showMetadata: fkey_mb_group_id found!");
- $sqlDep = "SELECT mb_group_name as metdatapointofcontactorgname, mb_group_title as metdatapointofcontactorgtitle, mb_group_id, mb_group_logo_path as metdatapointofcontactorglogo, mb_group_address as metdatapointofcontactorgaddress, mb_group_email as metdatapointofcontactorgemail, mb_group_postcode as metdatapointofcontactorgpostcode, mb_group_city as metdatapointofcontactorgcity, mb_group_voicetelephone as metdatapointofcontactorgtelephone, mb_group_facsimiletelephone as metdatapointofcontactorgfax FROM mb_group WHERE mb_group_id = $1 LIMIT 1";
+ $sqlDep = "SELECT mb_group_name as metadatapointofcontactorgname, mb_group_title as metadatapointofcontactorgtitle, mb_group_id, mb_group_logo_path as metadatapointofcontactorglogo, mb_group_address as metadatapointofcontactorgaddress, mb_group_email as metadatapointofcontactorgemail, mb_group_postcode as metadatapointofcontactorgpostcode, mb_group_city as metadatapointofcontactorgcity, mb_group_voicetelephone as metadatapointofcontactorgtelephone, mb_group_facsimiletelephone as metadatapointofcontactorgfax FROM mb_group WHERE mb_group_id = $1 LIMIT 1";
$vDep = array($resourceMetadata['fkey_mb_group_id']);
$tDep = array('i');
$resDep = db_prep_query($sqlDep, $vDep, $tDep);
@@ -572,8 +572,8 @@
$html .= '<script type="text/javascript" src="../extensions/jquery-ui-1.8.1.custom/js/jquery-ui-1.8.1.custom.min.js"></script>';
-/*if ($metadataContactGroup['metdatapointofcontactorglogo'] != '') {
- $html .= "<img src='".$metadataContactGroup['metdatapointofcontactorglogo']."' height='30'>";
+/*if ($metadataContactGroup['metadatapointofcontactorglogo'] != '') {
+ $html .= "<img src='".$metadataContactGroup['metadatapointofcontactorglogo']."' height='30'>";
}
//TODO use right name
$html .= displayText($resourceMetadata['contactorganization']);
@@ -692,8 +692,8 @@
-if ($metadataContactGroup['metdatapointofcontactorglogo'] != '') {
- $html .= $t_a.$translation['contactOrganization'].$t_b."<img src='".$metadataContactGroup['metdatapointofcontactorglogo']."' height='30'>";
+if ($metadataContactGroup['metadatapointofcontactorglogo'] != '') {
+ $html .= $t_a.$translation['contactOrganization'].$t_b."<img src='".$metadataContactGroup['metadatapointofcontactorglogo']."' height='30'>";
}
$html .= displayText($metadataContactGroup['metadatacontactorganization']).$t_c;
if ($resourceMetadata['contentabstract'] != '') {
@@ -868,13 +868,13 @@
$html .= '<h4>'.$translation['metadataProvider'].'</h4>';
$html .= $tableBegin;
-if ($metadataContactGroup['metdatapointofcontactorglogo'] != '') {
- $html .= $t_a.$translation['logo'].$t_b."<img src='".$metadataContactGroup['metdatapointofcontactorglogo']."' height='30'>".$t_c;
+if ($metadataContactGroup['metadatapointofcontactorglogo'] != '') {
+ $html .= $t_a.$translation['logo'].$t_b."<img src='".$metadataContactGroup['metadatapointofcontactorglogo']."' height='30'>".$t_c;
}
-$html .= $t_a.$translation['contactOrganization'].$t_b.displayText($metadataContactGroup['metdatapointofcontactorgtitle']).$t_c;
-$html .= $t_a.$translation['contactAddress'].$t_b.displayText($metadataContactGroup['metdatapointofcontactorgaddress']).$t_c;
-$html .= $t_a.$translation['city'].$t_b.displayText($metadataContactGroup['metdatapointofcontactorgpostcode'].' '.$metadataContactGroup['metdatapointofcontactorgcity']).$t_c;
-$html .= $t_a.$translation['email'].$t_b.displayText($metadataContactGroup['metdatapointofcontactorgemail']).$t_c;
+$html .= $t_a.$translation['contactOrganization'].$t_b.displayText($metadataContactGroup['metadatapointofcontactorgtitle']).$t_c;
+$html .= $t_a.$translation['contactAddress'].$t_b.displayText($metadataContactGroup['metadatapointofcontactorgaddress']).$t_c;
+$html .= $t_a.$translation['city'].$t_b.displayText($metadataContactGroup['metadatapointofcontactorgpostcode'].' '.$metadataContactGroup['metadatapointofcontactorgcity']).$t_c;
+$html .= $t_a.$translation['email'].$t_b.displayText($metadataContactGroup['metadatapointofcontactorgemail']).$t_c;
$html .= $tableEnd;
$html .= '<h4>'.$translation['serviceProvider'].'</h4>';
More information about the Mapbender_commits
mailing list