Index: branches/LCSv1/controllers/default.py.bak
===================================================================
--- branches/LCSv1/controllers/default.py.bak	(revision 612)
+++ branches/LCSv1/controllers/default.py.bak	(revision 617)
@@ -56,5 +56,5 @@
 def special_validation(form):
     # Error if a lognum was given and no closure id
-    if (len(form.vars.lognum) > 0 and len(form.vars.closureid = 0)):
+    if (len(form.vars.lognum) > 0 and len(form.vars.closureid) == 0):
        form.errors.lognum = 'Must provide a closureID when specifying a log number'
 # Show the item that was found in the search
@@ -79,5 +79,5 @@
         msg += "Start date = " + session.startdate
     if (len(session.enddate) != 0):
-        query = query & (db.closures.startdate <= session.enddate)
+        query = query & (db.closures.enddate <= session.enddate)
         msg += "End date = " + session.enddate
     
@@ -99,5 +99,5 @@
         # Each row contains a form with two buttons and columns with fields from database
         multiform.append(TR(TD(
-                    XML("<button class='submit-button' onclick=showPopup(\'"),statusfields,XML("\')>View History</button>"),BR(),
+                    XML("<button class='submit-button' onclick=showPopup(\""),statusfields,XML("\")>View History</button>"),BR(),
                     FORM(
                           INPUT(_type='submit',_name='btn2',_value='Show Status Form',_class="submit-button" ),
Index: branches/LCSv1/controllers/default.py
===================================================================
--- branches/LCSv1/controllers/default.py	(revision 615)
+++ branches/LCSv1/controllers/default.py	(revision 617)
@@ -99,5 +99,5 @@
         # Each row contains a form with two buttons and columns with fields from database
         multiform.append(TR(TD(
-                    XML("<button class='submit-button' onclick=showPopup(\'"),statusfields,XML("\')>View History</button>"),BR(),
+                    XML("<button class='submit-button' onclick=\"showPopup(\'"),statusfields,XML("\')\">View History</button>"),BR(),
                     FORM(
                           INPUT(_type='submit',_name='btn2',_value='Show Status Form',_class="submit-button" ),
