summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@gentoo.org>2006-08-29 07:13:28 +0000
committerGunnar Wrobel <wrobel@gentoo.org>2006-08-29 07:13:28 +0000
commitabd9fc9e38c38c52763aa7f32fe5d6e7d6368cf3 (patch)
tree71ecaf5db80ae07d5c14dc3e723328c121f27319 /www-apps
parentCode fixes for the pyblosxom plugins (taken from the plugin release 1.3.0) (diff)
downloadoverlay-abd9fc9e38c38c52763aa7f32fe5d6e7d6368cf3.tar.gz
overlay-abd9fc9e38c38c52763aa7f32fe5d6e7d6368cf3.tar.bz2
overlay-abd9fc9e38c38c52763aa7f32fe5d6e7d6368cf3.zip
Added contact form nospam feature for pyblosxom plugins.
svn path=/stable/; revision=755
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/pyblosxom-plugins/Manifest16
-rw-r--r--www-apps/pyblosxom-plugins/files/contact.py12
-rw-r--r--www-apps/pyblosxom-plugins/files/pycalendar.py6
3 files changed, 24 insertions, 10 deletions
diff --git a/www-apps/pyblosxom-plugins/Manifest b/www-apps/pyblosxom-plugins/Manifest
index 30013fe..2ad3d60 100644
--- a/www-apps/pyblosxom-plugins/Manifest
+++ b/www-apps/pyblosxom-plugins/Manifest
@@ -10,10 +10,10 @@ AUX comments.py 27997 RMD160 550beff74a9b3ffeb69c24e03101cdb870d8bf13 SHA1 30f1e
MD5 a0042cd68bff64caae88389166341405 files/comments.py 27997
RMD160 550beff74a9b3ffeb69c24e03101cdb870d8bf13 files/comments.py 27997
SHA256 7538219d1a3375f9b060a5143c12ab256a5fc538b8547b5b326a15a73448085d files/comments.py 27997
-AUX contact.py 11517 RMD160 4960e767fd4b1c07cdd8c10c2dda73edf2ec0b3a SHA1 9a78e98571d639127a06ef6785f30cb1acac47e0 SHA256 7ea7ac0f5f01d7639b0856fbd3c8dcaf8d1c1a3930b9d22b4709d570c031c061
-MD5 53cf6af3d39e1d47a4d26d20dbe4338b files/contact.py 11517
-RMD160 4960e767fd4b1c07cdd8c10c2dda73edf2ec0b3a files/contact.py 11517
-SHA256 7ea7ac0f5f01d7639b0856fbd3c8dcaf8d1c1a3930b9d22b4709d570c031c061 files/contact.py 11517
+AUX contact.py 11834 RMD160 ddf0da7cea376f175091b6072acae4c63a6e7a5d SHA1 cd40f330b3f9ce6f811e9f409b811e5daa7ef8a3 SHA256 12591992a3662fc61fbeb886adf4500f56d6ba44ce6eed6a8b1359f89fb924c4
+MD5 12b115b48cbdaaa658b9f01d3832aab1 files/contact.py 11834
+RMD160 ddf0da7cea376f175091b6072acae4c63a6e7a5d files/contact.py 11834
+SHA256 12591992a3662fc61fbeb886adf4500f56d6ba44ce6eed6a8b1359f89fb924c4 files/contact.py 11834
AUX getstamps.py 1332 RMD160 8a291671ea8da913f812661af5deda00d3cc7629 SHA1 cff9e96bf037b03def42f5931d38b7f223d39b08 SHA256 43c4dbf41acc434c9793c256fef7c9567b4fd21a035da290c40b6e82cb5aec63
MD5 ef8b9559c56fe3bff0bf15672c2239e4 files/getstamps.py 1332
RMD160 8a291671ea8da913f812661af5deda00d3cc7629 files/getstamps.py 1332
@@ -34,10 +34,10 @@ AUX pyarchives.py 3695 RMD160 5f59580e2f1921de2773237b915d48c1fb5b2b33 SHA1 eb8b
MD5 4ea9d10d19c429f59a3025092033631e files/pyarchives.py 3695
RMD160 5f59580e2f1921de2773237b915d48c1fb5b2b33 files/pyarchives.py 3695
SHA256 e1be10662e597b5182cf25430b2760104827dfb7c427a98ed2e4d87b366bf858 files/pyarchives.py 3695
-AUX pycalendar.py 9720 RMD160 faa1cbc530b2fface679441b442d5e02003bcdf1 SHA1 3926757e9cdad4ae9890c675e8d4709adcbe24dc SHA256 1e75479935b91cdd738beabafe1f8846b4062dc5491be544a8d498ac948c5435
-MD5 a99d4c73f698a596cd36126e9ab11d47 files/pycalendar.py 9720
-RMD160 faa1cbc530b2fface679441b442d5e02003bcdf1 files/pycalendar.py 9720
-SHA256 1e75479935b91cdd738beabafe1f8846b4062dc5491be544a8d498ac948c5435 files/pycalendar.py 9720
+AUX pycalendar.py 9849 RMD160 3a5b443fba46592db1816a16e6f512c08bb7bb40 SHA1 84967924840a41ffaec395d5a9e317a2eaf9d0f1 SHA256 365b04fafe280d01941de80dd6ab0c09bb4223cba1069fc3b5c17d595e64f1a3
+MD5 187132a6a5640329640112430649fed5 files/pycalendar.py 9849
+RMD160 3a5b443fba46592db1816a16e6f512c08bb7bb40 files/pycalendar.py 9849
+SHA256 365b04fafe280d01941de80dd6ab0c09bb4223cba1069fc3b5c17d595e64f1a3 files/pycalendar.py 9849
AUX pycategories.py 8416 RMD160 4d094f13e0ddcc86e9ca42eaba42704258c4aa67 SHA1 ef9604ae96b91686c1780747ee1c98fb8c8c0be7 SHA256 b62d333ffc10bf6ba8fa029515ea2351ac93df25bf8f310982952a4611025fbc
MD5 f88e17ff8a6077fe6aa92252bbe5c007 files/pycategories.py 8416
RMD160 4d094f13e0ddcc86e9ca42eaba42704258c4aa67 files/pycategories.py 8416
diff --git a/www-apps/pyblosxom-plugins/files/contact.py b/www-apps/pyblosxom-plugins/files/contact.py
index ede364f..a378b91 100644
--- a/www-apps/pyblosxom-plugins/files/contact.py
+++ b/www-apps/pyblosxom-plugins/files/contact.py
@@ -258,6 +258,7 @@ def _handle_post(request):
data = request.getData()
http = request.getHttp()
config = request.getConfiguration()
+ session = request.getSession()
email = {}
error = False
@@ -282,6 +283,17 @@ def _handle_post(request):
error = True
error_messages.append("Invalid email address '%s'. Cannot deliver your message!" % email['email'])
+ try:
+ nospam = int(form["nospam"].value)
+ sess_nospam = int(session["nospam"])
+ except:
+ nospam = 0
+ sess_nospam = 1
+
+ if nospam != sess_nospam:
+ error = True
+ error_messages.append("Secret number did not match. Cannot deliver your message!")
+
if error:
data[MESSAGE_KEY] = "<br />\n".join(error_messages)
_remember_email(email, data)
diff --git a/www-apps/pyblosxom-plugins/files/pycalendar.py b/www-apps/pyblosxom-plugins/files/pycalendar.py
index 0b76264..248591c 100644
--- a/www-apps/pyblosxom-plugins/files/pycalendar.py
+++ b/www-apps/pyblosxom-plugins/files/pycalendar.py
@@ -65,7 +65,7 @@ __url__ = "http://pyblosxom.sourceforge.net/"
__description__ = "Builds a calendar."
from Pyblosxom import tools
-import time, calendar, string, os
+import time, calendar, string, os, types
def verify_installation(request):
# there's no configuration needed for this plugin.
@@ -113,7 +113,9 @@ class PyblCalendar:
self._cal = ""
return
- view = list(entry_list[0]["timetuple"])
+ view = list(entry_list[0].get("timetuple", (time.strftime("%Y", self._today),
+ time.strftime("%m", self._today),
+ time.strftime("%d", self._today))))
# this comes in as 2001, 2002, 2003, ... so we can convert it
# without an issue