Index: branches/iwtransclusion/phase3/includes/parser/Parser.php |
— | — | @@ -3173,7 +3173,6 @@ |
3174 | 3174 | $found = true; |
3175 | 3175 | } |
3176 | 3176 | } elseif ( $wgEnableInterwikiTranscluding && $title->isTrans() ) { |
3177 | | - // TODO: Work by Peter17 in progress |
3178 | 3177 | |
3179 | 3178 | $text = Interwiki::interwikiTransclude( $title ); |
3180 | 3179 | |
Index: branches/iwtransclusion/phase3/includes/Title.php |
— | — | @@ -1016,8 +1016,14 @@ |
1017 | 1017 | * @return \type{\string} the URL |
1018 | 1018 | */ |
1019 | 1019 | public function getInternalURL( $query = '', $variant = false ) { |
1020 | | - global $wgInternalServer; |
1021 | | - $url = $wgInternalServer . $this->getLocalURL( $query, $variant ); |
| 1020 | + if ( $this->isExternal( ) ) { |
| 1021 | + $server = ''; |
| 1022 | + } else { |
| 1023 | + global $wgInternalServer; |
| 1024 | + $server = $wgInternalServer; |
| 1025 | + } |
| 1026 | + |
| 1027 | + $url = $server . $this->getLocalURL( $query, $variant ); |
1022 | 1028 | wfRunHooks( 'GetInternalURL', array( &$this, &$url, $query ) ); |
1023 | 1029 | return $url; |
1024 | 1030 | } |
Index: branches/iwtransclusion/phase3/includes/DefaultSettings.php |
— | — | @@ -4759,6 +4759,7 @@ |
4760 | 4760 | 'Export' => 'pagetools', |
4761 | 4761 | 'Import' => 'pagetools', |
4762 | 4762 | 'Whatlinkshere' => 'pagetools', |
| 4763 | + 'GlobalTemplateUsage' => 'pagetools', |
4763 | 4764 | |
4764 | 4765 | 'Statistics' => 'wiki', |
4765 | 4766 | 'Version' => 'wiki', |
Index: branches/iwtransclusion/phase3/includes/specials/SpecialGlobalTemplateUsage.php |
— | — | @@ -4,11 +4,14 @@ |
5 | 5 | * to show the usage of a template instead of a file. |
6 | 6 | * Special page to show global template usage. Also contains hook functions for |
7 | 7 | * showing usage on an template page. |
| 8 | + * |
| 9 | + * @author Bryan Tong Minh <bryan.tongminh@gmail.com> |
| 10 | + * @author Peter Potrowl <peter017@gmail.com> |
8 | 11 | */ |
9 | 12 | |
10 | 13 | class SpecialGlobalTemplateUsage extends SpecialPage { |
11 | 14 | public function __construct() { |
12 | | - parent::__construct( 'GlobalTemplateUsage', 'globaltemplateusage' ); |
| 15 | + parent::__construct( 'GlobalTemplateUsage' ); |
13 | 16 | } |
14 | 17 | |
15 | 18 | /** |
— | — | @@ -206,6 +209,9 @@ |
207 | 210 | * This class has been copied from Extension:GlobalUsage / GlobalUsageQuery.php |
208 | 211 | * Extension:GlobalUsage should be built-in and the GlobalUsageQuery adapted |
209 | 212 | * to be able to fetch the global usage of templates as well as files. |
| 213 | + * |
| 214 | + * @author Bryan Tong Minh <bryan.tongminh@gmail.com> |
| 215 | + * @author Peter Potrowl <peter017@gmail.com> |
210 | 216 | */ |
211 | 217 | class GlobalTemplateUsageQuery { |
212 | 218 | private $limit = 50; |