diff MoinMoin/PageEditor.py /usr/local/lib/python2.4/site-packages/MoinMoin/PageEditor.py 21c21,22 < --- > import random > import datetime 28c29,78 < _countdown_js = """ --- > _quotes = [] > _quotes.append(["What is one plus one:","2","two"]) > _quotes.append(["What is the color of the sky:","blue","blue"]) > _quotes.append(["What is the color of grass:","green","green"]) > _quotes.append(["How many inches are there in a foot:","twelve","12"]) > _quotes.append(["The opposite of big:","small","tiny"]) > _quotes.append(["The opposite of small:","big","large"]) > _quotes.append(["What city is known as The Windy City:","chicago","chitown"]) > _quotes.append(["Which way is the sky:","up","up"]) > _quotes.append(["Which direction is the North Poll, (north, west, south, or east):","north","N"]) > _quotes.append(["ChiPy mascot is a chipmunk, 'Y' or 'N', :","y","yes"]) > _quotes.append(["The world is Flat, 'Y' or 'N':","n","no"]) > > > def _checkcode(): > return datetime.date.today().strftime("%d%j%m") > > def random_quote(): > a = random.choice(_quotes) > return {'capq':a[0], 'capa1':a[1], 'capa2':a[2], 'check':_checkcode() } > > def _check_security(q,a): > for nq,a1,a2 in _quotes: > if nq == q: > a = a.replace(_checkcode(),"") > if a1==a or a2==a: > return True > > return False > > > _cap_script = """""" % random_quote() > > > _countdown_js = _cap_script + """ 74a125,126 > > 347a400,404 > # security question keys > self.request.write('') > self.request.write('') > > 368c425,428 < self.request.write("

", _("Optional comment about this change"), --- > #self.request.write("

", _("What is two plus two:"), > # '

' ) > > self.request.write("

", _("optional comment about this change"), 371a432,433 > > 403c465 < --- > 854a917,920 > secq = kw.get('secq','') > seca1 = kw.get('seca1','') > > 863a930,932 > if not _check_security(secq,seca1): > msg = _("Incorrect answer to security question.") > raise self.AccessDenied, msg diff MoinMoin/wikiaction.py /usr/local/lib/python2.4/site-packages/MoinMoin/wikiaction.py 544c544,546 < --- > secq = request.form.get('secq', [u''])[0] > seca1 = request.form.get('seca1', [u''])[0] > 607c609 < comment=comment) --- > comment=comment,secq=secq,seca1=seca1)