From aaa93d466b983c67509b1fdef7d6d13cb93bfa3c Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 11 Jul 2006 16:44:59 +0000 Subject: [PATCH] - fix: Can't create new account - fix: Several new assets aren't added to config during upgrade process - fix: Post Subject HTML - fix: Matrix: can't instantiate template --- docs/changelog/7.x.x.txt | 5 +++++ docs/upgrades/upgrade_7.0.0-7.0.1.pl | 10 ++++++++++ lib/WebGUI/Asset/Post.pm | 1 + lib/WebGUI/Asset/Wobject/Matrix.pm | 13 ++++++++----- lib/WebGUI/Operation/Profile.pm | 2 +- 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index e27e31b3e..794dc89db 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -5,8 +5,13 @@ list - fix: Syndicated wobject erro 6.8+ - fix: new spectre.pl error (Martin Kamerbeek / Procolix) + - fix: Can't create new account + - fix: Several new assets aren't added to config during upgrade process + - fix: Post Subject HTML + - fix: Matrix: can't instantiate template - fix: Session id (Martin Kamerbeek / Procolix) + 7.0.0 - Welcome to a whole new world of WebGUI. After 2.5 years and 20,000 hours of development, WebGUI 7 is finally here. diff --git a/docs/upgrades/upgrade_7.0.0-7.0.1.pl b/docs/upgrades/upgrade_7.0.0-7.0.1.pl index 2e38d282e..f77575a81 100644 --- a/docs/upgrades/upgrade_7.0.0-7.0.1.pl +++ b/docs/upgrades/upgrade_7.0.0-7.0.1.pl @@ -22,9 +22,19 @@ my $session = start(); # this line required # upgrade functions go here i18nDepartmentNames(); +addMissingAssets(); finish($session); # this line required +#-------------------------------------------------- +sub addMissingAssets { + print "\tAdding assets to config file that weren't added before.\n" unless ($quiet); + my $config = $session->config; + $config->addToArray("assets","WebGUI::Asset::Wobject::TimeTracking"); + $config->addToArray("assets","WebGUI::Asset::Wobject::ProjectManager"); + $config->addToArray("assets","WebGUI::Asset::Wobject::EventManagementSystem"); +} + #-------------------------------------------------- sub i18nDepartmentNames { print "\tInternationalizing department settings in user profile\n" unless ($quiet); diff --git a/lib/WebGUI/Asset/Post.pm b/lib/WebGUI/Asset/Post.pm index 1f5d14e19..86700304f 100644 --- a/lib/WebGUI/Asset/Post.pm +++ b/lib/WebGUI/Asset/Post.pm @@ -695,6 +695,7 @@ sub postProcess { if ($self->getThread->getParent->get("addEditStampToPosts")) { $data{content} .= "

\n\n --- (".$i18n->get('Edited_on')." ".$self->session->datetime->epochToHuman(undef,"%z %Z [GMT%O]")." ".$i18n->get('By')." ".$user->profileField("alias").") --- \n

"; } + $data{title} = WebGUI::HTML::filter($self->get("title"), "all"); $data{url} = $self->fixUrl($self->getThread->get("url")."/1") if ($self->isReply && $self->isNew); $data{groupIdView} = $self->getThread->getParent->get("groupIdView"); $data{groupIdEdit} = $self->getThread->getParent->get("groupIdEdit"); diff --git a/lib/WebGUI/Asset/Wobject/Matrix.pm b/lib/WebGUI/Asset/Wobject/Matrix.pm index 3cc7340e1..c8e609f7f 100644 --- a/lib/WebGUI/Asset/Wobject/Matrix.pm +++ b/lib/WebGUI/Asset/Wobject/Matrix.pm @@ -707,13 +707,15 @@ sub www_editListingSave { usePreview => 1, sortOrder => 'desc', sortBy => 'dateUpdated', - notificationTemplateId =>'PBtmpl0000000000000027', - searchTemplateId =>'PBtmpl0000000000000031', - postFormTemplateId =>'PBtmpl0000000000000029', - threadTemplateId =>'PBtmpl0000000000000032', - collaborationTemplateId =>'PBtmpl0000000000000026', + rssTemplateId=>'PBtmpl0000000000000142', + notificationTemplateId=>'PBtmpl0000000000000027', + searchTemplateId=>'PBtmpl0000000000000031', + postFormTemplateId=>'PBtmpl0000000000000029', + threadTemplateId=>'PBtmpl0000000000000032', + collaborationTemplateId=>'PBtmpl0000000000000026', karmaPerPost =>0, karmaSpentToRate => 0, + approvalWorkflow=>"pbworkflow000000000003", karmaRatingMultiplier => 0, moderatePosts => 0, moderateGroupId => '4', @@ -1103,6 +1105,7 @@ sub www_viewDetail { $var{screenshot} = $storage->getUrl($listing->{filename}); $var{thumbnail} = $storage->getThumbnailUrl($listing->{filename}); } + $forum->prepareView; $var{"discussion"} = $forum->view; $var{'isLoggedIn'} = ($self->session->user->userId ne "1"); if ($self->session->form->process("do") eq "sendEmail" && $self->session->form->process("verify","captcha")) { diff --git a/lib/WebGUI/Operation/Profile.pm b/lib/WebGUI/Operation/Profile.pm index deda1780d..9d668249e 100644 --- a/lib/WebGUI/Operation/Profile.pm +++ b/lib/WebGUI/Operation/Profile.pm @@ -157,7 +157,7 @@ sub validateProfileData { } elsif ($field->getId eq "email" && isDuplicateEmail($session,$data{$field->getId})) { $warning .= '
  • '.$i18n->get(1072).'
  • '; } - if ($field->getId eq "language") { + if ($field->getId eq "language" && $fieldValue ne "") { unless (exists $i18n->getLanguages()->{$fieldValue}) { $error .= '
  • '.$field->getLabel.' '.$i18n->get(451).'
  • '; }