dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "API: Use message-per-value for apihelp-query+userinfo-param-prop"
[lhc/web/wiklou.git]
/
includes
/
MagicWord.php
diff --git
a/includes/MagicWord.php
b/includes/MagicWord.php
index
7decbee
..
186821d
100644
(file)
--- a/
includes/MagicWord.php
+++ b/
includes/MagicWord.php
@@
-172,7
+172,6
@@
class MagicWord {
'directionmark',
'contentlanguage',
'numberofadmins',
'directionmark',
'contentlanguage',
'numberofadmins',
- 'numberofviews',
'cascadingsources',
);
'cascadingsources',
);
@@
-215,7
+214,6
@@
class MagicWord {
'localtimestamp' => 3600,
'pagesinnamespace' => 3600,
'numberofadmins' => 3600,
'localtimestamp' => 3600,
'pagesinnamespace' => 3600,
'numberofadmins' => 3600,
- 'numberofviews' => 3600,
'numberingroup' => 3600,
);
'numberingroup' => 3600,
);
@@
-275,7
+273,7
@@
class MagicWord {
static function getVariableIDs() {
if ( !self::$mVariableIDsInitialised ) {
# Get variable IDs
static function getVariableIDs() {
if ( !self::$mVariableIDsInitialised ) {
# Get variable IDs
-
wfRunHooks
( 'MagicWordwgVariableIDs', array( &self::$mVariableIDs ) );
+
Hooks::run
( 'MagicWordwgVariableIDs', array( &self::$mVariableIDs ) );
self::$mVariableIDsInitialised = true;
}
return self::$mVariableIDs;
self::$mVariableIDsInitialised = true;
}
return self::$mVariableIDs;
@@
-310,7
+308,7
@@
class MagicWord {
*/
static function getDoubleUnderscoreArray() {
if ( is_null( self::$mDoubleUnderscoreArray ) ) {
*/
static function getDoubleUnderscoreArray() {
if ( is_null( self::$mDoubleUnderscoreArray ) ) {
-
wfRunHooks
( 'GetDoubleUnderscoreIDs', array( &self::$mDoubleUnderscoreIDs ) );
+
Hooks::run
( 'GetDoubleUnderscoreIDs', array( &self::$mDoubleUnderscoreIDs ) );
self::$mDoubleUnderscoreArray = new MagicWordArray( self::$mDoubleUnderscoreIDs );
}
return self::$mDoubleUnderscoreArray;
self::$mDoubleUnderscoreArray = new MagicWordArray( self::$mDoubleUnderscoreIDs );
}
return self::$mDoubleUnderscoreArray;
@@
-332,15
+330,12
@@
class MagicWord {
*/
function load( $id ) {
global $wgContLang;
*/
function load( $id ) {
global $wgContLang;
- wfProfileIn( __METHOD__ );
$this->mId = $id;
$wgContLang->getMagic( $this );
if ( !$this->mSynonyms ) {
$this->mSynonyms = array( 'brionmademeputthishere' );
$this->mId = $id;
$wgContLang->getMagic( $this );
if ( !$this->mSynonyms ) {
$this->mSynonyms = array( 'brionmademeputthishere' );
- wfProfileOut( __METHOD__ );
throw new MWException( "Error: invalid magic word '$id'" );
}
throw new MWException( "Error: invalid magic word '$id'" );
}
- wfProfileOut( __METHOD__ );
}
/**
}
/**
@@
-657,7
+652,7
@@
class MagicWord {
* This method uses the php feature to do several replacements at the same time,
* thereby gaining some efficiency. The result is placed in the out variable
* $result. The return value is true if something was replaced.
* This method uses the php feature to do several replacements at the same time,
* thereby gaining some efficiency. The result is placed in the out variable
* $result. The return value is true if something was replaced.
- * @
todo Should this be static? It doesn't seem to be used at all
+ * @
deprecated since 1.25, unused
*
* @param array $magicarr
* @param string $subject
*
* @param array $magicarr
* @param string $subject
@@
-666,6
+661,7
@@
class MagicWord {
* @return bool
*/
function replaceMultiple( $magicarr, $subject, &$result ) {
* @return bool
*/
function replaceMultiple( $magicarr, $subject, &$result ) {
+ wfDeprecated( __METHOD__, '1.25' );
$search = array();
$replace = array();
foreach ( $magicarr as $id => $replacement ) {
$search = array();
$replace = array();
foreach ( $magicarr as $id => $replacement ) {
@@
-754,6
+750,7
@@
class MagicWordArray {
/**
* Get a 2-d hashtable for this array
/**
* Get a 2-d hashtable for this array
+ * @return array
*/
function getHash() {
if ( is_null( $this->hash ) ) {
*/
function getHash() {
if ( is_null( $this->hash ) ) {
@@
-775,6
+772,7
@@
class MagicWordArray {
/**
* Get the base regex
/**
* Get the base regex
+ * @return array
*/
function getBaseRegex() {
if ( is_null( $this->baseRegex ) ) {
*/
function getBaseRegex() {
if ( is_null( $this->baseRegex ) ) {
@@
-799,6
+797,7
@@
class MagicWordArray {
/**
* Get an unanchored regex that does not match parameters
/**
* Get an unanchored regex that does not match parameters
+ * @return array
*/
function getRegex() {
if ( is_null( $this->regex ) ) {
*/
function getRegex() {
if ( is_null( $this->regex ) ) {