Get rid of "wfCite" global function

As of Icdf82cb9771e6, MediaWiki core now looks for the "Cite" class
instead of the "wfCite" global function. The WYSIWYG extension is also
checking for wfCite and a patch was submitted for that in I3de3e069e4be.

Change-Id: Ie0f190b7bd9c9226856f150c95a0b139812dcf98
This commit is contained in:
Kunal Mehta 2015-04-30 11:41:06 -07:00
parent 49c2a5d595
commit db9ff2bd18
2 changed files with 5 additions and 14 deletions

View file

@ -17,7 +17,7 @@ if ( ! defined( 'MEDIAWIKI' ) )
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
*/
$wgHooks['ParserFirstCallInit'][] = 'wfCite';
$wgHooks['ParserFirstCallInit'][] = 'Cite::setHooks';
$wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
@ -50,19 +50,6 @@ $wgAllowCiteGroups = true;
*/
$wgCiteCacheReferences = false;
/**
* Performs the hook registration.
* Note that several extensions (and even core!) try to detect if Cite is
* installed by looking for wfCite().
*
* @param $parser Parser
*
* @return bool
*/
function wfCite( $parser ) {
return Cite::setHooks( $parser );
}
// Resources
$citeResourceTemplate = array(
'localBasePath' => __DIR__ . '/modules',

View file

@ -17,6 +17,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
*/
/**
* WARNING: MediaWiki core hardcodes this class name to check if the
* Cite extension is installed. See T89151.
*/
class Cite {
/**