Update the success message when posting a screened comment to be
context sensitive: don't say "you and the journal's owner" if you are the
journal's owner, etc.
Patch by denise.
diffs (50 lines):
diff -r d410ae775812 -r 5bccd5c09d4f htdocs/talkpost_do.bml
--- a/htdocs/talkpost_do.bml Tue Jun 22 16:01:33 2010 -0500
+++ b/htdocs/talkpost_do.bml Tue Jun 22 16:35:10 2010 -0500
@@ -235,12 +235,23 @@ body<=
$mlcode = '.success.message2';
} else {
# otherwise, it's a screened comment.
- if ($journalu->{'journaltype'} eq 'C') {
- $mlcode = $POST{'usertype'} eq 'anonymous' ?
'.success.screened.comm.anon2'
- :
'.success.screened.comm2';
- } else {
- $mlcode = $POST{'usertype'} eq 'anonymous' ?
'.success.screened.user.anon2'
- :
'.success.screened.user2';
+ my $commentu = $init ? $init->{comment}->{u} : undef;
+ if ( $journalu && $journalu->is_community ) {
+ if ( $POST{'usertype'} eq 'anonymous' ) {
+ $mlcode = 'success.screened.comm.anon2';
+ } elsif ( $commentu && $commentu->can_manage( $journalu ) ) {
+ $mlcode = '.success.screened.comm.owncomm';
+ } else {
+ $mlcode = '.success.screened.comm2';
+ }
+ } else { # not a community
+ if ( $POST{'usertype'} eq 'anonymous' ) {
+ $mlcode = '.success.screened.user.anon2';
+ } elsif ( $commentu && $commentu->equals( $journalu ) ) {
+ $mlcode = '.success.screened.user.ownjournal';
+ } else {
+ $mlcode = '.success.screened.user2';
+ }
}
}
diff -r d410ae775812 -r 5bccd5c09d4f htdocs/talkpost_do.bml.text
--- a/htdocs/talkpost_do.bml.text Tue Jun 22 16:01:33 2010 -0500
+++ b/htdocs/talkpost_do.bml.text Tue Jun 22 16:35:10 2010 -0500
@@ -76,9 +76,13 @@
.success.screened.comm2=Your comment has been added. According to this
community's settings, it was marked as screened, and will be visible only to
you and the community maintainers until they choose to unscreen it. You can
view your comment <a [[aopts]]>here</a>.
+.success.screened.comm.owncomm=Your comment has been added. According to this
community's settings, it was marked as screened, and will be visible only to
you and any other community admins until one of you chooses to unscreen it. You
can view your comment <a [[aopts]]>here</a>.
+
.success.screened.user.anon2=Your anonymous comment has been added. According
to this journal's settings, it was marked as screened, and will be visible only
to the journal's owner until the owner chooses to unscreen it. You can go back
to the comment thread <a [[aopts]]>here</a>.
.success.screened.user2=Your comment has been added. According to this
journal's settings, it was marked as screened, and will be visible only to you
and the journal's owner until the owner chooses to unscreen it. You can view
your comment <a [[aopts]]>here</a>.
+
+.success.screened.user.ownjournal=Your comment has been added. According to
this journal's settings, it was marked as screened, and will be visible only to
you until you choose to unscreen it. You can view your comment <a
[[aopts]]>here</a>.
.success.title=Success
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog