add method to process ?op=assetHelper
This commit is contained in:
parent
6939287a17
commit
c7bd22cf09
1 changed files with 14 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ package WebGUI::Content::Admin;
|
|||
|
||||
use strict;
|
||||
use WebGUI::Admin;
|
||||
use WebGUI::Pluggable;
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
|
@ -65,6 +66,19 @@ sub handler {
|
|||
}
|
||||
}
|
||||
|
||||
if ( $session->form->get("op") eq "assetHelper" ) {
|
||||
# Load and run the requested asset helper www_ method
|
||||
my $class = $session->form->get('className');
|
||||
WebGUI::Pluggable::load( $class );
|
||||
my $method = $session->form->get('method') || "view";
|
||||
my $assetId = $session->form->get('assetId');
|
||||
my $asset = WebGUI::Asset->newById( $session, $assetId );
|
||||
|
||||
if ( $class->can( "www_" . $method ) ) {
|
||||
return $class->can( "www_" . $method )->( $class, $asset );
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue