[Mpuls-commits] r899 - wasko/branches/2.0/waskaweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Jan 26 15:42:14 CET 2010


Author: torsten
Date: 2010-01-26 15:42:14 +0100 (Tue, 26 Jan 2010)
New Revision: 899

Modified:
   wasko/branches/2.0/waskaweb/lib/helpers.py
Log:
* waskaweb/lib/helpers.py (getCaseShort): Moved function


Modified: wasko/branches/2.0/waskaweb/lib/helpers.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/helpers.py	2010-01-26 14:27:04 UTC (rev 898)
+++ wasko/branches/2.0/waskaweb/lib/helpers.py	2010-01-26 14:42:14 UTC (rev 899)
@@ -51,6 +51,7 @@
 
 log = logging.getLogger(__name__)
 
+# Helper functions to get some information about the logged in user
 def getRole():
     try:
         user = session['USER_AUTHORIZED']
@@ -71,13 +72,6 @@
     except KeyError:
         return ''
 
-def getCaseShort(name, n):
-    if len(name) < n:
-         return name
-    else:
-         n = n-3
-         return "%s..." % (name[:n])
-
 def getLogin():
     try:
         user = session['USER_AUTHORIZED']
@@ -92,6 +86,14 @@
     except KeyError:
         return ''
 
+#
+def getCaseShort(name, n):
+    if len(name) < n:
+         return name
+    else:
+         n = n-3
+         return "%s..." % (name[:n])
+
 def formatNumber(number):
     retval = locale.format("%.2f",(number),1)
     return retval



More information about the Mpuls-commits mailing list