Merge "Move Linker::getLinkColour() into LinkRenderer"
[lhc/web/wiklou.git] / includes / Linker.php
index 424c18d..1979e44 100644 (file)
@@ -1749,8 +1749,6 @@ class Linker {
         *
         * If the option noBrackets is set the rollback link wont be enclosed in "[]".
         *
-        * See the "mediawiki.page.rollback" module for the client-side handling of this link.
-        *
         * @since 1.16.3. $context added in 1.20. $options added in 1.21
         *
         * @param Revision $rev
@@ -1779,8 +1777,6 @@ class Linker {
                        $inner = $context->msg( 'brackets' )->rawParams( $inner )->escaped();
                }
 
-               $context->getOutput()->addModules( 'mediawiki.page.rollback' );
-
                return '<span class="mw-rollback-link">' . $inner . '</span>';
        }
 
@@ -1875,6 +1871,7 @@ class Linker {
                $query = [
                        'action' => 'rollback',
                        'from' => $rev->getUserText(),
+                       'token' => $context->getUser()->getEditToken( 'rollback' ),
                ];
                $attrs = [
                        'data-mw' => 'interface',