Commit cf279519 authored by 's avatar

Fixed cookie expiration dates in DTMLMethod.py and DA.py

parent 7c88f8ea
......@@ -84,7 +84,7 @@
##############################################################################
"""DTML Method objects."""
__version__='$Revision: 1.22 $'[11:-2]
__version__='$Revision: 1.23 $'[11:-2]
from Globals import HTML, HTMLFile, MessageDialog
from string import join,split,strip,rfind,atoi,lower
......@@ -94,6 +94,7 @@ from DocumentTemplate.DT_Util import cDocument
from PropertyManager import PropertyManager
from AccessControl.Role import RoleManager
from webdav.common import rfc1123_date
from DateTime.DateTime import DateTime
from urllib import quote
import regex, Globals, sys, Acquisition
......@@ -240,7 +241,7 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager,
rows=max(1,atoi(dtpref_rows)+dr)
cols=max(40,atoi(dtpref_cols)+dc)
e='Friday, 31-Dec-99 23:59:59 GMT'
e=(DateTime('GMT') + 365).rfc822()
resp=REQUEST['RESPONSE']
resp.setCookie('dtpref_rows',str(rows),path='/',expires=e)
resp.setCookie('dtpref_cols',str(cols),path='/',expires=e)
......
......@@ -85,11 +85,11 @@
__doc__='''Generic Database adapter
$Id: DA.py,v 1.65 1999/03/25 16:07:43 jim Exp $'''
__version__='$Revision: 1.65 $'[11:-2]
$Id: DA.py,v 1.66 1999/05/26 13:35:55 brian Exp $'''
__version__='$Revision: 1.66 $'[11:-2]
import OFS.SimpleItem, Aqueduct, RDB
import DocumentTemplate, marshal, md5, base64, DateTime, Acquisition, os
import DocumentTemplate, marshal, md5, base64, Acquisition, os
from Aqueduct import decodestring, parse
from Aqueduct import custom_default_report, default_input_form
from Globals import HTMLFile, MessageDialog
......@@ -99,6 +99,7 @@ from string import atoi, find, join, split
import DocumentTemplate, sqlvar, sqltest, sqlgroup
from time import time
from zlib import compress, decompress
from DateTime.DateTime import DateTime
md5new=md5.new
import ExtensionClass
import DocumentTemplate.DT_Util
......@@ -106,6 +107,7 @@ from cPickle import dumps, loads
from Results import Results
from App.Extensions import getBrain
try: from IOBTree import Bucket
except: Bucket=lambda:{}
......@@ -177,7 +179,7 @@ class DA(
rows=max(1,atoi(sql_pref__rows)+dr)
cols=max(40,atoi(sql_pref__cols)+dc)
e='Friday, 31-Dec-99 23:59:59 GMT'
e=(DateTime('GMT') + 365).rfc822()
resp=REQUEST['RESPONSE']
resp.setCookie('sql_pref__rows',str(rows),path='/',expires=e)
resp.setCookie('sql_pref__cols',str(cols),path='/',expires=e)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment