merging 7.4 changes
This commit is contained in:
parent
afb67294b8
commit
865c1d315b
8 changed files with 413 additions and 13 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue