Standardise wording of verbs relating to revision deletion
[lhc/web/wiklou.git] / includes / EditPage.php
index ec9f6ba..12cd4b3 100644 (file)
@@ -972,7 +972,7 @@ class EditPage {
                                                $undoMsg = 'norev';
                                        }
 
-                                       // Give grep a chance to find the usages: undo-success, undo-failure, undo-norev
+                                       // Messages: undo-success, undo-failure, undo-norev
                                        $class = ( $undoMsg == 'success' ? '' : 'error ' ) . "mw-undo-{$undoMsg}";
                                        $this->editFormPageTop .= $wgOut->parse( "<div class=\"{$class}\">" .
                                                wfMessage( 'undo-' . $undoMsg )->plain() . '</div>', true, /* interface */true );
@@ -1493,7 +1493,7 @@ class EditPage {
                        wfProfileOut( __METHOD__ );
                        return $status;
                }
-               if ( $wgUser->pingLimiter() ) {
+               if ( $wgUser->pingLimiter() || $wgUser->pingLimiter( 'linkpurge', 0 ) ) {
                        $status->fatal( 'actionthrottledtext' );
                        $status->value = self::AS_RATE_LIMITED;
                        wfProfileOut( __METHOD__ . '-checks' );
@@ -1771,6 +1771,10 @@ class EditPage {
                }
 
                $result['nullEdit'] = $doEditStatus->hasMessage( 'edit-no-change' );
+               if ( $result['nullEdit'] ) {
+                       // We don't know if it was a null edit until now, so increment here
+                       $wgUser->pingLimiter( 'linkpurge' );
+               }
                $result['redirect'] = $content->isRedirect();
                $this->updateWatchlist();
                wfProfileOut( __METHOD__ );