Skip to content

Commit

Permalink
[#2375] Include docstring for deprecated helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
icmurray authored and tobes committed Sep 17, 2012
1 parent 1d641d2 commit bb2925d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ckan/lib/helpers.py
Expand Up @@ -522,6 +522,13 @@ def unselected_facet_items(facet, limit=10):
return get_facet_items_dict(facet, limit=limit, exclude_active=True)

def facet_title(name):
'''Returns a title for the given facet name.
If a mapping is declared in the config, this is used. Otherwise it falls
back to capitalizing the given name.
This function is deprecated, use `get_facet_title` instead.
'''
# FIXME this looks like an i18n issue
return config.get('search.facets.%s.title' % name, name.capitalize())

Expand Down

0 comments on commit bb2925d

Please sign in to comment.