Index: trunk/extensions/Translate/tag/DeleteJob.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | $job = new self( $target ); |
23 | 23 | $job->setUser( $wgTranslateFuzzyBotName ); |
24 | 24 | $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'; |
26 | 26 | $job->setSummary( wfMsgForContent( 'pt-deletepage-logreason', $target->getPrefixedText() ) ); |
27 | 27 | $job->setPerformer( $performer ); |
28 | 28 | $job->lock(); |
— | — | @@ -131,34 +131,4 @@ |
132 | 132 | return User::newFromName( $this->params['user'], false ); |
133 | 133 | } |
134 | 134 | |
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 | | - } |
165 | 135 | } |