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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Jan 26 09:59:09 CET 2010


Author: torsten
Date: 2010-01-26 09:59:08 +0100 (Tue, 26 Jan 2010)
New Revision: 857

Modified:
   wasko/branches/2.0/waskaweb/lib/search.py
Log:
* waskaweb/lib/search.py (CaseSearch): Removed code which was
commented out


Modified: wasko/branches/2.0/waskaweb/lib/search.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/search.py	2010-01-26 08:56:34 UTC (rev 856)
+++ wasko/branches/2.0/waskaweb/lib/search.py	2010-01-26 08:59:08 UTC (rev 857)
@@ -110,11 +110,6 @@
                                 allowed_states.append(int(value))
                             if key == 'phase':
                                 phases.append(int(value))
-                            #if key == 'field':
-                            #    field, operator, fvalue = [x.strip() for x in value.split(" ")]
-                            #    fields[field] = fvalue
-                            #if key in ['inconsistency', 'bad']:
-                            #    bad_types.append(value)
                             else:
                                 options[key] = value
                     except ValueError, err :
@@ -208,12 +203,6 @@
                 time_interval = "(coalesce(%(start_field)s, '1970-01-01'::date) <= '%(end_date)s'::date \
                 AND (coalesce(%(end_field)s, now()) >= '%(start_date)s'::date))" % fields
 
-                #time_interval = "(coalesce(%(start_field)s, '1970-01-01'::date) <= '%(end_date)s'::date AND \
-                #coalesce(%(start_field)s, '1970-01-01'::date) <= coalesce(%(end_field)s, st.zugriff) AND \
-                #((m.id in (SELECT id from master_tbl_incm_view) AND \
-                #(coalesce(%(end_field)s, now()) >= '%(start_date)s'::date)) OR \
-                #(st.zugriff >= '%(start_date)s'::date)))" % fields
-
         #Phases
         phases = 'TRUE' #default
         if phaseslist:
@@ -231,16 +220,6 @@
             elif options.get('migration') == '2':
                 migration = "(nat_staat = 2 and (vater_staat != 2 or mutter_staat != 2))"
 
-        ##User defined fieldsearch
-        #fieldsearchlist = [] 
-        #for field, value in fieldsdic.iteritems():
-        #    fieldsearchlist.append("%s = '%s'" % field, value)
-    
-        #if fieldsearchlist:
-        #    fieldsearch = "(%s)" % " AND ".join(fieldsearchlist)
-        #else:
-        #    fieldsearch = 'TRUE'
-
         fields['needle'] = " ".join(search) 
         SQL = SEARCH_CASE_SQL % (",".join([str(x) for x in allowed_states]), ee, allowed_viewer, editor, gender, time_interval, phases, branch, fkz, bad, only_cases_after, migration, sort_field, sort_order) 
         return (SQL, fields)



More information about the Mpuls-commits mailing list