Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 3.372 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
44 | 1 | public function newWikiPage( Title $title ) { |
|
45 | |||
46 | // #55 |
||
47 | // Fight a possible DB corruption and avoid "NS_MEDIA is a virtual namespace; use NS_FILE" |
||
48 | 1 | if ( $title->getNamespace() === NS_MEDIA ) { |
|
49 | $title = Title::makeTitleSafe( |
||
50 | NS_FILE, |
||
51 | $title->getDBkey(), |
||
52 | $title->getInterwiki(), |
||
53 | $title->getFragment() |
||
54 | ); |
||
55 | } |
||
56 | |||
57 | 1 | return \WikiPage::factory( $title ); |
|
58 | } |
||
59 | |||
99 |