summaryrefslogtreecommitdiff
path: root/tools/mmd
diff options
context:
space:
mode:
authorJogi Hofmüller <jogi@mur.at>2011-08-11 20:11:06 +0000
committerJogi Hofmüller <jogi@mur.at>2011-08-11 20:11:06 +0000
commit3e79920455c129018185610f1f039326459313a0 (patch)
treeb67d9704c816009e30b30a6e5fe7f69ccf8f7827 /tools/mmd
parent- added field altitude to registerFormWidget () (diff)
- added handling of altitude value in register command and Session ()
git-svn-id: https://svn.spreadspace.org/mur.sat@133 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'tools/mmd')
-rw-r--r--tools/mmd/MmdCommands.py3
-rw-r--r--tools/mmd/MmdSession.py3
2 files changed, 5 insertions, 1 deletions
diff --git a/tools/mmd/MmdCommands.py b/tools/mmd/MmdCommands.py
index 45f66af..a60bf51 100644
--- a/tools/mmd/MmdCommands.py
+++ b/tools/mmd/MmdCommands.py
@@ -49,6 +49,7 @@ def register (session):
location_name = session.getQsLocationName ()
password = session.getQsPassword ()
confirm = session.getQsConfirm ()
+ altitude = session.getQsAltitude ()
if password != confirm:
error_message = {'error': 'Password', 'description': 'Passwords do not match.'}
@@ -58,7 +59,7 @@ def register (session):
code = user.create (session.session_id, firstname, lastname, email, callsign, password)
if longitude != '' and latitude != '' and location_name != '':
- user.addLocation (location_name, longitude, latitude, 'yes')
+ user.addLocation (location_name, longitude, latitude, altitude, 'yes')
message = '''From: noreply <noreply@mur.at>
To: "{0} {1}" <{2}>
diff --git a/tools/mmd/MmdSession.py b/tools/mmd/MmdSession.py
index 848a342..93c0a63 100644
--- a/tools/mmd/MmdSession.py
+++ b/tools/mmd/MmdSession.py
@@ -95,6 +95,9 @@ class Session:
def getQsLocationName (self):
return self.getField ('location_name')
+ def getQsAltitude (self):
+ return self.getField ('altitude')
+
def getField (self, field):
try:
return escape (self.qs.get (field)[0])