Index: trunk/extensions/TitleBlacklist/tests/ApiQueryTitleBlacklistTest.php |
— | — | @@ -45,9 +45,9 @@ |
46 | 46 | 'tbaction' => 'create', |
47 | 47 | ) ); |
48 | 48 | |
49 | | - $this->assertEquals( $listed[0]['titleblacklist']['result'], 'error', 'Listed title returns error'); |
| 49 | + $this->assertEquals( $listed[0]['titleblacklist']['result'], 'blacklisted', 'Listed title returns error'); |
50 | 50 | $this->assertEquals( |
51 | | - $listed[0]['titleblacklist']['error'], |
| 51 | + $listed[0]['titleblacklist']['reason'], |
52 | 52 | "The title \"bar\" has been banned from creation.\nIt matches the following blacklist entry: <code>[Bb]ar #example blacklist entry</code>", |
53 | 53 | 'Listed title error text is as as expected' |
54 | 54 | ); |
Index: trunk/extensions/TitleBlacklist/api/ApiQueryTitleBlacklist.php |
— | — | @@ -65,8 +65,8 @@ |
66 | 66 | htmlspecialchars( $params['title'] ), |
67 | 67 | ); |
68 | 68 | |
69 | | - $this->getResult()->addValue( 'titleblacklist', 'result', 'error' ); |
70 | | - $this->getResult()->addValue( 'titleblacklist', 'error', wfMsg($blacklisted->getErrorMessage('edit'), $result) ); |
| 69 | + $this->getResult()->addValue( 'titleblacklist', 'result', 'blacklisted' ); |
| 70 | + $this->getResult()->addValue( 'titleblacklist', 'reason', wfMsg($blacklisted->getErrorMessage('edit'), $result) ); |
71 | 71 | } else { |
72 | 72 | // not blacklisted |
73 | 73 | $this->getResult()->addValue( 'titleblacklist', 'result', 'ok' ); |