- fix: Style Wizard
- fix: content-type - fix: Two cookies and incorrect Last-Modified date in HTTP header - fix: HTTP status code 404 broken - fix: Add missing page on Problem With Request - fix: Avatar/photo upload not working - fix: Shortcut with content lock fails (Thanks to Michelle Lamar)
This commit is contained in:
parent
aaa93d466b
commit
63b22dc502
6 changed files with 73 additions and 59 deletions
|
|
@ -10,6 +10,13 @@
|
||||||
- fix: Post Subject HTML
|
- fix: Post Subject HTML
|
||||||
- fix: Matrix: can't instantiate template
|
- fix: Matrix: can't instantiate template
|
||||||
- fix: Session id (Martin Kamerbeek / Procolix)
|
- fix: Session id (Martin Kamerbeek / Procolix)
|
||||||
|
- fix: Style Wizard
|
||||||
|
- fix: content-type
|
||||||
|
- fix: Two cookies and incorrect Last-Modified date in HTTP header
|
||||||
|
- fix: HTTP status code 404 broken
|
||||||
|
- fix: Add missing page on Problem With Request
|
||||||
|
- fix: Avatar/photo upload not working
|
||||||
|
- fix: Shortcut with content lock fails (Thanks to Michelle Lamar)
|
||||||
|
|
||||||
|
|
||||||
7.0.0
|
7.0.0
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
package WebGUI;
|
package WebGUI;
|
||||||
our $VERSION = "7.0.0";
|
our $VERSION = "7.0.1";
|
||||||
our $STATUS = "stable";
|
our $STATUS = "stable";
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
@ -371,7 +371,12 @@ sub tryAssetMethod {
|
||||||
my $output = eval{$asset->$methodToTry()};
|
my $output = eval{$asset->$methodToTry()};
|
||||||
if ($@) {
|
if ($@) {
|
||||||
$session->errorHandler->warn("Couldn't call method ".$method." on asset for url: ".$session->url->getRequestedUrl." Root cause: ".$@);
|
$session->errorHandler->warn("Couldn't call method ".$method." on asset for url: ".$session->url->getRequestedUrl." Root cause: ".$@);
|
||||||
$output = tryAssetMethod($session,$asset,'view') if ($method ne "view");
|
if ($method ne "view") {
|
||||||
|
$output = tryAssetMethod($session,$asset,'view');
|
||||||
|
} else {
|
||||||
|
# fatals return chunked
|
||||||
|
$output = 'chunked';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -467,7 +467,9 @@ sub getShortcutByCriteria {
|
||||||
if ($assetId) {
|
if ($assetId) {
|
||||||
$scratchId = "Shortcut_" . $assetId;
|
$scratchId = "Shortcut_" . $assetId;
|
||||||
if($self->session->scratch->get($scratchId) && !$self->getValue("disableContentLock")) {
|
if($self->session->scratch->get($scratchId) && !$self->getValue("disableContentLock")) {
|
||||||
return $self->session->scratch->get($scratchId) unless ($self->session->var->get("adminOn"));
|
unless ($self->session->var->get("adminOn") {
|
||||||
|
return WebGUI::Asset->newByDynamicClass($self->session, $self->session->scratch->get($scratchId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -452,6 +452,7 @@ sub www_styleWizard {
|
||||||
} elsif ($form->get("step") == 3) {
|
} elsif ($form->get("step") == 3) {
|
||||||
my $storageId = $form->get("logo","file");
|
my $storageId = $form->get("logo","file");
|
||||||
my $logo;
|
my $logo;
|
||||||
|
my $logoContent = '';
|
||||||
if ($storageId) {
|
if ($storageId) {
|
||||||
my $storage = WebGUI::Storage::Image->get($self->session,$storageId);
|
my $storage = WebGUI::Storage::Image->get($self->session,$storageId);
|
||||||
$logo = $self->addChild({
|
$logo = $self->addChild({
|
||||||
|
|
@ -464,8 +465,48 @@ sub www_styleWizard {
|
||||||
templateId=>"PBtmpl0000000000000088"
|
templateId=>"PBtmpl0000000000000088"
|
||||||
});
|
});
|
||||||
$logo->generateThumbnail;
|
$logo->generateThumbnail;
|
||||||
|
$logoContent = '<div class="logo"><a href="^H(linkonly);">^AssetProxy('.$logo->get("url").');</a></div>';
|
||||||
}
|
}
|
||||||
my $style = '<html>
|
my $customHead = '';
|
||||||
|
if ($form->get("layout") eq "1") {
|
||||||
|
$customHead .= '
|
||||||
|
.bodyContent {
|
||||||
|
background-color: '.$form->get("bodyBackgroundColor","color").';
|
||||||
|
color: '.$form->get("bodyForegroundColor","color").';
|
||||||
|
width: 70%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.menu {
|
||||||
|
width: 30%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.wrapper {
|
||||||
|
width: 80%;
|
||||||
|
margin-right: 10%;
|
||||||
|
margin-left: 10%;
|
||||||
|
background-color: '.$form->get("menuBackgroundColor","color").';
|
||||||
|
}
|
||||||
|
';
|
||||||
|
} else {
|
||||||
|
$customHead .= '
|
||||||
|
.bodyContent {
|
||||||
|
background-color: '.$form->get("bodyBackgroundColor","color").';
|
||||||
|
color: '.$form->get("bodyForegroundColor","color").';
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.menu {
|
||||||
|
background-color: '.$form->get("menuBackgroundColor","color").';
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.wrapper {
|
||||||
|
width: 80%;
|
||||||
|
margin-right: 10%;
|
||||||
|
margin-left: 10%;
|
||||||
|
}
|
||||||
|
';
|
||||||
|
}
|
||||||
|
my $style = '<html>
|
||||||
<head>
|
<head>
|
||||||
<tmpl_var head.tags>
|
<tmpl_var head.tags>
|
||||||
<title>^Page(title); - ^c;</title>
|
<title>^Page(title); - ^c;</title>
|
||||||
|
|
@ -504,44 +545,7 @@ my $style = '<html>
|
||||||
.padding {
|
.padding {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
.bodyContent {
|
'.$customHead.'
|
||||||
background-color: '.$form->get("bodyBackgroundColor","color").';
|
|
||||||
color: '.$form->get("bodyForegroundColor","color").';
|
|
||||||
width: 55%; ';
|
|
||||||
if ($form->get("layout") == 1) {
|
|
||||||
$style .= '
|
|
||||||
float: left;
|
|
||||||
height: 75%;
|
|
||||||
margin-right: 10%;
|
|
||||||
';
|
|
||||||
} else {
|
|
||||||
$style .= '
|
|
||||||
width: 80%;
|
|
||||||
margin-left: 10%;
|
|
||||||
margin-right: 10%;
|
|
||||||
';
|
|
||||||
}
|
|
||||||
$style .= '
|
|
||||||
}
|
|
||||||
.menu {
|
|
||||||
background-color: '.$form->get("menuBackgroundColor","color").';
|
|
||||||
width: 25%; ';
|
|
||||||
if ($form->get("layout") == 1) {
|
|
||||||
$style .= '
|
|
||||||
margin-left: 10%;
|
|
||||||
height: 75%;
|
|
||||||
float: left;
|
|
||||||
';
|
|
||||||
} else {
|
|
||||||
$style .= '
|
|
||||||
width: 80%;
|
|
||||||
text-align: center;
|
|
||||||
margin-left: 10%;
|
|
||||||
margin-right: 10%;
|
|
||||||
';
|
|
||||||
}
|
|
||||||
$style .= '
|
|
||||||
}
|
|
||||||
a {
|
a {
|
||||||
color: '.$form->get("linkColor","color").';
|
color: '.$form->get("linkColor","color").';
|
||||||
}
|
}
|
||||||
|
|
@ -554,25 +558,20 @@ if ($form->get("layout") == 1) {
|
||||||
^AdminBar;
|
^AdminBar;
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
<div class="padding">
|
<div class="padding">
|
||||||
';
|
'.$logoContent.'
|
||||||
if (defined $logo) {
|
|
||||||
$style .= '<div class="logo"><a href="^H(linkonly);">^AssetProxy('.$logo->get("url").');</a></div>';
|
|
||||||
}
|
|
||||||
$style .= '
|
|
||||||
'.$form->get("heading").'
|
'.$form->get("heading").'
|
||||||
<div class="endFloat"></div>
|
<div class="endFloat"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="menu">
|
<div class="wrapper">
|
||||||
<div class="padding">^AssetProxy('.($form->get("layout") == 1 ? 'flexmenu' : 'toplevelmenuhorizontal').');</div>
|
<div class="menu">
|
||||||
|
<div class="padding">^AssetProxy('.($form->get("layout") == 1 ? 'flexmenu' : 'toplevelmenuhorizontal').');</div>
|
||||||
|
</div>
|
||||||
|
<div class="bodyContent">
|
||||||
|
<div class="padding"><tmpl_var body.content></div>
|
||||||
|
</div>
|
||||||
|
<div class="endFloat"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bodyContent">
|
|
||||||
<div class="padding"><tmpl_var body.content></div>
|
|
||||||
</div>';
|
|
||||||
if ($form->get("layout") == 1) {
|
|
||||||
$style .= '<div class="endFloat"></div>';
|
|
||||||
}
|
|
||||||
$style .= '
|
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
<div class="padding">
|
<div class="padding">
|
||||||
<div class="siteFunctions">^a(^@;); ^AdminToggle;</div>
|
<div class="siteFunctions">^a(^@;); ^AdminToggle;</div>
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ sub sendHeader {
|
||||||
$request->headers_out->set(Location => $self->{_http}{location});
|
$request->headers_out->set(Location => $self->{_http}{location});
|
||||||
$request->status(301);
|
$request->status(301);
|
||||||
} else {
|
} else {
|
||||||
$request->content_type($self->{_http}{mimetype} || "text/html");
|
$request->content_type($self->{_http}{mimetype} || "text/html; charset=UTF-8");
|
||||||
my $date = ($userId eq "1") ? $datetime->epochToHttp($self->{_http}{lastModified}) : $datetime->epochToHttp;
|
my $date = ($userId eq "1") ? $datetime->epochToHttp($self->{_http}{lastModified}) : $datetime->epochToHttp;
|
||||||
my $cacheControl = $self->{_http}{cacheControl};
|
my $cacheControl = $self->{_http}{cacheControl};
|
||||||
$request->headers_out->set('Last-Modified' => $date);
|
$request->headers_out->set('Last-Modified' => $date);
|
||||||
|
|
@ -202,8 +202,9 @@ sub sendHeader {
|
||||||
if ($self->{_http}{filename}) {
|
if ($self->{_http}{filename}) {
|
||||||
$request->headers_out->set('Content-Disposition' => qq!attachment; filename="$self->{_http}{filename}"!);
|
$request->headers_out->set('Content-Disposition' => qq!attachment; filename="$self->{_http}{filename}"!);
|
||||||
}
|
}
|
||||||
|
$request->status($self->getStatus());
|
||||||
|
$request->status_line($self->getStatus().' '.$self->{_http}{statusDescription});
|
||||||
}
|
}
|
||||||
$request->status_line($self->getStatus().' '.$self->{_http}{statusDescription});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ The size in pixels of the thumbnail to be generated. If not specified the thumbn
|
||||||
sub generateThumbnail {
|
sub generateThumbnail {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $filename = shift;
|
my $filename = shift;
|
||||||
my $thumbnailSize = shift || $self->session->setting->get("thumbnailSize");
|
my $thumbnailSize = shift || $self->session->setting->get("thumbnailSize") || 100;
|
||||||
unless (defined $filename) {
|
unless (defined $filename) {
|
||||||
$self->session->errorHandler->error("Can't generate a thumbnail when you haven't specified a file.");
|
$self->session->errorHandler->error("Can't generate a thumbnail when you haven't specified a file.");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue