Index: pykota/trunk/cgi-bin/dumpykota.cgi
===================================================================
--- pykota/trunk/cgi-bin/dumpykota.cgi (revision 3411)
+++ pykota/trunk/cgi-bin/dumpykota.cgi (revision 3413)
@@ -11,10 +11,10 @@
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -42,5 +42,5 @@
     <script type="text/javascript">
     <!--
-      function checkvalues() 
+      function checkvalues()
       {
           if ((document.mainform.format.value == "cups") && (document.mainform.datatype.value != "history"))
@@ -49,5 +49,5 @@
               return false;
           }
-          
+
           if (document.mainform.sum.checked && (document.mainform.datatype.value != "payments") && (document.mainform.datatype.value != "history"))
           {
@@ -55,5 +55,5 @@
               return false;
           }
-          
+
           if (document.mainform.sum.checked && (document.mainform.format.value == "cups"))
           {
@@ -61,5 +61,5 @@
               return false;
           }
-          
+
           return true;
       }
@@ -92,5 +92,5 @@
           %s
         </p>"""
-    
+
 footer = """
         <table>
@@ -100,12 +100,12 @@
             </td>
           </tr>
-        </table>  
+        </table>
       </form>
-    </p>  
+    </p>
     <hr width="25%%" />
     <p>
       <font size="-2">
         <a href="http://www.pykota.com/">%s</a>
-        &copy; %s %s 
+        &copy; %s %s
         <br />
         <pre>
@@ -115,5 +115,5 @@
     </p>
   </body>
-</html>"""  
+</html>"""
 
 class PyKotaDumperGUI(DumPyKota) :
@@ -137,14 +137,14 @@
         content.append(u"<br />")
         content.append(self.htmlSumCheckbox(self.options.sum))
-        content.append(footer % (_("Dump"), 
-                                 version.__doc__, 
-                                 version.__years__, 
-                                 version.__author__, 
+        content.append(footer % (_("Dump"),
+                                 version.__doc__,
+                                 version.__years__,
+                                 version.__author__,
                                  saxutils.escape(version.__gplblurb__)))
         for c in content :
             sys.stdout.write(c.encode(self.charset, "replace"))
         sys.stdout.flush()
-        
-    def htmlListDataTypes(self, selected="") :    
+
+    def htmlListDataTypes(self, selected="") :
         """Displays the datatype selection list."""
         message = '<table><tr><td valign="top">%s :</td><td valign="top"><select name="datatype">' % _("Data Type")
@@ -156,6 +156,6 @@
         message += '</select></td></tr></table>'
         return message
-        
-    def htmlListFormats(self, selected="") :    
+
+    def htmlListFormats(self, selected="") :
         """Displays the formats selection list."""
         message = '<table><tr><td valign="top">%s :</td><td valign="top"><select name="format">' % _("Output Format")
@@ -167,24 +167,24 @@
         message += '</select></td></tr></table>'
         return message
-        
-    def htmlFilterInput(self, value="") :    
+
+    def htmlFilterInput(self, value="") :
         """Input the optional dump filter."""
         return _("Filter") + (' : <input type="text" name="filter" size="40" value="%s" /> <em>e.g. <strong>username=jerome printername=HP2100 start=today-30</strong></em>' % (value or ""))
-        
-    def htmlOrderbyInput(self, value="") :    
+
+    def htmlOrderbyInput(self, value="") :
         """Input the optional ordering."""
         return _("Ordering") + (' : <input type="text" name="orderby" size="40" value="%s" /> <em>e.g. <strong>+username,-printername</strong></em>' % (value or ""))
-        
-    def htmlSumCheckbox(self, checked="") :    
+
+    def htmlSumCheckbox(self, checked="") :
         """Input the optional Sum option."""
         return _("Summarize") + (' : <input type="checkbox" name="sum" %s /> <em>%s</em>' % ((checked and 'checked="checked"'), _("only for payments or history")))
-        
+
     def guiAction(self) :
         """Main function"""
         try :
             wantreport = self.form.has_key("report")
-        except TypeError :    
+        except TypeError :
             pass # WebDAV request probably, seen when trying to open a csv file in OOo
-        else :    
+        else :
             if wantreport :
                 try :
@@ -193,18 +193,18 @@
                     if self.form.has_key("format") :
                         self.options.format = self.form["format"].value
-                    if self.form.has_key("filter") :    
+                    if self.form.has_key("filter") :
                         self.arguments = self.form["filter"].value.split()
-                    if self.form.has_key("sum") :    
+                    if self.form.has_key("sum") :
                         self.options.sum = self.form["sum"].value
-                    if self.form.has_key("orderby") :    
+                    if self.form.has_key("orderby") :
                         self.options.orderby = self.form["orderby"].value
-                    # when no authentication is done, or when the remote username    
+                    # when no authentication is done, or when the remote username
                     # is 'root' (even if not run as root of course), then unrestricted
                     # dump is allowed.
-                    remuser = os.environ.get("REMOTE_USER", "root")    
+                    remuser = os.environ.get("REMOTE_USER", "root")
                     # special hack to accomodate mod_auth_ldap Apache module
                     try :
                         remuser = remuser.split("=")[1].split(",")[0]
-                    except IndexError :    
+                    except IndexError :
                         pass
                     if remuser != "root" :
@@ -214,6 +214,6 @@
                         if self.options.data not in ["printers", "pmembers", "groups", "gpquotas"] :
                             self.arguments.append("username=%s" % remuser)
-                        
-                    fname = "error"    
+
+                    fname = "error"
                     ctype = "text/plain"
                     if self.options.format in ("csv", "ssv") :
@@ -231,14 +231,14 @@
                         ctype = "text/plain"
                         fname = "page_log"
-                    print "Content-type: %s" % ctype    
-                    print "Content-disposition: attachment; filename=%s" % fname 
+                    print "Content-type: %s" % ctype
+                    print "Content-disposition: attachment; filename=%s" % fname
                     print
                     self.main(self.arguments, self.options, restricted=0)
                 except :
                     print 'Content-type: text/html\n\n<html><head><title>CGI Error</title></head><body><p><font color="red">%s</font></p></body></html>' % self.crashed("CGI Error").replace("\n", "<br />")
-            else :        
+            else :
                 self.guiDisplay()
-            
-class FakeCommandLineOptions :            
+
+class FakeCommandLineOptions :
     """A class to fake command line options."""
     output = "-"
@@ -247,5 +247,5 @@
     sum = None
     orderby = None
-    
+
 if __name__ == "__main__" :
     utils.reinitcgilocale()
@@ -258,6 +258,6 @@
     try :
         admin.storage.close()
-    except (TypeError, NameError, AttributeError) :    
+    except (TypeError, NameError, AttributeError) :
         pass
-        
+
     sys.exit(0)
