[Mapbender-commits] r9289 - in trunk/mapbender: http/classes http/php lib
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Sep 22 06:04:10 PDT 2015
Author: armin11
Date: 2015-09-22 06:04:10 -0700 (Tue, 22 Sep 2015)
New Revision: 9289
Modified:
trunk/mapbender/http/classes/class_group.php
trunk/mapbender/http/php/mod_editGroup.php
trunk/mapbender/http/php/wms.php
trunk/mapbender/lib/editGroup.php
Log:
Possibility to edit the group homepage via html form & bugfix for authority url generator.
Modified: trunk/mapbender/http/classes/class_group.php
===================================================================
--- trunk/mapbender/http/classes/class_group.php 2015-09-14 19:21:40 UTC (rev 9288)
+++ trunk/mapbender/http/classes/class_group.php 2015-09-22 13:04:10 UTC (rev 9289)
@@ -42,6 +42,7 @@
var $facsimiletelephone;
var $email;
var $logo_path;
+ var $homepage;
static $displayName = "Group";
static $internalName = "group";
@@ -94,7 +95,8 @@
"voicetelephone" => $this->voicetelephone,
"facsimiletelephone" => $this->facsimiletelephone,
"email" => $this->email,
- "logo_path" => $this->logo_path
+ "logo_path" => $this->logo_path,
+ "homepage" => $this->homepage
);
}
@@ -159,6 +161,7 @@
$this->facsimiletelephone = isset($changes->facsimiletelephone) ? $changes->facsimiletelephone : $this->facsimiletelephone;
$this->email = isset($changes->email) ? $changes->email : $this->email;
$this->logo_path = isset($changes->logo_path) ? $changes->logo_path : $this->logo_path;
+ $this->homepage = isset($changes->homepage) ? $changes->homepage : $this->homepage;
return true;
}
@@ -177,8 +180,9 @@
"mb_group_voicetelephone = $10, ".
"mb_group_facsimiletelephone = $11, ".
"mb_group_email = $12, ".
- "mb_group_logo_path = $13 ".
- "WHERE mb_group_id = $14";
+ "mb_group_logo_path = $13, ".
+ "mb_group_homepage = $14 ".
+ "WHERE mb_group_id = $15";
$v = array(
@@ -195,13 +199,14 @@
$this->facsimiletelephone,
$this->email,
$this->logo_path,
+ $this->homepage,
$this->id
);
$t = array(
"s", "i", "s", "s", "s",
"i", "s", "s", "s", "s",
- "s", "s", "s", "i"
+ "s", "s", "s", "s", "i"
);
$update_result = db_prep_query($sql_update,$v,$t);
@@ -259,7 +264,8 @@
$this->voicetelephone = $row["mb_group_voicetelephone"];
$this->facsimiletelephone = $row["mb_group_facsimiletelephone"];
$this->email = $row["mb_group_email"];
- $this->logo_path = $row["mb_group_logo_path"];
+ $this->logo_path = $row["mb_group_logo_path"];
+ $this->homepage = $row["mb_group_homepage"];
}
else{
throw new Exception("Group with ID " . $this->id . " does not exist.");
Modified: trunk/mapbender/http/php/mod_editGroup.php
===================================================================
--- trunk/mapbender/http/php/mod_editGroup.php 2015-09-14 19:21:40 UTC (rev 9288)
+++ trunk/mapbender/http/php/mod_editGroup.php 2015-09-22 13:04:10 UTC (rev 9289)
@@ -26,7 +26,7 @@
//security_patch_log(__FILE__,__LINE__);
//import_request_variables("PG");
-$postvars = explode(",", "selected_group,name,title,owner_name,owner_id,description,address,postcode,city,stateorprovince,country,voicetelephone,facsimiletelephone,email,logo_path,action");
+$postvars = explode(",", "selected_group,name,title,owner_name,owner_id,description,address,postcode,city,stateorprovince,country,voicetelephone,facsimiletelephone,email,logo_path,homepage,action");
foreach ($postvars as $value) {
$$value = $_POST[$value];
}
@@ -37,4 +37,4 @@
$myGroup = false;
include "../../lib/editGroup.php";
-?>
\ No newline at end of file
+?>
Modified: trunk/mapbender/http/php/wms.php
===================================================================
--- trunk/mapbender/http/php/wms.php 2015-09-14 19:21:40 UTC (rev 9288)
+++ trunk/mapbender/http/php/wms.php 2015-09-22 13:04:10 UTC (rev 9289)
@@ -173,7 +173,11 @@
$AuthorityName = "defaultauthority";
}
if ($AuthorityUrl == '') {
- $AuthorityUrl = "http://www.mapbender.org";
+ if (defined("METADATA_DEFAULT_CODESPACE") && METADATA_DEFAULT_CODESPACE != '') {
+ $AuthorityUrl = METADATA_DEFAULT_CODESPACE;
+ } else {
+ $AuthorityUrl = "http://www.mapbender.org";
+ }
}
//Get Geometry Type if featuretype info was requested
@@ -1090,7 +1094,11 @@
if (defined('METADATA_DEFAULT_CODESPACE')) {
$datasetId = METADATA_DEFAULT_CODESPACE."#".$row_metadata["uuid"];
} else {
- $datasetId = "http://www.mapbender.org"."#".$row_metadata["uuid"];
+ if (defined("METADATA_DEFAULT_CODESPACE") && METADATA_DEFAULT_CODESPACE != '') {
+ $datasetId = METADATA_DEFAULT_CODESPACE."#".$row_metadata["uuid"];
+ } else {
+ $datasetId = "http://www.mapbender.org"."#".$row_metadata["uuid"];
+ }
}
} else {
$datasetId = $row_metadata["datasetid"]; //really datasetid or only second part?
Modified: trunk/mapbender/lib/editGroup.php
===================================================================
--- trunk/mapbender/lib/editGroup.php 2015-09-14 19:21:40 UTC (rev 9288)
+++ trunk/mapbender/lib/editGroup.php 2015-09-22 13:04:10 UTC (rev 9289)
@@ -74,6 +74,7 @@
$changes->facsimiletelephone = $facsimiletelephone;
$changes->email = $email;
$changes->logo_path = $logo_path;
+ $changes->homepage = $homepage;
$group->change($changes);
$group->create();
@@ -104,6 +105,7 @@
$changes->facsimiletelephone = $facsimiletelephone;
$changes->email = $email;
$changes->logo_path = $logo_path;
+ $changes->homepage = $homepage;
$group->change($changes);
$group->commit();
@@ -126,6 +128,7 @@
$facsimiletelephone = "";
$email = "";
$logo_path = "";
+ $homepage = "";
}
/*HTML*****************************************************************************************************/
@@ -178,6 +181,7 @@
$facsimiletelephone = $data["facsimiletelephone"];
$email = $data["email"];
$logo_path = $data["logo_path"];
+ $homepage = $data["homepage"];
}
$owner = new User(intval($owner_id));
if ($owner->isValid()) {
@@ -304,6 +308,14 @@
echo "</td>";
echo "</tr>";
+#logo
+echo "<tr>";
+ echo "<td>Homepage: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='homepage' value='" .
+ htmlentities($homepage, ENT_QUOTES, "UTF-8") . "'>";
+ echo "</td>";
+echo "</tr>";
# blank row
echo "<tr>";
echo "<td colspan='2'> </td>";
@@ -329,4 +341,4 @@
<input type='hidden' name='action' value=''>
</form>
</body>
-</html>
\ No newline at end of file
+</html>
More information about the Mapbender_commits
mailing list