"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "includes/interwiki/Interwiki.php" between
mediawiki-1.31.1.tar.gz and mediawiki-1.32.0.tar.gz

About: MediaWiki is a wiki engine (the collaborative editing software that runs for e.g. Wikipedia, the free encyclopedia).

Interwiki.php  (mediawiki-1.31.1):Interwiki.php  (mediawiki-1.32.0)
skipping to change at line 39 skipping to change at line 39
/** @var string The interwiki prefix, (e.g. "Meatball", or the language p refix "de") */ /** @var string The interwiki prefix, (e.g. "Meatball", or the language p refix "de") */
protected $mPrefix; protected $mPrefix;
/** @var string The URL of the wiki, with "$1" as a placeholder for an ar ticle name. */ /** @var string The URL of the wiki, with "$1" as a placeholder for an ar ticle name. */
protected $mURL; protected $mURL;
/** @var string The URL of the file api.php */ /** @var string The URL of the file api.php */
protected $mAPI; protected $mAPI;
/** @var string The name of the database (for a connection to be establis hed /** @var string The name of the database (for a connection to be establis hed
* with wfGetLB( 'wikiid' )) * with LBFactory::getMainLB( 'wikiid' ))
*/ */
protected $mWikiID; protected $mWikiID;
/** @var bool Whether the wiki is in this project */ /** @var bool Whether the wiki is in this project */
protected $mLocal; protected $mLocal;
/** @var bool Whether interwiki transclusions are allowed */ /** @var bool Whether interwiki transclusions are allowed */
protected $mTrans; protected $mTrans;
public function __construct( $prefix = null, $url = '', $api = '', $wikiI d = '', $local = 0, public function __construct( $prefix = null, $url = '', $api = '', $wikiI d = '', $local = 0,
skipping to change at line 69 skipping to change at line 69
/** /**
* Check whether an interwiki prefix exists * Check whether an interwiki prefix exists
* *
* @deprecated since 1.28, use InterwikiLookup instead * @deprecated since 1.28, use InterwikiLookup instead
* *
* @param string $prefix Interwiki prefix to use * @param string $prefix Interwiki prefix to use
* @return bool Whether it exists * @return bool Whether it exists
*/ */
public static function isValidInterwiki( $prefix ) { public static function isValidInterwiki( $prefix ) {
wfDeprecated( __METHOD__, '1.28' );
return MediaWikiServices::getInstance()->getInterwikiLookup()->is ValidInterwiki( $prefix ); return MediaWikiServices::getInstance()->getInterwikiLookup()->is ValidInterwiki( $prefix );
} }
/** /**
* Fetch an Interwiki object * Fetch an Interwiki object
* *
* @deprecated since 1.28, use InterwikiLookup instead * @deprecated since 1.28, use InterwikiLookup instead
* *
* @param string $prefix Interwiki prefix to use * @param string $prefix Interwiki prefix to use
* @return Interwiki|null|bool * @return Interwiki|null|bool
*/ */
public static function fetch( $prefix ) { public static function fetch( $prefix ) {
wfDeprecated( __METHOD__, '1.28' );
return MediaWikiServices::getInstance()->getInterwikiLookup()->fe tch( $prefix ); return MediaWikiServices::getInstance()->getInterwikiLookup()->fe tch( $prefix );
} }
/** /**
* Purge the cache (local and persistent) for an interwiki prefix. * Purge the cache (local and persistent) for an interwiki prefix.
* *
* @param string $prefix * @param string $prefix
* @since 1.26 * @since 1.26
*/ */
public static function invalidateCache( $prefix ) { public static function invalidateCache( $prefix ) {
wfDeprecated( __METHOD__, '1.28' );
MediaWikiServices::getInstance()->getInterwikiLookup()->invalidat eCache( $prefix ); MediaWikiServices::getInstance()->getInterwikiLookup()->invalidat eCache( $prefix );
} }
/** /**
* Returns all interwiki prefix definitions. * Returns all interwiki prefix definitions.
* *
* @deprecated since 1.28, unused. Use InterwikiLookup instead. * @deprecated since 1.28, unused. Use InterwikiLookup instead.
* *
* @param string|null $local If set, limits output to local/non-local int erwikis * @param string|null $local If set, limits output to local/non-local int erwikis
* @return array[] List of interwiki rows * @return array[] List of interwiki rows
* @since 1.19 * @since 1.19
*/ */
public static function getAllPrefixes( $local = null ) { public static function getAllPrefixes( $local = null ) {
wfDeprecated( __METHOD__, '1.28' );
return MediaWikiServices::getInstance()->getInterwikiLookup()->ge tAllPrefixes( $local ); return MediaWikiServices::getInstance()->getInterwikiLookup()->ge tAllPrefixes( $local );
} }
/** /**
* Get the URL for a particular title (or with $1 if no title given) * Get the URL for a particular title (or with $1 if no title given)
* *
* @param string $title What text to put for the article name * @param string|null $title What text to put for the article name
* @return string The URL * @return string The URL
* @note Prior to 1.19 The getURL with an argument was broken. * @note Prior to 1.19 The getURL with an argument was broken.
* If you if you use this arg in an extension that supports MW earl ier * If you if you use this arg in an extension that supports MW earl ier
* than 1.19 please wfUrlencode and substitute $1 on your own. * than 1.19 please wfUrlencode and substitute $1 on your own.
*/ */
public function getURL( $title = null ) { public function getURL( $title = null ) {
$url = $this->mURL; $url = $this->mURL;
if ( $title !== null ) { if ( $title !== null ) {
$url = str_replace( "$1", wfUrlencode( $title ), $url ); $url = str_replace( "$1", wfUrlencode( $title ), $url );
} }
 End of changes. 6 change blocks. 
2 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)