[Codestriker-commits] CVS update: codestriker/template/en/default submitnewtopic.html.tmpl
Brought to you by:
sits
From: <si...@us...> - 2006-01-16 10:49:37
|
Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=6120417&action=view User: sits Date: 06/01/16 02:49:24 Modified: . CHANGELOG lib/Codestriker/Action SubmitNewTopic.pm lib/Codestriker/TopicListeners Email.pm template/en/default submitnewtopic.html.tmpl Log: * If there is an email problem while creating a topic, the error message is now correctly displayed to the end-user. Index: CHANGELOG =================================================================== RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v retrieving revision 1.181 retrieving revision 1.182 diff -u -r1.181 -r1.182 --- CHANGELOG 16 Jan 2006 10:37:45 -0000 1.181 +++ CHANGELOG 16 Jan 2006 10:49:20 -0000 1.182 @@ -20,6 +20,9 @@ will correctly display in the AJAX'ed window. An example here is if $mailhost is incorrectly configured. +* If there is an email problem while creating a topic, the error + message is now correctly displayed to the end-user. + * Fixed problem with Subversion repositories on Win32, where Codestriker was unable to launch the svn program. Index: SubmitNewTopic.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Action/SubmitNewTopic.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- SubmitNewTopic.pm 16 Jan 2006 09:51:12 -0000 1.22 +++ SubmitNewTopic.pm 16 Jan 2006 10:49:23 -0000 1.23 @@ -322,7 +322,7 @@ # Tell all of the topic listener classes that a topic has # just been created. - Codestriker::TopicListeners::Manager::topic_create($topic); + $feedback = Codestriker::TopicListeners::Manager::topic_create($topic); # Obtain a URL builder object and determine the URL to the topic. my $topic_url = $url_builder->view_url_extended($topicid, -1, "", "", "", @@ -336,6 +336,7 @@ $vars->{'topic_url'} = $topic_url; $vars->{'reviewers'} = $reviewers; $vars->{'cc'} = (defined $cc) ? $cc : ""; + $vars->{'feedback'} = $feedback; my $template = Codestriker::Http::Template->new("submitnewtopic"); $template->process($vars); Index: Email.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/TopicListeners/Email.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- Email.pm 16 Jan 2006 10:37:46 -0000 1.16 +++ Email.pm 16 Jan 2006 10:49:23 -0000 1.17 @@ -294,8 +294,8 @@ my $cc = ""; # Send off the email to the revelant parties. - $self->_send_topic_email($topic, 0,$change_event_name , 1, $from, - $to, $cc, $bcc,$changes); + return $self->_send_topic_email($topic, 0, $change_event_name , 1, + $from, $to, $cc, $bcc, $changes); } } @@ -425,7 +425,8 @@ $notes; # Send the email notification out. - $self->doit($new, $topic->{topicid}, $from, $to, $cc, $bcc, $subject, $body); + return $self->doit($new, $topic->{topicid}, $from, $to, $cc, $bcc, + $subject, $body); } # Send an email with the specified data. Return a non-empty message if the Index: submitnewtopic.html.tmpl =================================================================== RCS file: /cvsroot/codestriker/codestriker/template/en/default/submitnewtopic.html.tmpl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- submitnewtopic.html.tmpl 21 Feb 2005 11:25:31 -0000 1.5 +++ submitnewtopic.html.tmpl 16 Jan 2006 10:49:24 -0000 1.6 @@ -3,6 +3,12 @@ [% PROCESS header.html.tmpl version = version displaymenu = 1 closehead = 1 help="" %] +[%# Display any "feedback" to the user if necessary. #%] +[% IF feedback != '' %] + <font color="red">[% feedback %]</font> + <p> +[% END %] + <H2>Topic created</H2> Topic title: [% topic_title | html_entity %]<BR> Author: [% email | html_entity %]<BR> |