diff options
Diffstat (limited to 'modules-available/locations')
4 files changed, 21 insertions, 8 deletions
diff --git a/modules-available/locations/baseconfig/getconfig.inc.php b/modules-available/locations/baseconfig/getconfig.inc.php index d4a4f40b..2cf5495d 100644 --- a/modules-available/locations/baseconfig/getconfig.inc.php +++ b/modules-available/locations/baseconfig/getconfig.inc.php @@ -1,7 +1,14 @@ <?php // Location handling: figure out location -$locationId = false; // TODO: machine specific mapping +$locationId = false; +if (Request::any('force', 0, 'int') === 1 && Request::any('module', false, 'string') === 'locations') { + // Force location for testing, but require logged in admin + if (User::load()) { + $locationId = Request::any('value', 0, 'int'); + } +} +// TODO: machine specific mapping if ($locationId === false) { // Fallback to subnets $locationId = Location::getFromIp($ip); diff --git a/modules-available/locations/lang/de/template-tags.json b/modules-available/locations/lang/de/template-tags.json index 13e21217..09ee8a35 100644 --- a/modules-available/locations/lang/de/template-tags.json +++ b/modules-available/locations/lang/de/template-tags.json @@ -6,11 +6,14 @@ "lang_deleteChildLocations": "Untergeordnete Orte ebenfalls l\u00f6schen", "lang_deleteLocation": "Ort l\u00f6schen", "lang_deleteSubnet": "Bereich l\u00f6schen", + "lang_editConfigVariables": "Konfiguration anpassen", "lang_endAddress": "Endadresse", "lang_listOfSubnets": "Liste der Subnetze", "lang_location": "Ort", "lang_locationInfo": "Details zu diesem Ort", "lang_locationName": "Name", + "lang_locationOtherOverlap": "Achtung! Folgende Orte haben sich \u00fcberlappende Netzbereiche", + "lang_locationSelfOverlap": "Folgender Ort hat mehrere sich \u00fcberschneidende Netzbereiche", "lang_locationSettings": "Raum\/Ort bearbeiten", "lang_locationsMainHeading": "Verwaltung von R\u00e4umen\/Orten", "lang_matchingMachines": "Enthaltene Rechner", @@ -21,5 +24,6 @@ "lang_startAddress": "Startadresse", "lang_subnet": "IP-Bereich", "lang_thisListByLocation": "Zur Ortsansicht", - "lang_thisListBySubnet": "Nach Subnetzen auflisten" + "lang_thisListBySubnet": "Nach Subnetzen auflisten", + "lang_unassignedMachines": "Rechner, die in keinen definierten Ort fallen" }
\ No newline at end of file diff --git a/modules-available/locations/lang/en/template-tags.json b/modules-available/locations/lang/en/template-tags.json index 1ea0f56e..bd64554f 100644 --- a/modules-available/locations/lang/en/template-tags.json +++ b/modules-available/locations/lang/en/template-tags.json @@ -6,11 +6,14 @@ "lang_deleteChildLocations": "Delete child locations aswell", "lang_deleteLocation": "Delete location", "lang_deleteSubnet": "Delete range", + "lang_editConfigVariables": "Edit config variables", "lang_endAddress": "End address", "lang_listOfSubnets": "List of subnets", "lang_location": "Ort", "lang_locationInfo": "Location details", "lang_locationName": "Name", + "lang_locationOtherOverlap": "Warning! These locations have overlapping address ranges", + "lang_locationSelfOverlap": "The following location has multiple address ranges that are overlapping", "lang_locationSettings": "Edit this room or location", "lang_locationsMainHeading": "Manage rooms and locations", "lang_matchingMachines": "Matching clients", @@ -21,5 +24,6 @@ "lang_startAddress": "Start address", "lang_subnet": "IP range", "lang_thisListByLocation": "List by location", - "lang_thisListBySubnet": "List by subnet" + "lang_thisListBySubnet": "List by subnet", + "lang_unassignedMachines": "Machines not matching any location" }
\ No newline at end of file diff --git a/modules-available/locations/page.inc.php b/modules-available/locations/page.inc.php index 9de5e521..84bc11a9 100644 --- a/modules-available/locations/page.inc.php +++ b/modules-available/locations/page.inc.php @@ -80,9 +80,9 @@ class Page_Locations extends Page $this->deleteLocation($location); } // Update subnets - $this->updateLocationSubnets($location); + $this->updateLocationSubnets(); // Insert subnets - $this->addNewLocationSubnets($location); // TODO + $this->addNewLocationSubnets($location); // Update location! $this->updateLocationData($location); Util::redirect('?do=Locations'); @@ -148,9 +148,8 @@ class Page_Locations extends Page } } - private function updateLocationSubnets($location) + private function updateLocationSubnets() { - $locationId = (int)$location['locationid']; // Deletion first $dels = Request::post('deletesubnet', false); if (is_array($dels)) { @@ -240,7 +239,6 @@ class Page_Locations extends Page protected function doRender() { - //Render::setTitle(Dictionary::translate('lang_titleBackup')); $getAction = Request::get('action'); if (empty($getAction)) { // Until we have a main landing page? |