$wrong_properties = array_diff($given_properties, $allowed_properties);
if (count($wrong_properties) > 0) throw new Exception("Das Attribut '" . reset($wrong_properties) . "' ist nicht erlaubt bei <" . $feature->getName() . ">. Erlaubt sind: '" . implode("', '", $allowed_properties) . "'.");
foreach ($given_properties as $property) {
- $properties[$property] = (string) $feature[$property];
+ $propval = (string) $feature[$property];
+ if ($property == 'wiki') {
+ $title = Title::newFromText($propval);
+ $propval = $title->getLocalUrl();
+ }
+ $properties[$property] = $propval;
}
$coordinates = geo_to_coordinates($feature);
if (count($coordinates) != 1) throw new Exception('Das Element <' . $feature->getName() . '> muss genau ein Koordinatenpaar haben.');