r71049 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71048‎ | r71049 | r71050 >
Date:21:06, 13 August 2010
Author:peter17
Status:ok
Tags:
Comment:
Register Special:GlobalTemplateUsage; add authors names; improve Title->getInternalURL
Modified paths:
  • /branches/iwtransclusion/phase3/includes/DefaultSettings.php (modified) (history)
  • /branches/iwtransclusion/phase3/includes/Title.php (modified) (history)
  • /branches/iwtransclusion/phase3/includes/parser/Parser.php (modified) (history)
  • /branches/iwtransclusion/phase3/includes/specials/SpecialGlobalTemplateUsage.php (modified) (history)

Diff [purge]

Index: branches/iwtransclusion/phase3/includes/parser/Parser.php
@@ -3173,7 +3173,6 @@
31743174 $found = true;
31753175 }
31763176 } elseif ( $wgEnableInterwikiTranscluding && $title->isTrans() ) {
3177 - // TODO: Work by Peter17 in progress
31783177
31793178 $text = Interwiki::interwikiTransclude( $title );
31803179
Index: branches/iwtransclusion/phase3/includes/Title.php
@@ -1016,8 +1016,14 @@
10171017 * @return \type{\string} the URL
10181018 */
10191019 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 );
10221028 wfRunHooks( 'GetInternalURL', array( &$this, &$url, $query ) );
10231029 return $url;
10241030 }
Index: branches/iwtransclusion/phase3/includes/DefaultSettings.php
@@ -4759,6 +4759,7 @@
47604760 'Export' => 'pagetools',
47614761 'Import' => 'pagetools',
47624762 'Whatlinkshere' => 'pagetools',
 4763+ 'GlobalTemplateUsage' => 'pagetools',
47634764
47644765 'Statistics' => 'wiki',
47654766 'Version' => 'wiki',
Index: branches/iwtransclusion/phase3/includes/specials/SpecialGlobalTemplateUsage.php
@@ -4,11 +4,14 @@
55 * to show the usage of a template instead of a file.
66 * Special page to show global template usage. Also contains hook functions for
77 * showing usage on an template page.
 8+ *
 9+ * @author Bryan Tong Minh <bryan.tongminh@gmail.com>
 10+ * @author Peter Potrowl <peter017@gmail.com>
811 */
912
1013 class SpecialGlobalTemplateUsage extends SpecialPage {
1114 public function __construct() {
12 - parent::__construct( 'GlobalTemplateUsage', 'globaltemplateusage' );
 15+ parent::__construct( 'GlobalTemplateUsage' );
1316 }
1417
1518 /**
@@ -206,6 +209,9 @@
207210 * This class has been copied from Extension:GlobalUsage / GlobalUsageQuery.php
208211 * Extension:GlobalUsage should be built-in and the GlobalUsageQuery adapted
209212 * 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>
210216 */
211217 class GlobalTemplateUsageQuery {
212218 private $limit = 50;

Follow-up revisions

RevisionCommit summaryAuthorDate
r87111Merge r70966, r71049reedy00:54, 29 April 2011
r92996Merge r87111, which is a merge of r70966, r71049...reedy18:31, 24 July 2011

Status & tagging log