Index: trunk/extensions/ApprovedRevs/ApprovedRevs_body.php |
— | — | @@ -204,4 +204,11 @@ |
205 | 205 | $wgOut->addLink( $link ); |
206 | 206 | } |
207 | 207 | |
| 208 | + public static function loadMessages() { |
| 209 | + // for backwards compatibility |
| 210 | + if ( version_compare( $wgVersion, '1.16', '<' ) ) { |
| 211 | + wfLoadExtensionMessages( 'ApprovedRevs' ); |
| 212 | + } |
| 213 | + } |
| 214 | + |
208 | 215 | } |
Index: trunk/extensions/ApprovedRevs/SpecialApprovedRevs.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | */ |
17 | 17 | function __construct() { |
18 | 18 | parent::__construct( 'ApprovedRevs' ); |
19 | | - wfLoadExtensionMessages( 'ApprovedRevs' ); |
| 19 | + ApprovedRevs::loadMessages(); |
20 | 20 | } |
21 | 21 | |
22 | 22 | function execute( $query ) { |
Index: trunk/extensions/ApprovedRevs/ApprovedRevs.hooks.php |
— | — | @@ -186,7 +186,7 @@ |
187 | 187 | } |
188 | 188 | |
189 | 189 | ApprovedRevs::addCSS(); |
190 | | - wfLoadExtensionMessages( 'ApprovedRevs' ); |
| 190 | + ApprovedRevs::loadMessages(); |
191 | 191 | if ( $revisionID == $article->getLatest() ) { |
192 | 192 | $text = Xml::element( |
193 | 193 | 'span', |
— | — | @@ -236,7 +236,7 @@ |
237 | 237 | $latestRevID = $title->getLatestRevID(); |
238 | 238 | if ( ! empty( $approvedRevID ) && $approvedRevID != $latestRevID ) { |
239 | 239 | ApprovedRevs::addCSS(); |
240 | | - wfLoadExtensionMessages( 'ApprovedRevs' ); |
| 240 | + ApprovedRevs::loadMessages(); |
241 | 241 | global $wgOut; |
242 | 242 | $wgOut->addHTML( '<p class="approvedRevsEditWarning">' . wfMsg( 'approvedrevs-editwarning' ) . "</p>\n" ); |
243 | 243 | } |
— | — | @@ -256,6 +256,7 @@ |
257 | 257 | $latestRevID = $wgTitle->getLatestRevID(); |
258 | 258 | if ( ! empty( $approvedRevID ) && $approvedRevID != $latestRevID ) { |
259 | 259 | ApprovedRevs::addCSS(); |
| 260 | + ApprovedRevs::loadMessages(); |
260 | 261 | $preFormHTML .= '<p><strong>' . wfMsg( 'approvedrevs-editwarning' ) . "</strong></p>\n"; |
261 | 262 | } |
262 | 263 | return true; |
— | — | @@ -315,7 +316,7 @@ |
316 | 317 | $approvedRevID = ApprovedRevs::getApprovedRevID( $article->getTitle() ); |
317 | 318 | $article->approvedRevID = $approvedRevID; |
318 | 319 | // also load extension messages, while we're at it |
319 | | - wfLoadExtensionMessages( 'ApprovedRevs' ); |
| 320 | + ApprovedRevs::loadMessages(); |
320 | 321 | return true; |
321 | 322 | } |
322 | 323 | |