[Mpuls-commits] r4466 - base/trunk/mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Dec 29 14:57:49 CET 2010


Author: torsten
Date: 2010-12-29 14:57:49 +0100 (Wed, 29 Dec 2010)
New Revision: 4466

Modified:
   base/trunk/mpulsweb/lib/search.py
Log:
* mpulsweb/lib/search.py(_get_options): New. Isolted function wo
	return search options based on search string.


Modified: base/trunk/mpulsweb/lib/search.py
===================================================================
--- base/trunk/mpulsweb/lib/search.py	2010-12-29 13:55:25 UTC (rev 4465)
+++ base/trunk/mpulsweb/lib/search.py	2010-12-29 13:57:49 UTC (rev 4466)
@@ -135,6 +135,13 @@
             checked[key] = value
         return checked
 
+    def _get_options(self, search):
+        if isinstance(search, basestring):
+            options = self._parse_search_str(search)
+        else:
+            options = self.check_search_options(search)
+        return options
+
     def _build_sql(self, options):
         pass
 
@@ -159,10 +166,7 @@
         string containing the search options in the format parsed by the
         _parse_search_str method.
         """
-        if isinstance(search, basestring):
-            options = self._parse_search_str(search)
-        else:
-            options = self.check_search_options(search)
+        options = self._get_options(search)
         return self.queryDB(self._build_sql(options))
 
     def validate_form_params(self, params):



More information about the Mpuls-commits mailing list