r89491 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89490‎ | r89491 | r89492 >
Date:10:21, 5 June 2011
Author:nikerabbit
Status:deferred
Tags:
Comment:
And fixed few other errors in deletejob too
Modified paths:
  • /trunk/extensions/Translate/tag/DeleteJob.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/tag/DeleteJob.php
@@ -21,7 +21,7 @@
2222 $job = new self( $target );
2323 $job->setUser( $wgTranslateFuzzyBotName );
2424 $job->setFull( $full );
25 - $msg = $this->getFull() ? 'pt-deletepage-full-logreason' : 'pt-deletepage-lang-logreason';
 25+ $msg = $job->getFull() ? 'pt-deletepage-full-logreason' : 'pt-deletepage-lang-logreason';
2626 $job->setSummary( wfMsgForContent( 'pt-deletepage-logreason', $target->getPrefixedText() ) );
2727 $job->setPerformer( $performer );
2828 $job->lock();
@@ -131,34 +131,4 @@
132132 return User::newFromName( $this->params['user'], false );
133133 }
134134
135 - /**
136 - * Adapted from wfSuppressWarnings to allow not leaving redirects.
137 - */
138 - public static function forceRedirects( $end = false ) {
139 - static $suppressCount = 0;
140 - static $originalLevel = null;
141 -
142 - global $wgGroupPermissions;
143 - global $wgUser;
144 -
145 - if ( $end ) {
146 - if ( $suppressCount ) {
147 - --$suppressCount;
148 - if ( !$suppressCount ) {
149 - if ( $originalLevel === null ) {
150 - unset( $wgGroupPermissions['*']['suppressredirect'] );
151 - } else {
152 - $wgGroupPermissions['*']['suppressredirect'] = $originalLevel;
153 - }
154 - }
155 - }
156 - } else {
157 - if ( !$suppressCount ) {
158 - $originalLevel = isset( $wgGroupPermissions['*']['suppressredirect'] ) ? $wgGroupPermissions['*']['suppressredirect'] : null;
159 - $wgGroupPermissions['*']['suppressredirect'] = true;
160 - }
161 - ++$suppressCount;
162 - }
163 - $wgUser->clearInstanceCache();
164 - }
165135 }

Status & tagging log