merging 7.4 changes
This commit is contained in:
parent
afb67294b8
commit
865c1d315b
8 changed files with 413 additions and 13 deletions
|
|
@ -9,8 +9,16 @@
|
|||
(Diona Kidd, Knowmad Technologies)
|
||||
|
||||
7.4.15
|
||||
- fix: Image asset test fails
|
||||
- fix: Article attachments don't obey max image dimentions
|
||||
- fix: Article size doesn't include attachments
|
||||
- fix: Invalid group grouping entries can prevent admin admin mode and other operations
|
||||
- clean up invalid group groupings
|
||||
- fix: Editing events after upgrade shows incorrect time zone
|
||||
- fix: DataForm doesn't send mail if mail fields are in a tab
|
||||
- fix: Calendar feed list doesn't display in IE
|
||||
- fix: Event: attachments link icon not rendering (perlDreamer Consulting, LLC.)
|
||||
http://www.plainblack.com/bugs/tracker/event-attachments-link-icon-not-rendering
|
||||
|
||||
7.4.14
|
||||
- fix: CS posts won't allow new attachments after deleting an old one
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
223
docs/upgrades/templates-7.4.15/CalendarEvent000000001.tmpl
Normal file
223
docs/upgrades/templates-7.4.15/CalendarEvent000000001.tmpl
Normal file
|
|
@ -0,0 +1,223 @@
|
|||
#CalendarEvent000000001
|
||||
#title: Default Calendar Event
|
||||
#url: default-calendar-event
|
||||
#menutitle:
|
||||
#namespace: Calendar/Event
|
||||
<table cellspacing="0" cellpadding="0" width="600" id="mCAL" border="0">
|
||||
<tr>
|
||||
<td style="text-align:right;border-bottom:solid white 1px;">
|
||||
<a href="<tmpl_var urlDay>" class="tab">Day</a>
|
||||
<a href="<tmpl_var urlWeek>" class="tab">Week</a>
|
||||
<a href="<tmpl_var urlMonth>" class="tab">Month</a>
|
||||
<a href="<tmpl_var urlSearch>" class="tab">Search</a>
|
||||
|
||||
<div class="controls">
|
||||
<a href="?func=edit">Edit</a>
|
||||
• <a href="?func=delete">Delete</a>
|
||||
• <a href="?print=1">Print</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="months">
|
||||
<div style="float: left;"><a href="<tmpl_var prevUrl>"><< Previous Event</a></div>
|
||||
<div style="float: right;"><a href="<tmpl_var nextUrl>">Next Event >></a></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="months">
|
||||
Event Details
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:100%">
|
||||
<table width="100%" cellspacing="2" cellpadding="0">
|
||||
<tr>
|
||||
<td class="heading">
|
||||
<div style="padding:4px;">Event Title</div>
|
||||
</td>
|
||||
<td class="day">
|
||||
<div class="eventWrapper">
|
||||
<tmpl_var title>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="heading">
|
||||
<div style="padding:4px;">Location</div>
|
||||
</td>
|
||||
<td class="day">
|
||||
<div class="eventWrapper">
|
||||
<tmpl_var location>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="heading">
|
||||
<div style="padding:4px;">Description</div>
|
||||
</td>
|
||||
<td class="day">
|
||||
<div class="eventWrapper"><tmpl_var description></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="heading">
|
||||
<div style="padding:4px;">Scheduled</div>
|
||||
</td>
|
||||
<td class="day">
|
||||
<div class="eventWrapper">
|
||||
<tmpl_var dateSpan>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="heading">
|
||||
<div style="padding:4px;">Related Material</div>
|
||||
</td>
|
||||
<td class="day"> <div class="eventWrapper"><tmpl_loop relatedLinks>
|
||||
<a href="<tmpl_var linkUrl>"><tmpl_var linkUrl></a><br />
|
||||
</tmpl_loop></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="heading">
|
||||
<div style="padding:4px;">Attachments</div>
|
||||
</td>
|
||||
<td class="day"> <div class="eventWrapper"><tmpl_loop attachment_loop>
|
||||
<a href="<tmpl_var url>"><tmpl_var filename> <img src="<tmpl_var icon>" /></a><br />
|
||||
</tmpl_loop></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
~~~
|
||||
<style type="text/css">
|
||||
/* Edited with EditCSS */
|
||||
|
||||
/**** Inline STYLE-tag style sheet ****/
|
||||
|
||||
body * {
|
||||
margin:0px;
|
||||
}
|
||||
#mCAL {
|
||||
|
||||
}
|
||||
#mCAL td {
|
||||
font-size:10px;
|
||||
font-family:arial;
|
||||
}
|
||||
#mCAL .tab {
|
||||
|
||||
border-bottom-style:none;
|
||||
font-weight:bold;
|
||||
padding: 2px 15px 0px 15px;
|
||||
text-align;center;
|
||||
background-color:#E9ECF3;
|
||||
-moz-border-radius-topLeft:10px;
|
||||
-moz-border-radius-topRight:10px;
|
||||
color:#7588B5;
|
||||
text-decoration:none;
|
||||
font-size:10pt;
|
||||
display:block;
|
||||
float:left;
|
||||
margin-right:5px;
|
||||
}
|
||||
#mCAL .tab:hover {
|
||||
color:black;
|
||||
}
|
||||
#mCAL .active {
|
||||
background-color:#DFE3EE;
|
||||
color:#404F77;
|
||||
border-bottom:solid #DFE3EE 1px;
|
||||
}
|
||||
#mCAL a {
|
||||
font-size:11px;
|
||||
color:#517AC8;
|
||||
}
|
||||
#mCAL .heading {
|
||||
width:200px;
|
||||
-moz-box-sizing:border-box;
|
||||
background-color:#ABB7D1;
|
||||
text-align:center;
|
||||
font-weight:bold;
|
||||
color:#374664;
|
||||
font-size:9px;
|
||||
letter-spacing:1px;
|
||||
text-transform:uppercase;
|
||||
text-align:right;
|
||||
vertical-align:top;
|
||||
-moz-border-radius-bottomRight:8px;
|
||||
-moz-border-radius-topRight:8px;
|
||||
}
|
||||
#mCAL .day {
|
||||
background-color:#E9ECF3;
|
||||
width:400px;
|
||||
position:relative;
|
||||
vertical-align:top;
|
||||
-moz-border-radius-topLeft:8px;
|
||||
-moz-border-radius-bottomLeft:8px;
|
||||
border:solid #CCD2E3 1px;
|
||||
}
|
||||
|
||||
|
||||
#mCAL .months {
|
||||
text-align:center;
|
||||
background-color:#DFE3EE;
|
||||
color:#3E4D75;
|
||||
font-size:14px;
|
||||
font-weight:bold;
|
||||
}
|
||||
#mCAL .months a {
|
||||
color:#517AC8;
|
||||
text-decoration:none;
|
||||
}
|
||||
#mCAL .months .monthLink {
|
||||
text-decoration:none;
|
||||
padding-left:5px;
|
||||
padding-right:5px;
|
||||
color:#AAB8D5;
|
||||
font-size:12px;
|
||||
font-weight:bold;
|
||||
}
|
||||
#mCAL .months .current {
|
||||
color:#517AC8;
|
||||
}
|
||||
#mCAL .current {
|
||||
font-weight:bold;
|
||||
color:#517AC8;
|
||||
background-color:#fff;
|
||||
-moz-border-radius:5px;
|
||||
}
|
||||
#mCAL .curMonth {
|
||||
text-align:center;
|
||||
margin: 2px 0px;
|
||||
background-color:#517AC8;
|
||||
color:white;
|
||||
font-size:14px;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
#mCAL .searchField {
|
||||
margin: 2px 10px;
|
||||
border:solid #ABB7D1 1px;
|
||||
}
|
||||
#mCAL .searchBtn {
|
||||
background-color: #ABB7D1;
|
||||
border:solid #CCD2E3 1px;
|
||||
color:white;
|
||||
font-weight:bold;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
#mCAL .eventWrapper {
|
||||
margin:2px 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
143
docs/upgrades/upgrade_7.4.14-7.4.15.pl
Normal file
143
docs/upgrades/upgrade_7.4.14-7.4.15.pl
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2006 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use lib "../../lib";
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
|
||||
|
||||
my $toVersion = '7.4.15';
|
||||
my $quiet; # this line required
|
||||
|
||||
|
||||
my $session = start(); # this line required
|
||||
|
||||
removeOrphanGroupings($session);
|
||||
changeDefaultTimeZone($session);
|
||||
# upgrade functions go here
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
#-------------------------------------------------
|
||||
sub changeDefaultTimeZone {
|
||||
my $session = shift;
|
||||
print "\tChanging Default Event Timezone.\n" unless ($quiet);
|
||||
$session->db->write("alter table Event alter timeZone set default 'America/Chicago'");
|
||||
my $visitor = WebGUI::User->new($session, 1);
|
||||
my $defaultTimeZone = $visitor->profileField('timeZone');
|
||||
$session->db->write("update Event set timeZone=? where timeZone='UTC'", [$defaultTimeZone]);
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub removeOrphanGroupings {
|
||||
my $session = shift;
|
||||
print "\tCleaning up stale groupings.\n" unless ($quiet);
|
||||
$session->db->write("delete from groupGroupings where groupId not in (select distinct groupId from groups)");
|
||||
}
|
||||
|
||||
##-------------------------------------------------
|
||||
#sub exampleFunction {
|
||||
# my $session = shift;
|
||||
# print "\tWe're doing some stuff here that you should know about.\n" unless ($quiet);
|
||||
# # and here's our code
|
||||
#}
|
||||
|
||||
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE ----
|
||||
|
||||
#-------------------------------------------------
|
||||
sub start {
|
||||
my $configFile;
|
||||
$|=1; #disable output buffering
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile,
|
||||
'quiet'=>\$quiet
|
||||
);
|
||||
my $session = WebGUI::Session->open("../..",$configFile);
|
||||
$session->user({userId=>3});
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->set({name=>"Upgrade to ".$toVersion});
|
||||
$session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".$session->datetime->time().")");
|
||||
updateTemplates($session);
|
||||
return $session;
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub finish {
|
||||
my $session = shift;
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->commit;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub updateTemplates {
|
||||
my $session = shift;
|
||||
return undef unless (-d "templates-".$toVersion);
|
||||
print "\tUpdating templates.\n" unless ($quiet);
|
||||
opendir(DIR,"templates-".$toVersion);
|
||||
my @files = readdir(DIR);
|
||||
closedir(DIR);
|
||||
my $importNode = WebGUI::Asset->getImportNode($session);
|
||||
my $newFolder = undef;
|
||||
foreach my $file (@files) {
|
||||
next unless ($file =~ /\.tmpl$/);
|
||||
open(FILE,"<templates-".$toVersion."/".$file);
|
||||
my $first = 1;
|
||||
my $create = 0;
|
||||
my $head = 0;
|
||||
my %properties = (className=>"WebGUI::Asset::Template");
|
||||
while (my $line = <FILE>) {
|
||||
if ($first) {
|
||||
$line =~ m/^\#(.*)$/;
|
||||
$properties{id} = $1;
|
||||
$first = 0;
|
||||
} elsif ($line =~ m/^\#create$/) {
|
||||
$create = 1;
|
||||
} elsif ($line =~ m/^\#(.*):\s*(.*)$/) {
|
||||
$properties{$1} = $2;
|
||||
} elsif ($line =~ m/^~~~$/) {
|
||||
$head = 1;
|
||||
} elsif ($head) {
|
||||
$properties{headBlock} .= $line;
|
||||
} else {
|
||||
$properties{template} .= $line;
|
||||
}
|
||||
}
|
||||
close(FILE);
|
||||
if ($create) {
|
||||
$newFolder = createNewTemplatesFolder($importNode) unless (defined $newFolder);
|
||||
my $template = $newFolder->addChild(\%properties, $properties{id});
|
||||
} else {
|
||||
my $template = WebGUI::Asset->new($session,$properties{id}, "WebGUI::Asset::Template");
|
||||
if (defined $template) {
|
||||
my $newRevision = $template->addRevision(\%properties);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub createNewTemplatesFolder {
|
||||
my $importNode = shift;
|
||||
my $newFolder = $importNode->addChild({
|
||||
className=>"WebGUI::Asset::Wobject::Folder",
|
||||
title => $toVersion." New Templates",
|
||||
menuTitle => $toVersion." New Templates",
|
||||
url=> $toVersion."_new_templates",
|
||||
groupIdView=>"12"
|
||||
});
|
||||
return $newFolder;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -221,6 +221,30 @@ sub prepareView {
|
|||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
sub processPropertiesFromFormPost {
|
||||
my $self = shift;
|
||||
$self->SUPER::processPropertiesFromFormPost(@_);
|
||||
my $size = 0;
|
||||
my $storage = $self->getStorageLocation;
|
||||
foreach my $file (@{$storage->getFiles}) {
|
||||
if ($storage->isImage($file)) {
|
||||
my ($w, $h) = $storage->getSizeInPixels($file);
|
||||
my $max_size = $self->session->setting->get("maxImageSize");
|
||||
if($w > $max_size || $h > $max_size) {
|
||||
if($w > $h) {
|
||||
$storage->resize($file, $max_size);
|
||||
}
|
||||
else {
|
||||
$storage->resize($file, 0, $max_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
$size += $storage->getFileSize($file);
|
||||
}
|
||||
$self->setSize($size);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -574,7 +574,9 @@ sub getAllUsers {
|
|||
##Have to iterate twice due to the withoutExpired clause.
|
||||
foreach my $groupId (@{ $groups }) {
|
||||
my $subGroup = WebGUI::Group->new($self->session, $groupId);
|
||||
push @users, @{ $subGroup->getAllUsers(1, $withoutExpired, $loopCount) };
|
||||
next
|
||||
if !$subGroup;
|
||||
push @users, @{ $subGroup->getAllUsers(1, $withoutExpired, $loopCount) };
|
||||
}
|
||||
my %users = map { $_ => 1 } @users;
|
||||
@users = keys %users;
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ use strict;
|
|||
use lib "$FindBin::Bin/../../lib";
|
||||
|
||||
use Test::MockObject;
|
||||
my $mocker = Test::MockObject->new();
|
||||
#$mocker->fake_module('WebGUI::Form::Image', fake_method => sub {return 1;});
|
||||
# XXX
|
||||
# Hack to make this test run. This exact same code works fine for File.t above
|
||||
$mocker->fake_module('WebGUI::Form::Image', fake_method => sub {return 1;});
|
||||
$mocker->fake_new('WebGUI::Form::Image');
|
||||
my $mocker;
|
||||
BEGIN {
|
||||
$mocker = Test::MockObject->new();
|
||||
$mocker->fake_module('WebGUI::Form::Image');
|
||||
$mocker->fake_new('WebGUI::Form::Image');
|
||||
}
|
||||
|
||||
use WebGUI::Test;
|
||||
use WebGUI::Session;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue