Skip to content

Commit

Permalink
Merge branch 'master' into 3196-common-context
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Sep 15, 2016
2 parents 7b0cbd6 + d73326a commit 8a404cd
Show file tree
Hide file tree
Showing 200 changed files with 28,463 additions and 11,367 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -12,6 +12,10 @@ v2.6.0 TBA
API changes and deprecations:
* Replace `c.__version__` with new helper `h.ckan_version()` (#3103)

Major:
* Private datasets are now included in the default dataset search results (#3191)
* package_search API action now has an include_private parameter (#3191)

v2.5.2 2016-03-31
=================

Expand Down
2 changes: 1 addition & 1 deletion ckan/__init__.py
@@ -1,6 +1,6 @@
# encoding: utf-8

__version__ = '2.6.0a'
__version__ = '2.7.0a'

__description__ = 'CKAN Software'
__long_description__ = \
Expand Down
2 changes: 0 additions & 2 deletions ckan/config/deployment.ini_tmpl
Expand Up @@ -78,8 +78,6 @@ ckan.auth.roles_that_cascade_to_sub_groups = admin
ckan.site_id = default
#solr_url = http://127.0.0.1:8983/solr

#ckan.simple_search = 1


## CORS Settings

Expand Down
6 changes: 6 additions & 0 deletions ckan/config/middleware/flask_app.py
Expand Up @@ -42,6 +42,12 @@ def hello_world():
def hello_world_post():
return 'Hello World, this was posted to Flask'

# Update the main CKAN config object with the Flask specific keys
# that were set here or autogenerated
flask_config_keys = set(flask_app.config.keys()) - set(config.keys())
for key in flask_config_keys:
config[key] = flask_app.config[key]

# Add a reference to the actual Flask app so it's easier to access
app._wsgi_app = flask_app

Expand Down
2 changes: 1 addition & 1 deletion ckan/config/routing.py
Expand Up @@ -9,10 +9,10 @@
"""
import re

from pylons import config
from routes.mapper import SubMapper, Mapper as _Mapper

import ckan.plugins as p
from ckan.common import config

named_routes = {}

Expand Down
13 changes: 9 additions & 4 deletions ckan/controllers/feed.py
Expand Up @@ -170,12 +170,17 @@ def _alternate_url(self, params, **kwargs):
def _group_or_organization(self, obj_dict, is_org):

data_dict, params = self._parse_url_params()
key = 'owner_org' if is_org else 'groups'
data_dict['fq'] = '%s:"%s"' % (key, obj_dict['id'],)
group_type = 'organization'
if not is_org:
if is_org:
key = 'owner_org'
value = obj_dict['id']
group_type = 'organization'
else:
key = 'groups'
value = obj_dict['name']
group_type = 'group'

data_dict['fq'] = '{0}:"{1}"'.format(key, value)

item_count, results = _package_search(data_dict)

navigation_urls = self._navigation_urls(params,
Expand Down
8 changes: 4 additions & 4 deletions ckan/controllers/group.py
Expand Up @@ -293,13 +293,12 @@ def pager_url(q=None, page=None):
else:
search_extras[param] = value

fq = 'capacity:"public"'
include_private = False
user_member_of_orgs = [org['id'] for org
in h.organizations_available('read')]

if (c.group and c.group.id in user_member_of_orgs):
fq = ''
context['ignore_capacity_check'] = True
include_private = True

facets = OrderedDict()

Expand All @@ -326,7 +325,8 @@ def pager_url(q=None, page=None):

data_dict = {
'q': q,
'fq': fq,
'fq': '',
'include_private': include_private,
'facet.field': facets.keys(),
'rows': limit,
'sort': sort_by,
Expand Down
4 changes: 3 additions & 1 deletion ckan/controllers/package.py
Expand Up @@ -264,7 +264,9 @@ def pager_url(q=None, page=None):
'rows': limit,
'start': (page - 1) * limit,
'sort': sort_by,
'extras': search_extras
'extras': search_extras,
'include_private': asbool(config.get(
'ckan.search.default_include_private', True)),
}

query = get_action('package_search')(context, data_dict)
Expand Down
Binary file modified ckan/i18n/ar/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/bg/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/ca/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/cs_CZ/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/da_DK/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/de/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/el/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/en_AU/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/en_GB/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/es/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/es_AR/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/fa_IR/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/fi/LC_MESSAGES/ckan.mo
Binary file not shown.
20 changes: 10 additions & 10 deletions ckan/i18n/fi/LC_MESSAGES/ckan.po
Expand Up @@ -20,8 +20,8 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-11-26 14:20+0000\n"
"Last-Translator: dread <david.read@hackneyworkshop.com>\n"
"PO-Revision-Date: 2015-12-15 08:41+0000\n"
"Last-Translator: Mikko Koho <mikko.koho@csc.fi>\n"
"Language-Team: Finnish (http://www.transifex.com/okfn/ckan/language/fi/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -886,8 +886,8 @@ msgstr "Näytä"
#: ckan/lib/email_notifications.py:103
msgid "{n} new activity from {site_title}"
msgid_plural "{n} new activities from {site_title}"
msgstr[0] ""
msgstr[1] ""
msgstr[0] "{n} uusi tapahtuma sivulla {site_title}"
msgstr[1] "{n} uutta tapahtumaa sivulla {site_title}"

#: ckan/lib/formatters.py:17
msgid "January"
Expand Down Expand Up @@ -973,7 +973,7 @@ msgstr[1] "yli {years} vuotta sitten"

#: ckan/lib/formatters.py:146
msgid "{month} {day}, {year}, {hour:02}:{min:02} ({timezone})"
msgstr ""
msgstr "{day}. {month} {year}, {hour:02}:{min:02} ({timezone})"

#: ckan/lib/formatters.py:151
msgid "{month} {day}, {year}"
Expand Down Expand Up @@ -3248,7 +3248,7 @@ msgstr "Virhe:"

#: ckan/templates/package/resource_data.html:36
msgid "Error traceback:"
msgstr ""
msgstr "Virhetulostus:"

#: ckan/templates/package/resource_data.html:48
msgid "Status"
Expand Down Expand Up @@ -4348,7 +4348,7 @@ msgstr "muokattu resurssi teksti"

#: ckanext/example_itranslation/templates/home/index.html:4
msgid "This is an untranslated string"
msgstr ""
msgstr "Tämä on kääntämätön teksti"

#: ckanext/example_theme/v10_custom_snippet/templates/snippets/example_theme_most_popular_groups.html:20
#: ckanext/example_theme/v11_HTML_and_CSS/templates/snippets/example_theme_most_popular_groups.html:19
Expand Down Expand Up @@ -4385,7 +4385,7 @@ msgstr "Kartta"

#: ckanext/reclineview/theme/public/recline_view.js:34
msgid "error loading view"
msgstr ""
msgstr "virhe ladattaessa näkymää"

#: ckanext/reclineview/theme/templates/recline_graph_form.html:3
#: ckanext/reclineview/theme/templates/recline_map_form.html:3
Expand Down Expand Up @@ -4529,7 +4529,7 @@ msgstr "Tietoaineistojen lukumäärä"
#: ckanext/stats/templates/ckanext/stats/index.html:152
#: ckanext/stats/templates/ckanext/stats/index.html:184
msgid "Users Creating Most Datasets"
msgstr ""
msgstr "Eniten aineistoja luovat käyttäjät"

#: ckanext/stats/templates/ckanext/stats/index.html:175
msgid "Statistics Menu"
Expand All @@ -4546,7 +4546,7 @@ msgstr "Teksti"
#: ckanext/textview/theme/public/text_view.js:5
#, python-format
msgid "An error occurred: %(text)s %(error)s"
msgstr ""
msgstr "Virhe tapahtui: %(text)s %(error)s"

#: ckanext/webpageview/plugin.py:19 ckanext/webpageview/plugin.py:24
msgid "Website"
Expand Down
Binary file modified ckan/i18n/fr/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/he/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/hr/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/hu/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/id/LC_MESSAGES/ckan.mo
Binary file not shown.
Binary file modified ckan/i18n/is/LC_MESSAGES/ckan.mo
Binary file not shown.

0 comments on commit 8a404cd

Please sign in to comment.