- fix: Asset menu

- fix: Event Manager - can't add event
 - fix: v6.99.1, security: Spectre listens to INADDR_ANY (profo)
 - fix: Manage groups in this group doesn't work
 - Fixed a problem where the not found page would not display.
 - fix: New page layout instead of not found
This commit is contained in:
JT Smith 2006-05-30 18:57:15 +00:00
parent 2e1de9d214
commit 16bd394434
8 changed files with 76 additions and 20 deletions

View file

@ -54,6 +54,32 @@ These methods are available from this class:
=cut
#-------------------------------------------------------------------
=head2 addMissing ( url )
Displays a message to the admin that they have requested a non-existent page and give them an option to create it.
=head3 url
The missing URL.
=cut
sub addMissing {
my $self = shift;
my $assetUrl = shift;
return undef unless ($self->session->var->isAdminOn);
my $ac = $self->getAdminConsole;
my $i18n = WebGUI::International->new($self->session, "Asset");
my $output = $i18n->get("missing page query");
$output .= '<ul>
<li><a href="'.$self->getUrl("func=add;class=WebGUI::Asset::Wobject::Layout;url=".$assetUrl).'">'.$i18n->get("add the missing page").'</a></li>
<li><a href="'.$self->getUrl.'">'.$i18n->get("493","WebGUI").'</a></li>
</ul>';
return $ac->render($output);
}
#-------------------------------------------------------------------
=head2 canAdd ( session, [userId, groupId] )
@ -479,7 +505,6 @@ sub getContainer {
}
}
#-------------------------------------------------------------------
=head2 getDefault ( session )
@ -916,18 +941,24 @@ sub getToolbar {
my $output = '<script type="text/javascript">
//<![CDATA[
var contextMenu = new contextMenu_createWithImage("'.$self->getIcon(1).'","'.$self->getId.'","'.$self->getName.'");';
if ($userUiLevel >= $uiLevels->{"lock"} && !$self->isLocked) {
$output .= 'contextMenu.addLink("'.$self->getUrl("func=lock").'","'.$i18n->get("lock").'");';
}
if ($userUiLevel >= $uiLevels->{"changeUrl"}) {
$output .= 'contextMenu.addLink("'.$self->getUrl("func=changeUrl").'","'.$i18n->get("change url").'");';
}
if ($userUiLevel >= $uiLevels->{"export"} && defined $self->session->config->get("exportPath")) {
$output .= 'contextMenu.addLink("'.$self->getUrl("func=export").'","'.$i18n->get("Export","Icon").'");';
}
if ($userUiLevel >= $uiLevels->{"editBranch"}) {
$output .= 'contextMenu.addLink("'.$self->getUrl("func=editBranch").'","'.$i18n->get("edit branch").'");';
}
if ($userUiLevel >= $uiLevels->{"revisions"}) {
$output .= 'contextMenu.addLink("'.$self->getUrl("func=manageRevisions").'","'.$i18n->get("revisions").'");';
}
if ($userUiLevel >= $uiLevels->{"view"}) {
$output .= 'contextMenu.addLink("'.$self->getUrl.'","'.$i18n->get("view").'");';
}
if ($userUiLevel >= $uiLevels->{"lock"} && !$self->isLocked) {
$output .= 'contextMenu.addLink("'.$self->getUrl("func=lock").'","'.$i18n->get("lock").'");';
}
if ($userUiLevel >= $uiLevels->{"export"} && defined $self->session->config->get("exportPath")) {
$output .= 'contextMenu.addLink("'.$self->getUrl("func=export").'","'.$i18n->get("Export","Icon").'");';
}
if ($userUiLevel >= $uiLevels->{"promote"}) {
$output .= 'contextMenu.addLink("'.$self->getUrl("func=promote").'","'.$i18n->get("promote").'");';
}
@ -937,12 +968,6 @@ sub getToolbar {
if ($userUiLevel >= $uiLevels->{"manage"}) {
$output .= 'contextMenu.addLink("'.$self->getUrl("func=manageAssets").'","'.$i18n->get("manage").'");';
}
if ($userUiLevel >= $uiLevels->{"revisions"}) {
$output .= 'contextMenu.addLink("'.$self->getUrl("func=manageRevisions").'","'.$i18n->get("revisions").'");';
}
if ($userUiLevel >= $uiLevels->{"view"}) {
$output .= 'contextMenu.addLink("'.$self->getUrl.'","'.$i18n->get("view").'");';
}
$output .= 'contextMenu.print();
//]]>
</script>'.$toolbar;
@ -1829,7 +1854,6 @@ sub www_add {
return $newAsset->www_edit();
}
#-------------------------------------------------------------------
=head2 www_ajaxInlineView ( )

View file

@ -149,7 +149,7 @@ sub walkGroups {
.$session->icon->delete('op=deleteGroupGrouping;gid='.$parentId.';delete='.$id)
.$session->icon->edit('op=editGroup;gid='.$id)
.' '.$name.'<br />';
$output .= $session->walkGroups($id,$indent."&nbsp; &nbsp; ");
$output .= walkGroups($session, $id,$indent."&nbsp; &nbsp; ");
}
$sth->finish;
return $output;
@ -159,7 +159,7 @@ sub walkGroups {
sub www_addGroupsToGroupSave {
my $session = shift;
return $session->privilege->adminOnly() unless ($session->user->isInGroup(3) || _hasSecondaryPrivilege($session,$session->form->process("gid")));
my $group = WebGUI::Group->new($session,$_[0]);
my $group = WebGUI::Group->new($session,$session->form->process("gid"));
my @groups = $session->form->group('groups');
$group->addGroups(\@groups);
return www_manageGroupsInGroup($session);
@ -635,7 +635,7 @@ sub www_manageGroupsInGroup {
$f->submit;
my $output = $f->print;
$output .= '<p />';
$output .= $session->walkGroups($session->form->process("gid"));
$output .= walkGroups($session, $session->form->process("gid"));
return _submenu($session,$output,'813');
}

View file

@ -1,6 +1,18 @@
package WebGUI::i18n::English::Asset;
our $I18N = {
'add the missing page' => {
message => q|Add the missing page.|,
lastUpdated => 0,
context => q|the question asked of the admin when they click on a missing page|
},
'missing page query' => {
message => q|The page you have requested does not exist. What would you like to do?|,
lastUpdated => 0,
context => q|the question asked of the admin when they click on a missing page|
},
'package corrupt' => {
message => q|The package you tried to import appears to be corrupt. We imported up to the point where we detected corruption. If you won't want this portion, roll back your current version tag.|,
lastUpdated => 0,