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:
JT Smith 2006-09-27 21:19:19 +00:00
parent 057d743dfb
commit f8d22359d5
3 changed files with 9 additions and 4 deletions

View file

@ -32,6 +32,8 @@
- Fixed the search function that broke in 7.0.7.
- fix: typo + obsolete approve section in Collaboration System Default Thread template
- 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
- rfe: Image Management (funded by Formation Design Systems)

View file

@ -263,8 +263,11 @@ sub www_resize {
my $self = shift;
return $self->session->privilege->insufficient() unless $self->canEdit;
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"));
$self->setSize($self->getStorageLocation->getFileSize($self->get("filename")));
my $newSelf = $self->addRevision();
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");
$self->getAdminConsole->addSubmenuItem($self->getUrl('func=edit'),$i18n->get("edit image"));

View file

@ -16,7 +16,7 @@ use lib "$FindBin::Bin/../../lib";
use WebGUI::Test;
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;
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
my $articleDefaults = {
cacheTimeout => 3600,
templateId => 'PBtmpl0000000000000002',
# templateId => 'PBtmpl0000000000000002',
linkURL => undef,
linkTitle => undef,
storageId => undef,