changeset 1451:ad6bfa51d16c

nailed down a bug when there's no revision
author Franz Pletz <fpletz AT franz-pletz DOT org>
date Mon, 21 Aug 2006 19:31:49 +0200
parents 522339274505
children 95a46e89778e
files MoinMoin/action/fullsearch.py MoinMoin/search/builtin.py
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/fullsearch.py	Mon Aug 21 19:27:33 2006 +0200
+++ b/MoinMoin/action/fullsearch.py	Mon Aug 21 19:31:49 2006 +0200
@@ -127,15 +127,15 @@
 
     # search the pages
     from MoinMoin.search import searchPages, QueryParser
-    #try:
+    try:
     query = QueryParser(case=case, regex=regex,
                 titlesearch=titlesearch).parse_query(needle)
     results = searchPages(request, query, sort, mtime, historysearch)
-    #except ValueError:
-    #    err = _('Your search query {{{"%s"}}} is invalid. Please refer to '
-    #            'HelpOnSearching for more information.') % needle
-    #    Page(request, pagename).send_page(request, msg=err)
-    #    return
+    except ValueError:
+        err = _('Your search query {{{"%s"}}} is invalid. Please refer to '
+                'HelpOnSearching for more information.') % needle
+        Page(request, pagename).send_page(request, msg=err)
+        return
 
     # directly show a single hit
     # XXX won't work with attachment search
--- a/MoinMoin/search/builtin.py	Mon Aug 21 19:27:33 2006 +0200
+++ b/MoinMoin/search/builtin.py	Mon Aug 21 19:31:49 2006 +0200
@@ -519,7 +519,7 @@
             pagename = valuedict['pagename']
             attachment = valuedict['attachment']
 
-            if 'revision' in valuedict:
+            if 'revision' in valuedict and valuedict['valuedict']:
                 revision = int(valuedict['revision'])
             else:
                 revision = None