- 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: Matrix: can't instantiate template
|
||||
- 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
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
package WebGUI;
|
||||
our $VERSION = "7.0.0";
|
||||
our $VERSION = "7.0.1";
|
||||
our $STATUS = "stable";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -371,7 +371,12 @@ sub tryAssetMethod {
|
|||
my $output = eval{$asset->$methodToTry()};
|
||||
if ($@) {
|
||||
$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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -467,7 +467,9 @@ sub getShortcutByCriteria {
|
|||
if ($assetId) {
|
||||
$scratchId = "Shortcut_" . $assetId;
|
||||
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) {
|
||||
my $storageId = $form->get("logo","file");
|
||||
my $logo;
|
||||
my $logoContent = '';
|
||||
if ($storageId) {
|
||||
my $storage = WebGUI::Storage::Image->get($self->session,$storageId);
|
||||
$logo = $self->addChild({
|
||||
|
|
@ -464,8 +465,48 @@ sub www_styleWizard {
|
|||
templateId=>"PBtmpl0000000000000088"
|
||||
});
|
||||
$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>
|
||||
<tmpl_var head.tags>
|
||||
<title>^Page(title); - ^c;</title>
|
||||
|
|
@ -504,44 +545,7 @@ my $style = '<html>
|
|||
.padding {
|
||||
padding: 5px;
|
||||
}
|
||||
.bodyContent {
|
||||
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 .= '
|
||||
}
|
||||
'.$customHead.'
|
||||
a {
|
||||
color: '.$form->get("linkColor","color").';
|
||||
}
|
||||
|
|
@ -554,25 +558,20 @@ if ($form->get("layout") == 1) {
|
|||
^AdminBar;
|
||||
<div class="heading">
|
||||
<div class="padding">
|
||||
';
|
||||
if (defined $logo) {
|
||||
$style .= '<div class="logo"><a href="^H(linkonly);">^AssetProxy('.$logo->get("url").');</a></div>';
|
||||
}
|
||||
$style .= '
|
||||
'.$logoContent.'
|
||||
'.$form->get("heading").'
|
||||
<div class="endFloat"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<div class="padding">^AssetProxy('.($form->get("layout") == 1 ? 'flexmenu' : 'toplevelmenuhorizontal').');</div>
|
||||
<div class="wrapper">
|
||||
<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 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="padding">
|
||||
<div class="siteFunctions">^a(^@;); ^AdminToggle;</div>
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ sub sendHeader {
|
|||
$request->headers_out->set(Location => $self->{_http}{location});
|
||||
$request->status(301);
|
||||
} 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 $cacheControl = $self->{_http}{cacheControl};
|
||||
$request->headers_out->set('Last-Modified' => $date);
|
||||
|
|
@ -202,8 +202,9 @@ sub sendHeader {
|
|||
if ($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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ The size in pixels of the thumbnail to be generated. If not specified the thumbn
|
|||
sub generateThumbnail {
|
||||
my $self = shift;
|
||||
my $filename = shift;
|
||||
my $thumbnailSize = shift || $self->session->setting->get("thumbnailSize");
|
||||
my $thumbnailSize = shift || $self->session->setting->get("thumbnailSize") || 100;
|
||||
unless (defined $filename) {
|
||||
$self->session->errorHandler->error("Can't generate a thumbnail when you haven't specified a file.");
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue