Wobjects are now added/removed through the config file rather than the filesystem.
This commit is contained in:
parent
deedf4f8eb
commit
3d50eeb7db
3 changed files with 19 additions and 32 deletions
|
|
@ -30,11 +30,12 @@ sub _replacement {
|
|||
if ($session{user}{uiLevel} >= 7) {
|
||||
$hash{WebGUI::URL::page('op=selectPackageToDeploy')} = WebGUI::International::get(376);
|
||||
}
|
||||
foreach $key (keys %{$session{wobject}}) {
|
||||
my $cmd = "\$WebGUI::Wobject::".$key."::name";
|
||||
#$hash{WebGUI::URL::page('func=edit&wid=new&namespace='.$key)} = $session{wobject}{$key};
|
||||
$hash{WebGUI::URL::page('func=edit&wid=new&namespace='.$key)} = eval($cmd);
|
||||
WebGUI::ErrorHandler::warn("Could use wobject $key because: ".$@) if ($@);
|
||||
foreach my $namespace (@{$session{config}{wobjects}}) {
|
||||
my $cmd = "WebGUI::Wobject::".$namespace."::uiLevel";
|
||||
next if (eval($cmd) > $session{user}{uiLevel});
|
||||
$cmd = "\$WebGUI::Wobject::".$namespace."::name";
|
||||
$hash{WebGUI::URL::page('func=edit&wid=new&namespace='.$namespace)} = eval($cmd);
|
||||
WebGUI::ErrorHandler::warn("Could use wobject $namespace because: ".$@) if ($@);
|
||||
}
|
||||
%hash = sortHash(%hash);
|
||||
%hash = (%{{WebGUI::URL::page()=>WebGUI::International::get(1)}},%hash);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue