Skip to content

Commit

Permalink
Merge branch 'release-v1.8' of https://github.com/okfn/ckan into rele…
Browse files Browse the repository at this point in the history
…ase-v1.8
  • Loading branch information
rossjones committed Aug 21, 2012
2 parents 302c2f5 + 1d94d8c commit 04eecb8
Show file tree
Hide file tree
Showing 29 changed files with 4,611 additions and 421 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Expand Up @@ -31,6 +31,7 @@ v1.8
.ini config file. Only restricted functions will be allowed in
future versions of CKAN.
* [#2842] Allow sort ordering of dataset listings on group pages
* CKAN is now available in Korean!

API changes and deprecation:
* [#2313] Deprecated functions related to the old faceting data structure have
Expand Down
2 changes: 1 addition & 1 deletion ckan/config/deployment.ini_tmpl
Expand Up @@ -162,7 +162,7 @@ ckan.locale_default = en
# (those with 100% first, then those with >=80%, then >=50%, then <50%) and
# within these groups roughly sorted by number of worldwide native speakers
# according to Wikipedia.
ckan.locale_order = en pt_BR ja it cs_CZ ca es fr el sv sr sr@latin no sk fi ru de pl nl bg ko_KR hu sa sl lv
ckan.locale_order = en es pt_BR ja fr it ko_KR cs_CZ ca fi el sv sr sr@latin no sk ru de pl nl bg hu sa sl lv
ckan.locales_filtered_out =

## Atom Feeds
Expand Down
2 changes: 1 addition & 1 deletion ckan/controllers/feed.py
Expand Up @@ -432,7 +432,7 @@ def _parse_url_params(self):
"""

try:
page = int(request.params.get('page', 1))
page = int(request.params.get('page', 1)) or 1
except ValueError:
abort(400, ('"page" parameter must be an integer'))

Expand Down
1 change: 1 addition & 0 deletions ckan/controllers/group.py
Expand Up @@ -340,6 +340,7 @@ def _save_edit(self, id, context):
tuplize_dict(parse_params(request.params))))
context['message'] = data_dict.get('log_message', '')
data_dict['id'] = id
context['allow_partial_update'] = True
group = get_action('group_update')(context, data_dict)

if id != group['name']:
Expand Down
6 changes: 6 additions & 0 deletions ckan/controllers/package.py
Expand Up @@ -890,6 +890,12 @@ def _parse_recline_state(self, params):
recline_state.pop('height', None)
recline_state['readOnly'] = True

# previous versions of recline setup used elasticsearch_url attribute
# for data api url - see http://trac.ckan.org/ticket/2639
# fix by relocating this to url attribute which is the default location
if 'dataset' in recline_state and 'elasticsearch_url' in recline_state['dataset']:
recline_state['dataset']['url'] = recline_state['dataset']['elasticsearch_url']

# Ensure only the currentView is available
# default to grid view if none specified
if not recline_state.get('currentView', None):
Expand Down
6 changes: 3 additions & 3 deletions ckan/controllers/related.py
Expand Up @@ -28,7 +28,7 @@ def dashboard(self):
try:
page = int(base.request.params.get('page', 1))
except ValueError, e:
abort(400, ('"page" parameter must be an integer'))
base.abort(400, ('"page" parameter must be an integer'))

# Update ordering in the context
query = logic.get_action('related_list')(context,data_dict)
Expand Down Expand Up @@ -67,12 +67,12 @@ def read(self, id):
try:
logic.check_access('related_show', context, data_dict)
except logic.NotAuthorized:
abort(401, _('Not authorized to see this page'))
base.abort(401, _('Not authorized to see this page'))

related = model.Session.query(model.Related).\
filter(model.Related.id == id).first()
if not related:
abort(404, _('The requested related item was not found'))
base.abort(404, _('The requested related item was not found'))

related.view_count = model.Related.view_count + 1

Expand Down
4 changes: 2 additions & 2 deletions ckan/controllers/storage.py
Expand Up @@ -187,7 +187,7 @@ def file(self, label):
fapp = FileApp(filepath, headers=None, **headers)
return fapp(request.environ, self.start_response)
else:
h.redirect_to(file_url)
h.redirect_to(file_url.encode('ascii','ignore'))


class StorageAPIController(BaseController):
Expand Down Expand Up @@ -270,7 +270,7 @@ def get_metadata(self, label):
qualified=False
)
if url.startswith('/'):
url = config.get('ckan.site_url','').rstrip('/') + '/' + url
url = config.get('ckan.site_url','').rstrip('/') + url

if not self.ofs.exists(bucket, label):
abort(404)
Expand Down
Binary file modified ckan/i18n/es/LC_MESSAGES/ckan.mo
Binary file not shown.

0 comments on commit 04eecb8

Please sign in to comment.