* (bug 19900) The "listgrouprights-key" message is now wrapped in a div with
class "mw-listgrouprights-key"
* (bug 471) Allow RSS feeds for watchlist, using an opt-in security token
+* (bug 10812) Interwiki links can have names and descriptions, fetched from
+ message 'interwiki-desc-PREFIX', not really used anywhere yet though
=== Bug fixes in 1.16 ===
protected $mPrefix, $mURL, $mLocal, $mTrans;
- function __construct( $prefix = null, $url = '', $local = 0, $trans = 0 ) {
+ public function __construct( $prefix = null, $url = '', $local = 0, $trans = 0 ) {
$this->mPrefix = $prefix;
$this->mURL = $url;
$this->mLocal = $local;
* @param $title string What text to put for the article name
* @return string The URL
*/
- function getURL( $title = null ) {
+ public function getURL( $title = null ) {
$url = $this->mURL;
if( $title != null ) {
$url = str_replace( "$1", $title, $url );
return $url;
}
- function isLocal() {
+ /**
+ * Is this a local link from a sister project, or is
+ * it something outside, like Google
+ * @return bool
+ */
+ public function isLocal() {
return $this->mLocal;
}
- function isTranscludable() {
+ /**
+ * Can pages from this wiki be transcluded?
+ * Still requires $wgEnableScaryTransclusion
+ * @return bool
+ */
+ public function isTranscludable() {
return $this->mTrans;
}
+ /**
+ * Get the name for the interwiki site
+ * @return String
+ */
+ public function getName() {
+ $key = 'interwiki-name-' . $this->mPrefix;
+ $msg = wfMsgForContent( $key );
+ return wfEmptyMsg( $key, $msg ) ? '' : $msg;
+ }
+
+ /**
+ * Get a description for this interwiki
+ * @return String
+ */
+ public function getDescription() {
+ $key = 'interwiki-desc-' . $this->mPrefix;
+ $msg = wfMsgForContent( $key );
+ return wfEmptyMsg( $key, $msg ) ? '' : $msg;
+ }
}