Changeset 3004

Show
Ignore:
Timestamp:
08/29/08 18:59:22 (3 months ago)
Author:
bchoate
Message:

Fixed upgrade step for create_default_roles.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/MT/Role.pm

    r2949 r3004  
    127127 
    128128    my @default_roles = ( 
    129         { name => 'Blog Administrator'
    130           description => 'Can administer the blog.'
     129        { name => MT->translate('Blog Administrator')
     130          description => MT->translate('Can administer the blog.')
    131131          role_mask => 2**12, 
    132132          perms => ['administer_blog'] }, 
    133         { name => 'Editor'
    134           description => 'Can upload files, edit all entries/categories/tags on a blog and publish the blog.'
     133        { name => MT->translate('Editor')
     134          description => MT->translate('Can upload files, edit all entries/categories/tags on a blog and publish the blog.')
    135135          perms => ['comment', 'create_post', 'publish_post', 'edit_all_posts', 'edit_categories', 'edit_tags', 'manage_pages', 
    136136                    'rebuild', 'upload', 'send_notifications', 'manage_feedback', 'edit_assets'], }, 
    137         { name => 'Author'
    138           description => 'Can create entries, edit their own, upload files and publish.'
     137        { name => MT->translate('Author')
     138          description => MT->translate('Can create entries, edit their own, upload files and publish.')
    139139          perms => ['comment', 'create_post', 'publish_post', 'upload', 'send_notifications'], }, 
    140         { name => 'Designer'
    141           description => 'Can edit, manage and publish blog templates.'
     140        { name => MT->translate('Designer')
     141          description => MT->translate('Can edit, manage and publish blog templates.')
    142142          role_mask => (2**4 + 2**7), 
    143143          perms => ['edit_templates', 'rebuild'] }, 
    144         { name => 'Webmaster'
    145           description => 'Can manage pages and publish blog templates.'
     144        { name => MT->translate('Webmaster')
     145          description => MT->translate('Can manage pages and publish blog templates.')
    146146          perms => ['manage_pages', 'rebuild'] }, 
    147         { name => 'Contributor'
    148           description => 'Can create entries, edit their own and comment.'
     147        { name => MT->translate('Contributor')
     148          description => MT->translate('Can create entries, edit their own and comment.')
    149149          perms => ['comment', 'create_post'], }, 
    150         { name => 'Moderator'
    151           description => 'Can comment and manage feedback.'
     150        { name => MT->translate('Moderator')
     151          description => MT->translate('Can comment and manage feedback.')
    152152          perms => ['comment', 'manage_feedback'], }, 
    153         { name => 'Commenter'
    154           description => 'Can comment.'
     153        { name => MT->translate('Commenter')
     154          description => MT->translate('Can comment.')
    155155          role_mask => 2**0, 
    156156          perms => ['comment'], }, 
     
    162162    foreach my $r (@default_roles) { 
    163163        my $role = MT::Role->new(); 
    164         $role->name(MT->translate($r->{name})); 
    165         $role->description(MT->translate($r->{description})); 
     164        $role->name($r->{name}); 
     165        $role->description($r->{description}); 
    166166        $role->clear_full_permissions; 
    167167        $role->set_these_permissions($r->{perms}); 
  • trunk/lib/MT/Upgrade/Core.pm

    r2949 r3004  
    9595        }, 
    9696        'core_install_default_roles' => { 
    97             code => \&create_default_roles
     97            code => sub { require MT::Role; return MT::Role->create_default_roles }
    9898            on_class => 'MT::Role', 
    9999            priority => 3.1, 
     
    103103 
    104104### Subroutines 
    105  
    106 ## Translation 
    107 # translate('Blog Administrator') 
    108 # translate('Can administer the blog.') 
    109 # translate('Editor') 
    110 # translate('Can upload files, edit all entries/categories/tags on a blog and publish the blog.') 
    111 # translate('Author') 
    112 # translate('Can create entries, edit their own, upload files and publish.') 
    113 # translate('Designer') 
    114 # translate('Can edit, manage and publish blog templates.') 
    115 # translate('Webmaster') 
    116 # translate('Can manage pages and publish blog templates.') 
    117 # translate('Contributor') 
    118 # translate('Can create entries, edit their own and comment.') 
    119 # translate('Moderator') 
    120 # translate('Can comment and manage feedback.') 
    121 # translate('Commenter') 
    122 # translate('Can comment.') 
    123105 
    124106sub seed_database {