Merge "Make DBAccessBase use DBConnRef, rename $wiki, and hide getLoadBalancer()"
[lhc/web/wiklou.git] / includes / specials / SpecialEditTags.php
index ed398de..70a1bd4 100644 (file)
@@ -227,6 +227,9 @@ class SpecialEditTags extends UnlistedSpecialPage {
                $list = $this->getList();
                for ( $list->reset(); $list->current(); $list->next() ) {
                        $item = $list->current();
+                       if ( !$item->canView() ) {
+                               throw new ErrorPageError( 'permissionserrors', 'tags-update-no-permission' );
+                       }
                        $numRevisions++;
                        $out->addHTML( $item->getHTML() );
                }
@@ -258,8 +261,7 @@ class SpecialEditTags extends UnlistedSpecialPage {
                                                        // HTML maxlength uses "UTF-16 code units", which means that characters outside BMP
                                                        // (e.g. emojis) count for two each. This limit is overridden in JS to instead count
                                                        // Unicode codepoints.
-                                                       // "- 155" is to leave room for the auto-generated part of the log entry.
-                                                       'maxlength' => CommentStore::COMMENT_CHARACTER_LIMIT - 155,
+                                                       'maxlength' => CommentStore::COMMENT_CHARACTER_LIMIT,
                                                ] ) .
                                        '</td>' .
                                "</tr><tr>\n" .