Give a more accurate error message if you are an administrator but the 
community is not on
         moderated posting, and you try to access /community/moderate.

        Patch by yvi. 

diffs (32 lines):

diff -r 4920af67513f -r 608a0d60ee6a htdocs/community/moderate.bml
--- a/htdocs/community/moderate.bml     Mon May 10 06:16:16 2010 +0000
+++ b/htdocs/community/moderate.bml     Mon May 10 07:11:39 2010 +0000
@@ -216,9 +216,13 @@ body<=
 
     my $dbcr = LJ::get_cluster_def_reader($c);
 
-    unless (LJ::check_rel($c, $remote, 'M')) {
-        $ret .= "<?h1 $ML{'Error'} h1?><?p " .
-            BML::ml('.error.noaccess', {'comm'=>"<?ljcomm $comm ljcomm?>"}) . 
" p?>";
+    unless ( LJ::check_rel( $c, $remote, 'M' ) ) {
+        $ret .= "<?h1 $ML{'Error'} h1?>";
+        if ( $c->has_moderated_posting ) {
+            $ret .= "<?p " . BML::ml( '.error.noaccess', { comm => 
$c->ljuser_display } ) . " p?>";
+        } else {
+            $ret .= "<?p " . BML::ml( '.error.notmoderated' ) . " p?>";
+        }
         return $ret;
     }
 
diff -r 4920af67513f -r 608a0d60ee6a htdocs/community/moderate.bml.text
--- a/htdocs/community/moderate.bml.text        Mon May 10 06:16:16 2010 +0000
+++ b/htdocs/community/moderate.bml.text        Mon May 10 07:11:39 2010 +0000
@@ -38,6 +38,8 @@
 .error.nolist=You do not moderate any communities.
 
 .error.notfound=Community account not found.
+
+.error.notmoderated=This community is not set to moderated posting.
 
 .manage=Manage communities
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to