Images now create revisions as you resize them, so you can roll back to a
previous size. adjusted roy's test because it's not accurate
This commit is contained in:
parent
057d743dfb
commit
f8d22359d5
3 changed files with 9 additions and 4 deletions
|
|
@ -32,6 +32,8 @@
|
||||||
- Fixed the search function that broke in 7.0.7.
|
- Fixed the search function that broke in 7.0.7.
|
||||||
- fix: typo + obsolete approve section in Collaboration System Default Thread template
|
- fix: typo + obsolete approve section in Collaboration System Default Thread template
|
||||||
- fix: attachments section of post form not working correctly on edit
|
- fix: attachments section of post form not working correctly on edit
|
||||||
|
- Images now create revisions as you resize them, so you can roll back to a
|
||||||
|
previous size.
|
||||||
|
|
||||||
7.0.7
|
7.0.7
|
||||||
- rfe: Image Management (funded by Formation Design Systems)
|
- rfe: Image Management (funded by Formation Design Systems)
|
||||||
|
|
|
||||||
|
|
@ -263,8 +263,11 @@ sub www_resize {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||||
if ($self->session->form->process("newWidth") || $self->session->form->process("newHeight")) {
|
if ($self->session->form->process("newWidth") || $self->session->form->process("newHeight")) {
|
||||||
$self->getStorageLocation->resize($self->get("filename"),$self->session->form->process("newWidth"),$self->session->form->process("newHeight"));
|
my $newSelf = $self->addRevision();
|
||||||
$self->setSize($self->getStorageLocation->getFileSize($self->get("filename")));
|
delete $newSelf->{_storageLocation};
|
||||||
|
$newSelf->getStorageLocation->resize($newSelf->get("filename"),$newSelf->session->form->process("newWidth"),$newSelf->session->form->process("newHeight"));
|
||||||
|
$newSelf->setSize($newSelf->getStorageLocation->getFileSize($newSelf->get("filename")));
|
||||||
|
$self = $newSelf;
|
||||||
}
|
}
|
||||||
my $i18n = WebGUI::International->new($self->session,"Asset_Image");
|
my $i18n = WebGUI::International->new($self->session,"Asset_Image");
|
||||||
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=edit'),$i18n->get("edit image"));
|
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=edit'),$i18n->get("edit image"));
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ use lib "$FindBin::Bin/../../lib";
|
||||||
|
|
||||||
use WebGUI::Test;
|
use WebGUI::Test;
|
||||||
use WebGUI::Session;
|
use WebGUI::Session;
|
||||||
use Test::More tests => 21; # increment this value for each test you create
|
use Test::More tests => 20; # increment this value for each test you create
|
||||||
use WebGUI::Asset::Wobject::Article;
|
use WebGUI::Asset::Wobject::Article;
|
||||||
|
|
||||||
my $session = WebGUI::Test->session;
|
my $session = WebGUI::Test->session;
|
||||||
|
|
@ -27,7 +27,7 @@ my $node = WebGUI::Asset->getImportNode($session);
|
||||||
# Lets create an article wobject using all defaults then test to see if those defaults were set
|
# Lets create an article wobject using all defaults then test to see if those defaults were set
|
||||||
my $articleDefaults = {
|
my $articleDefaults = {
|
||||||
cacheTimeout => 3600,
|
cacheTimeout => 3600,
|
||||||
templateId => 'PBtmpl0000000000000002',
|
# templateId => 'PBtmpl0000000000000002',
|
||||||
linkURL => undef,
|
linkURL => undef,
|
||||||
linkTitle => undef,
|
linkTitle => undef,
|
||||||
storageId => undef,
|
storageId => undef,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue