[ckan-changes] commit/ckan: 5 new changesets
Bitbucket
commits-noreply at bitbucket.org
Tue Sep 6 15:40:38 UTC 2011
5 new changesets in ckan:
http://bitbucket.org/okfn/ckan/changeset/9c7c24a77230/
changeset: 9c7c24a77230
branch: release-v1.4.3
user: dread
date: 2011-09-06 13:33:51
summary: [REVERT] #1307 recapture changesets removed (b3f4e8d3177b and cf421deaeba9).
affected #: 5 files (1.1 KB)
--- a/ckan/config/deployment.ini_tmpl Mon Sep 05 19:19:47 2011 +0100
+++ b/ckan/config/deployment.ini_tmpl Tue Sep 06 12:33:51 2011 +0100
@@ -168,10 +168,6 @@
#ckan.default_roles.System = {"visitor": ["anon_editor"], "logged_in": ["editor"]}
#ckan.default_roles.AuthorizationGroup = {"visitor": ["reader"], "logged_in": ["reader"]}
-## Ckan public and private recaptcha keys [localhost]
-#ckan.recaptcha.publickey =
-#ckan.recaptcha.privatekey =
-
# Logging configuration
[loggers]
keys = root, ckan, ckanext
--- a/ckan/controllers/user.py Mon Sep 05 19:19:47 2011 +0100
+++ b/ckan/controllers/user.py Tue Sep 06 12:33:51 2011 +0100
@@ -11,7 +11,6 @@
from ckan.logic import NotFound, NotAuthorized, ValidationError
from ckan.logic import tuplize_dict, clean_dict, parse_params
from ckan.logic.schema import user_new_form_schema, user_edit_form_schema
-from ckan.lib.captcha import check_recaptcha, CaptchaError
import ckan.logic.action.get as get
import ckan.logic.action.create as create
@@ -129,7 +128,6 @@
data_dict = clean_dict(unflatten(
tuplize_dict(parse_params(request.params))))
context['message'] = data_dict.get('log_message', '')
- check_recaptcha(request)
user = create.user_create(context, data_dict)
h.redirect_to(controller='user', action='read', id=user['name'])
except NotAuthorized:
@@ -138,10 +136,6 @@
abort(404, _('User not found'))
except DataError:
abort(400, _(u'Integrity Error'))
- except CaptchaError:
- error_msg = _(u'Bad Captcha. Please try again.')
- h.flash_error(error_msg)
- return self.new(data_dict)
except ValidationError, e:
errors = e.error_dict
error_summary = e.error_summary
--- a/ckan/lib/app_globals.py Mon Sep 05 19:19:47 2011 +0100
+++ b/ckan/lib/app_globals.py Tue Sep 06 12:33:51 2011 +0100
@@ -34,7 +34,4 @@
self.package_hide_extras = config.get('package_hide_extras', '').split()
self.openid_enabled = asbool(config.get('openid_enabled', 'true'))
-
- self.recaptcha_publickey = config.get('ckan.recaptcha.publickey', '')
- self.recaptcha_privatekey = config.get('ckan.recaptcha.privatekey', '')
--- a/ckan/lib/captcha.py Mon Sep 05 19:19:47 2011 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-from pylons import config
-
-import urllib
-import urllib2
-
-def check_recaptcha(request):
- '''Check a user's recaptcha submission is valid, and raise CaptchaError on failure.'''
- recaptcha_private_key = config.get('ckan.recaptcha.privatekey', '')
- if not recaptcha_private_key:
- # Recaptcha not enabled
- return
-
- client_ip_address = request.environ.get('REMOTE_ADDR', 'Unknown IP Address')
- recaptcha_challenge_field = request.params.get('recaptcha_challenge_field')
- recaptcha_response_field = request.params.get('recaptcha_response_field')
-
- recaptcha_server_name = 'http://api-verify.recaptcha.net/verify'
-
- params = urllib.urlencode(dict(privatekey=recaptcha_private_key,
- remoteip=client_ip_address,
- challenge=recaptcha_challenge_field,
- response=recaptcha_response_field))
- f = urllib2.urlopen(recaptcha_server_name, params)
- data = f.read()
- f.close()
- if not data.lower().startswith('true'):
- raise CaptchaError()
-
-class CaptchaError(ValueError):
- pass
-
--- a/ckan/templates/user/new_user_form.html Mon Sep 05 19:19:47 2011 +0100
+++ b/ckan/templates/user/new_user_form.html Tue Sep 06 12:33:51 2011 +0100
@@ -34,18 +34,6 @@
<dt><label class="field_opt" for="password2">Password (repeat):</label></dt><dd><input type="password" name="password2" value="" /></dd>
- <dd py:if="g.recaptcha_publickey">
- <script type="text/javascript"
- src="http://www.google.com/recaptcha/api/challenge?k=${g.recaptcha_publickey}">
- </script>
- <noscript>
- <iframe src="http://www.google.com/recaptcha/api/noscript?k=${g.recaptcha_publickey}"
- height="300" width="500" frameborder="0"></iframe><br/>
- <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
- <input type="hidden" name="recaptcha_response_field" value="manual_challenge" />
- </noscript>
- </dd>
-
</dl></fieldset>
http://bitbucket.org/okfn/ckan/changeset/5ba2f04a4238/
changeset: 5ba2f04a4238
branch: release-v1.4.3
user: dread
date: 2011-09-06 13:40:29
summary: [i18n]: Updated the strings, pushed them to Transifex and pulled in the latest translations.
affected #: 38 files (612.2 KB)
Diff too large to display.
http://bitbucket.org/okfn/ckan/changeset/e87613e3e15b/
changeset: e87613e3e15b
branch: release-v1.4.3
user: dread
date: 2011-09-06 15:34:15
summary: [controllers][xs] Transplant of #1082 fix - cset:eaf342823caf (pudo) - Work around the fact that locale changes do not affect the running request.
affected #: 1 file (152 bytes)
--- a/ckan/controllers/home.py Tue Sep 06 12:40:29 2011 +0100
+++ b/ckan/controllers/home.py Tue Sep 06 14:34:15 2011 +0100
@@ -6,7 +6,7 @@
from ckan.authz import Authorizer
from ckan.logic.action.get import current_package_list_with_resources
-from ckan.i18n import set_session_locale
+from ckan.i18n import set_session_locale, set_lang
from ckan.lib.search import query_for, QueryOptions, SearchError
from ckan.lib.cache import proxy_cache, get_cache_expires
from ckan.lib.base import *
@@ -72,7 +72,11 @@
set_session_locale(locale)
except ValueError:
abort(400, _('Invalid language specified'))
- h.flash_notice(_("Language has been set to: English"))
+ try:
+ set_lang(locale)
+ h.flash_notice(_("Language has been set to: English"))
+ except:
+ h.flash_notice("Language has been set to: English")
else:
abort(400, _("No language given!"))
return_to = get_redirect()
http://bitbucket.org/okfn/ckan/changeset/21a4c50569bc/
changeset: 21a4c50569bc
branch: release-v1.4.3
user: pudo
date: 2011-08-19 19:41:50
summary: remove non-supported languages
affected #: 1 file (35 bytes)
--- a/ckan/i18n/__init__.py Tue Sep 06 14:34:15 2011 +0100
+++ b/ckan/i18n/__init__.py Fri Aug 19 19:41:50 2011 +0200
@@ -3,11 +3,11 @@
# TODO: Figure out a nicer way to get this. From the .ini?
-_KNOWN_LOCALES = ['en', 'ca', 'de', 'el',
- 'es', 'fi', 'fr', 'hu',
- 'it', 'lt', 'nl', 'no',
- 'pl', 'pt_BR', 'ro', 'ru',
- 'sl', 'sq']
+_KNOWN_LOCALES = ['en', 'de',
+ 'es', 'fi', 'fr',
+ 'it', 'nl', 'no',
+ 'pt_BR', 'ro', 'ru',
+ 'sq']
def get_available_locales():
return map(Locale.parse, _KNOWN_LOCALES)
http://bitbucket.org/okfn/ckan/changeset/1e41136a6539/
changeset: 1e41136a6539
branch: release-v1.4.3
user: dread
date: 2011-09-06 15:59:07
summary: [i18n]: Updated the strings, pushed them to Transifex and pulled in the latest translations.
affected #: 39 files (169.2 KB)
Diff too large to display.
Repository URL: https://bitbucket.org/okfn/ckan/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the ckan-changes
mailing list