Skip to content

Commit dbd3f3b

Browse files
authored
Merge pull request #5 from Wikia/REL1_39
PLATFORM-7870 | remove deprecated code for MW1.39
2 parents 2b2b66a + fd51daf commit dbd3f3b

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

classes/PvXCode.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ class PvXCode {
2424
public static function parserRender( string $input, array $args, Parser $parser, string $frame ) {
2525
$parser->getOutput()->addModuleStyles( 'ext.PvXCode.css' );
2626
$parser->getOutput()->addModules( 'ext.PvXCode.js' );
27-
$title = $parser->getTitle()->getText();
27+
$title = TitleValue::newFromPage( $parser->getPage() );
28+
$text = $title->getText();
2829

2930
// Using recursiveTagParse() instead of parse() to avoid wrapping result
3031
// in a div and the associated processing time hidden HTML comment
3132
$parsed_input = $parser->recursiveTagParse( $input, $frame = false );
3233

33-
return parseGwbbcode( $parsed_input, $title );
34+
return parseGwbbcode( $parsed_input, $text );
3435
}
3536
}

gwbbcode/gwbbcode.inc.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,13 +1557,13 @@ function add_strength( $desc, &$extra_desc, $attr_list, $type ) {
15571557
if ( isset( $attr_list['Strength'] ) && $attr_list['Strength'] > 0 && strpos( $type, 'Attack' ) !== false ) {
15581558
// Strength does not stack with skills with inherent armor penetration
15591559
if ( preg_match( '@[Tt]his (attack|axe attack) has ([0-9]+)% armor penetration@', $desc, $reg ) ) {
1560-
if ( $reg[2] < $strength ) {
1560+
if ( $reg[2] < $attr_list['Strength'] ) {
15611561
$extra_desc =
1562-
'This attack skill has <b>' . $strength .
1562+
'This attack skill has <b>' . $attr_list['Strength'] .
15631563
'</b>% armor penetration. Its inherent armor penetration is overwritten.';
15641564
}
15651565
} else {
1566-
$extra_desc = 'This attack skill has <b>' . $strength . '</b>% armor penetration.';
1566+
$extra_desc = 'This attack skill has <b>' . $attr_list['Strength'] . '</b>% armor penetration.';
15671567
}
15681568
}
15691569
}

specials/SpecialPvXDecode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
34
/**
45
* Curse Inc.
56
* PvX Code
@@ -22,7 +23,6 @@ class SpecialPvXDecode extends SpecialPage {
2223
*/
2324
public function __construct() {
2425
parent::__construct( 'PvXDecode' );
25-
$this->DB = wfGetDB( DB_PRIMARY );
2626

2727
require_once( GWBBCODE_ROOT . '/gwbbcode.inc.php' );
2828
}
@@ -84,4 +84,4 @@ protected function getGroupName(): string {
8484
// Change to display in a different category on Special:SpecialPages.
8585
return 'pvx';
8686
}
87-
}
87+
}

0 commit comments

Comments
 (0)