X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/46c22b437926dec7e87ab5bb24dfb6a2c6124692..bc0e2edad8e8f94f85f2a59ceb784b8eb0cda97c:/SL/Controller/Part.pm diff --git a/SL/Controller/Part.pm b/SL/Controller/Part.pm index d27304029..53d51ced5 100644 --- a/SL/Controller/Part.pm +++ b/SL/Controller/Part.pm @@ -19,6 +19,7 @@ use SL::DB::Helper::ValidateAssembly qw(validate_assembly); use SL::CVar; use SL::MoreCommon qw(save_form); use Carp; +use SL::Presenter::EscapedText qw(escape is_escaped); use Rose::Object::MakeMethods::Generic ( 'scalar --get_set_init' => [ qw(parts models part p warehouses multi_items_models @@ -408,10 +409,10 @@ sub action_multi_items_update_result { my $count = $_[0]->multi_items_models->count; if ($count == 0) { - my $text = SL::Presenter::EscapedText->new(text => $::locale->text('No results.')); + my $text = escape($::locale->text('No results.')); $_[0]->render($text, { layout => 0 }); } elsif ($count > $max_count) { - my $text = SL::Presenter::EscapedText->new(text => $::locale->text('Too many results (#1 from #2).', $count, $max_count)); + my $text = escpae($::locale->text('Too many results (#1 from #2).', $count, $max_count)); $_[0]->render($text, { layout => 0 }); } else { my $multi_items = $_[0]->multi_items_models->get; @@ -813,7 +814,7 @@ sub init_part { sub init_orphaned { my ($self) = @_; - return $::auth->assert('assembly_edit', 1) // $self->part->orphaned; + return $self->part->orphaned; } sub init_models {