From: addshore Date: Tue, 26 Jan 2016 20:24:27 +0000 (+0100) Subject: Add LinkTarget interface X-Git-Tag: 1.31.0-rc.0~8101^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=1c63abcda32a91f75f066225df7fd929726caded;p=lhc%2Fweb%2Fwiklou.git Add LinkTarget interface To be used by things that do not care if they are passed a Title or TitleValue so long as it has a dbkey, namespace, possible fragment and text Example uses include: LinkBatch::addObj MediaWikiPageLinkRenderer methods MediaWikiTitleCodec methods PageLinkRenderer methods TitleFormatter methods Change-Id: I2aa1a82129bb01155924a8e6a403c7a47391432f --- diff --git a/autoload.php b/autoload.php index 24a4d72c82..11dc7e1c14 100644 --- a/autoload.php +++ b/autoload.php @@ -560,6 +560,7 @@ $wgAutoloadLocalClasses = array( 'IPSet' => __DIR__ . '/includes/compat/IPSetCompat.php', 'IPTC' => __DIR__ . '/includes/media/IPTC.php', 'IRCColourfulRCFeedFormatter' => __DIR__ . '/includes/rcfeed/IRCColourfulRCFeedFormatter.php', + 'LinkTarget' => __DIR__ . '/includes/LinkTarget.php', 'IcuCollation' => __DIR__ . '/includes/Collation.php', 'IdentityCollation' => __DIR__ . '/includes/Collation.php', 'ImageBuilder' => __DIR__ . '/maintenance/rebuildImages.php', diff --git a/includes/LinkTarget.php b/includes/LinkTarget.php new file mode 100644 index 0000000000..1ce5f32339 --- /dev/null +++ b/includes/LinkTarget.php @@ -0,0 +1,41 @@ +