Skip to content

Commit

Permalink
[#726 state:resolved] Fixed an issue where a non-sysadmin user would …
Browse files Browse the repository at this point in the history
…be shown an error when executing a search from the quicksearch bar on their own user profile. The search now correctly searches entries (not users since privilege that is restricted to sysadmins)
  • Loading branch information
jayallen committed Feb 3, 2011
1 parent 5e77713 commit d080019
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/MT/CMS/Search.pm
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ sub core_search_apis {
sub search_replace {
my $app = shift;
my $q = $app->query;
my $param = do_search_replace( $app, @_ ) or return;
my $param = $app->do_search_replace( @_ ) or return;
my $blog_id = $q->param('blog_id');
$app->add_breadcrumb( $app->translate('Search & Replace') );
$param->{nav_search} = 1;
Expand Down
4 changes: 4 additions & 0 deletions lib/MT/CMS/User.pm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ sub edit {
$param->{object_type} = 'author';
$param->{can_edit_username} = 1;
}
else {
$param->{search_label} = $app->translate('Entries');
$param->{search_type} = 'entry';
}
$param->{status_enabled} = $obj->is_active ? 1 : 0;
$param->{status_pending}
= $obj->status == MT::Author::PENDING() ? 1 : 0;
Expand Down

0 comments on commit d080019

Please sign in to comment.