mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-12 01:01:29 +00:00
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:
parent
49c2a5d595
commit
db9ff2bd18
15
Cite.php
15
Cite.php
|
@ -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',
|
||||
|
|
|
@ -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 {
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue