- 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:
parent
2e1de9d214
commit
16bd394434
8 changed files with 76 additions and 20 deletions
|
|
@ -3,10 +3,15 @@
|
||||||
fixed.
|
fixed.
|
||||||
- fix: Column Layout seems a little messed up
|
- fix: Column Layout seems a little messed up
|
||||||
- Fixed the EMS default templates to expose all functionality.
|
- Fixed the EMS default templates to expose all functionality.
|
||||||
- Fixed a problem in the EMS where it wouldn't let you add any events.
|
|
||||||
- fix: FieldName incorrect after adding profile field
|
- fix: FieldName incorrect after adding profile field
|
||||||
- fix: preload.perl for other roots than /data/WebGUI
|
- fix: preload.perl for other roots than /data/WebGUI
|
||||||
- Fixed a bug where polls weren't distributing karma.
|
- Fixed a bug where polls weren't distributing karma.
|
||||||
|
- 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
|
||||||
|
|
||||||
6.99.2
|
6.99.2
|
||||||
- fix - demo.plainblack.com getting started
|
- fix - demo.plainblack.com getting started
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,18 @@ my $session = start(); # this line required
|
||||||
|
|
||||||
fixCs();
|
fixCs();
|
||||||
fixCss();
|
fixCss();
|
||||||
|
fixSpectre();
|
||||||
|
|
||||||
finish($session); # this line required
|
finish($session); # this line required
|
||||||
|
|
||||||
|
|
||||||
|
#-------------------------------------------------
|
||||||
|
sub fixSpectre {
|
||||||
|
print "\tAdding more security to Spectre.\n" unless ($quiet);
|
||||||
|
my $config = WebGUI::Config->new("../..","spectre.conf");
|
||||||
|
$config->set("ip","127.0.0.1");
|
||||||
|
}
|
||||||
|
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
sub fixCss {
|
sub fixCss {
|
||||||
print "\tUpdating CSS.\n" unless ($quiet);
|
print "\tUpdating CSS.\n" unless ($quiet);
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
# Define the IP address that Spectre should run on. If WebGUI and
|
||||||
|
# Spectre are on the same machine, you should leave this as is.
|
||||||
|
|
||||||
|
"ip" : "127.0.0.1",
|
||||||
|
|
||||||
# Define a port for Spectre to run on between 1024 and 65000.
|
# Define a port for Spectre to run on between 1024 and 65000.
|
||||||
|
|
||||||
"port" : 32133,
|
"port" : 32133,
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,9 @@ sub new {
|
||||||
my $self = {_debug=>$debug, _config=>$config, _logger=>$logger};
|
my $self = {_debug=>$debug, _config=>$config, _logger=>$logger};
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
$self->runTests();
|
$self->runTests();
|
||||||
|
$self->debug("Trying to bind to ".$config->get("ip").":".$config->get("port"));
|
||||||
create_ikc_server(
|
create_ikc_server(
|
||||||
|
ip => $config->get("ip"),
|
||||||
port => $config->get("port"),
|
port => $config->get("port"),
|
||||||
name => 'Spectre',
|
name => 'Spectre',
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -197,10 +197,10 @@ sub page {
|
||||||
$output = tryAssetMethod($session,$asset,$method);
|
$output = tryAssetMethod($session,$asset,$method);
|
||||||
$output = tryAssetMethod($session,$asset,"view") unless ($output || ($method eq "view"));
|
$output = tryAssetMethod($session,$asset,"view") unless ($output || ($method eq "view"));
|
||||||
}
|
}
|
||||||
if (defined($output) and $output eq "") {
|
if ($output eq "") {
|
||||||
if ($session->var->isAdminOn) { # they're expecting it to be there, so let's help them add it
|
if ($session->var->isAdminOn) { # they're expecting it to be there, so let's help them add it
|
||||||
my $asset = WebGUI::Asset->newByUrl($session, $session->url->getRefererUrl) || WebGUI::Asset->getDefault($session);
|
my $asset = WebGUI::Asset->newByUrl($session, $session->url->getRefererUrl) || WebGUI::Asset->getDefault($session);
|
||||||
$session->http->setRedirect($asset->getUrl("func=add;class=WebGUI::Asset::Wobject::Layout;url=".$assetUrl)) unless $session->url->getRequestedUrl eq $session->url->getRefererUrl;
|
$output = $asset->addMissing($assetUrl);
|
||||||
} else { # not in admin mode, so can't create it, so display not found
|
} else { # not in admin mode, so can't create it, so display not found
|
||||||
$session->http->setStatus("404","Page Not Found");
|
$session->http->setStatus("404","Page Not Found");
|
||||||
my $notFound = WebGUI::Asset->getNotFound($session);
|
my $notFound = WebGUI::Asset->getNotFound($session);
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,32 @@ These methods are available from this class:
|
||||||
=cut
|
=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] )
|
=head2 canAdd ( session, [userId, groupId] )
|
||||||
|
|
@ -479,7 +505,6 @@ sub getContainer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 getDefault ( session )
|
=head2 getDefault ( session )
|
||||||
|
|
@ -916,18 +941,24 @@ sub getToolbar {
|
||||||
my $output = '<script type="text/javascript">
|
my $output = '<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
var contextMenu = new contextMenu_createWithImage("'.$self->getIcon(1).'","'.$self->getId.'","'.$self->getName.'");';
|
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"}) {
|
if ($userUiLevel >= $uiLevels->{"changeUrl"}) {
|
||||||
$output .= 'contextMenu.addLink("'.$self->getUrl("func=changeUrl").'","'.$i18n->get("change url").'");';
|
$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"}) {
|
if ($userUiLevel >= $uiLevels->{"editBranch"}) {
|
||||||
$output .= 'contextMenu.addLink("'.$self->getUrl("func=editBranch").'","'.$i18n->get("edit branch").'");';
|
$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"}) {
|
if ($userUiLevel >= $uiLevels->{"promote"}) {
|
||||||
$output .= 'contextMenu.addLink("'.$self->getUrl("func=promote").'","'.$i18n->get("promote").'");';
|
$output .= 'contextMenu.addLink("'.$self->getUrl("func=promote").'","'.$i18n->get("promote").'");';
|
||||||
}
|
}
|
||||||
|
|
@ -937,12 +968,6 @@ sub getToolbar {
|
||||||
if ($userUiLevel >= $uiLevels->{"manage"}) {
|
if ($userUiLevel >= $uiLevels->{"manage"}) {
|
||||||
$output .= 'contextMenu.addLink("'.$self->getUrl("func=manageAssets").'","'.$i18n->get("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();
|
$output .= 'contextMenu.print();
|
||||||
//]]>
|
//]]>
|
||||||
</script>'.$toolbar;
|
</script>'.$toolbar;
|
||||||
|
|
@ -1829,7 +1854,6 @@ sub www_add {
|
||||||
return $newAsset->www_edit();
|
return $newAsset->www_edit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 www_ajaxInlineView ( )
|
=head2 www_ajaxInlineView ( )
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ sub walkGroups {
|
||||||
.$session->icon->delete('op=deleteGroupGrouping;gid='.$parentId.';delete='.$id)
|
.$session->icon->delete('op=deleteGroupGrouping;gid='.$parentId.';delete='.$id)
|
||||||
.$session->icon->edit('op=editGroup;gid='.$id)
|
.$session->icon->edit('op=editGroup;gid='.$id)
|
||||||
.' '.$name.'<br />';
|
.' '.$name.'<br />';
|
||||||
$output .= $session->walkGroups($id,$indent." ");
|
$output .= walkGroups($session, $id,$indent." ");
|
||||||
}
|
}
|
||||||
$sth->finish;
|
$sth->finish;
|
||||||
return $output;
|
return $output;
|
||||||
|
|
@ -159,7 +159,7 @@ sub walkGroups {
|
||||||
sub www_addGroupsToGroupSave {
|
sub www_addGroupsToGroupSave {
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
return $session->privilege->adminOnly() unless ($session->user->isInGroup(3) || _hasSecondaryPrivilege($session,$session->form->process("gid")));
|
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');
|
my @groups = $session->form->group('groups');
|
||||||
$group->addGroups(\@groups);
|
$group->addGroups(\@groups);
|
||||||
return www_manageGroupsInGroup($session);
|
return www_manageGroupsInGroup($session);
|
||||||
|
|
@ -635,7 +635,7 @@ sub www_manageGroupsInGroup {
|
||||||
$f->submit;
|
$f->submit;
|
||||||
my $output = $f->print;
|
my $output = $f->print;
|
||||||
$output .= '<p />';
|
$output .= '<p />';
|
||||||
$output .= $session->walkGroups($session->form->process("gid"));
|
$output .= walkGroups($session, $session->form->process("gid"));
|
||||||
return _submenu($session,$output,'813');
|
return _submenu($session,$output,'813');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,18 @@
|
||||||
package WebGUI::i18n::English::Asset;
|
package WebGUI::i18n::English::Asset;
|
||||||
|
|
||||||
our $I18N = {
|
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' => {
|
'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.|,
|
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,
|
lastUpdated => 0,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue