@@ 612-619 (lines=8) @@ | ||
609 | * @return string |
|
610 | */ |
|
611 | protected function makePageLink( Title $title = null, $parameters = [], $html = null ) { |
|
612 | if ( !$this->plaintext ) { |
|
613 | $link = Linker::link( $title, $html, [], $parameters ); |
|
614 | } else { |
|
615 | if ( !$title instanceof Title ) { |
|
616 | throw new MWException( "Expected title, got null" ); |
|
617 | } |
|
618 | $link = '[[' . $title->getPrefixedText() . ']]'; |
|
619 | } |
|
620 | ||
621 | return $link; |
|
622 | } |
@@ 1406-1414 (lines=9) @@ | ||
1403 | $this->mQueryFlags |= self::READ_LATEST; |
|
1404 | ||
1405 | // Not allowed to have rev_page equal to 0, false, etc. |
|
1406 | if ( !$this->mPage ) { |
|
1407 | $title = $this->getTitle(); |
|
1408 | if ( $title instanceof Title ) { |
|
1409 | $titleText = ' for page ' . $title->getPrefixedText(); |
|
1410 | } else { |
|
1411 | $titleText = ''; |
|
1412 | } |
|
1413 | throw new MWException( "Cannot insert revision$titleText: page ID must be nonzero" ); |
|
1414 | } |
|
1415 | ||
1416 | $this->checkContentModel(); |
|
1417 |