Skip to content

Commit

Permalink
[#2939] Add _replace_group_org controller helper
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Sep 27, 2012
1 parent 41bc0c6 commit c46a34e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ckan/controllers/group.py
@@ -1,3 +1,4 @@
import re
import logging
import genshi
import datetime
Expand Down Expand Up @@ -58,6 +59,11 @@ def _edit_template(self, group_type):
return lookup_group_plugin(group_type).edit_template()

## end hooks
def _replace_group_org(self, string):
''' substitute organization for group if this is an org'''
if self.group_type == 'organization':
string = re.sub('^group', 'organization', string)
return string

def _action(self, action_name):
if self.group_type == 'organization':
Expand Down

0 comments on commit c46a34e

Please sign in to comment.