| @@ 1125-1133 (lines=9) @@ | ||
| 1122 | * @param string $urlaction |
|
| 1123 | * @return array |
|
| 1124 | */ |
|
| 1125 | static function makeUrlDetails( $name, $urlaction = '' ) { |
|
| 1126 | $title = Title::newFromText( $name ); |
|
| 1127 | self::checkTitle( $title, $name ); |
|
| 1128 | ||
| 1129 | return [ |
|
| 1130 | 'href' => $title->getLocalURL( $urlaction ), |
|
| 1131 | 'exists' => $title->isKnown(), |
|
| 1132 | ]; |
|
| 1133 | } |
|
| 1134 | ||
| 1135 | /** |
|
| 1136 | * Make URL details where the article exists (or at least it's convenient to think so) |
|
| @@ 1141-1149 (lines=9) @@ | ||
| 1138 | * @param string $urlaction |
|
| 1139 | * @return array |
|
| 1140 | */ |
|
| 1141 | static function makeKnownUrlDetails( $name, $urlaction = '' ) { |
|
| 1142 | $title = Title::newFromText( $name ); |
|
| 1143 | self::checkTitle( $title, $name ); |
|
| 1144 | ||
| 1145 | return [ |
|
| 1146 | 'href' => $title->getLocalURL( $urlaction ), |
|
| 1147 | 'exists' => true |
|
| 1148 | ]; |
|
| 1149 | } |
|
| 1150 | ||
| 1151 | /** |
|
| 1152 | * make sure we have some title to operate on |
|
| @@ 797-805 (lines=9) @@ | ||
| 794 | /** |
|
| 795 | * @todo is this even used? |
|
| 796 | */ |
|
| 797 | function makeArticleUrlDetails( $name, $urlaction = '' ) { |
|
| 798 | $title = Title::newFromText( $name ); |
|
| 799 | $title = $title->getSubjectPage(); |
|
| 800 | self::checkTitle( $title, $name ); |
|
| 801 | return [ |
|
| 802 | 'href' => $title->getLocalURL( $urlaction ), |
|
| 803 | 'exists' => $title->exists(), |
|
| 804 | ]; |
|
| 805 | } |
|
| 806 | ||
| 807 | /** |
|
| 808 | * a structured array of links usually used for the tabs in a skin |
|