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 "Move around "ا" to after "آ" and not before"
[lhc/web/wiklou.git]
/
includes
/
parser
/
Parser.php
diff --git
a/includes/parser/Parser.php
b/includes/parser/Parser.php
index
88439db
..
988e248
100644
(file)
--- a/
includes/parser/Parser.php
+++ b/
includes/parser/Parser.php
@@
-736,17
+736,6
@@
class Parser {
return $text;
}
return $text;
}
- /**
- * Get a random string
- *
- * @return string
- * @deprecated since 1.26; use wfRandomString() instead.
- */
- public static function getRandomString() {
- wfDeprecated( __METHOD__, '1.26' );
- return wfRandomString( 16 );
- }
-
/**
* Set the current user.
* Should only be used when doing pre-save transform.
/**
* Set the current user.
* Should only be used when doing pre-save transform.
@@
-757,17
+746,6
@@
class Parser {
$this->mUser = $user;
}
$this->mUser = $user;
}
- /**
- * Accessor for mUniqPrefix.
- *
- * @return string
- * @deprecated since 1.26; use Parser::MARKER_PREFIX instead.
- */
- public function uniqPrefix() {
- wfDeprecated( __METHOD__, '1.26' );
- return self::MARKER_PREFIX;
- }
-
/**
* Set the context title
*
/**
* Set the context title
*
@@
-972,15
+950,10
@@
class Parser {
*
* @param array $elements List of element names. Comments are always extracted.
* @param string $text Source text string.
*
* @param array $elements List of element names. Comments are always extracted.
* @param string $text Source text string.
- * @param array $matches Out parameter, Array: extracted tags
- * @param string|null $uniq_prefix
+ * @param array &$matches Out parameter, Array: extracted tags
* @return string Stripped text
* @return string Stripped text
- * @since 1.26 The uniq_prefix argument is deprecated.
*/
*/
- public static function extractTagsAndParams( $elements, $text, &$matches, $uniq_prefix = null ) {
- if ( $uniq_prefix !== null ) {
- wfDeprecated( __METHOD__ . ' called with $prefix argument', '1.26' );
- }
+ public static function extractTagsAndParams( $elements, $text, &$matches ) {
static $n = 1;
$stripped = '';
$matches = [];
static $n = 1;
$stripped = '';
$matches = [];
@@
-2103,7
+2076,7
@@
class Parser {
/**
* Process [[ ]] wikilinks (RIL)
/**
* Process [[ ]] wikilinks (RIL)
- * @param string $s
+ * @param string
&
$s
* @throws MWException
* @return LinkHolderArray
*
* @throws MWException
* @return LinkHolderArray
*
@@
-2611,7
+2584,7
@@
class Parser {
) ) );
break;
case 'talkpagename':
) ) );
break;
case 'talkpagename':
- if ( $this->mTitle->can
Talk
() ) {
+ if ( $this->mTitle->can
HaveTalkPage
() ) {
$talkPage = $this->mTitle->getTalkPage();
$value = wfEscapeWikiText( $talkPage->getPrefixedText() );
} else {
$talkPage = $this->mTitle->getTalkPage();
$value = wfEscapeWikiText( $talkPage->getPrefixedText() );
} else {
@@
-2619,7
+2592,7
@@
class Parser {
}
break;
case 'talkpagenamee':
}
break;
case 'talkpagenamee':
- if ( $this->mTitle->can
Talk
() ) {
+ if ( $this->mTitle->can
HaveTalkPage
() ) {
$talkPage = $this->mTitle->getTalkPage();
$value = wfEscapeWikiText( $talkPage->getPrefixedURL() );
} else {
$talkPage = $this->mTitle->getTalkPage();
$value = wfEscapeWikiText( $talkPage->getPrefixedURL() );
} else {
@@
-2719,12
+2692,12
@@
class Parser {
$value = $this->mTitle->getNamespace();
break;
case 'talkspace':
$value = $this->mTitle->getNamespace();
break;
case 'talkspace':
- $value = $this->mTitle->can
Talk
()
+ $value = $this->mTitle->can
HaveTalkPage
()
? str_replace( '_', ' ', $this->mTitle->getTalkNsText() )
: '';
break;
case 'talkspacee':
? str_replace( '_', ' ', $this->mTitle->getTalkNsText() )
: '';
break;
case 'talkspacee':
- $value = $this->mTitle->can
Talk
() ? wfUrlencode( $this->mTitle->getTalkNsText() ) : '';
+ $value = $this->mTitle->can
HaveTalkPage
() ? wfUrlencode( $this->mTitle->getTalkNsText() ) : '';
break;
case 'subjectspace':
$value = str_replace( '_', ' ', $this->mTitle->getSubjectNsText() );
break;
case 'subjectspace':
$value = str_replace( '_', ' ', $this->mTitle->getSubjectNsText() );
@@
-3411,7
+3384,7
@@
class Parser {
# string or an array containing the string and any flags. This mungs
# things around to match what this method should return.
if ( !is_array( $result ) ) {
# string or an array containing the string and any flags. This mungs
# things around to match what this method should return.
if ( !is_array( $result ) ) {
- $result =[
+ $result =
[
'found' => true,
'text' => $result,
];
'found' => true,
'text' => $result,
];
@@
-4536,7
+4509,7
@@
class Parser {
* Do not reuse this parser instance after calling getUserSig(),
* as it may have changed if it's the $wgParser.
*
* Do not reuse this parser instance after calling getUserSig(),
* as it may have changed if it's the $wgParser.
*
- * @param User $user
+ * @param User
&
$user
* @param string|bool $nickname Nickname to use or false to use user's default nickname
* @param bool|null $fancySig whether the nicknname is the complete signature
* or null to use default value
* @param string|bool $nickname Nickname to use or false to use user's default nickname
* @param bool|null $fancySig whether the nicknname is the complete signature
* or null to use default value
@@
-4897,7
+4870,7
@@
class Parser {
* Replace "<!--LINK-->" link placeholders with actual links, in the buffer
* Placeholders created in Linker::link()
*
* Replace "<!--LINK-->" link placeholders with actual links, in the buffer
* Placeholders created in Linker::link()
*
- * @param string $text
+ * @param string
&
$text
* @param int $options
*/
public function replaceLinkHolders( &$text, $options = 0 ) {
* @param int $options
*/
public function replaceLinkHolders( &$text, $options = 0 ) {
@@
-5406,7
+5379,7
@@
class Parser {
* Callback from the Sanitizer for expanding items found in HTML attribute
* values, so they can be safely tested and escaped.
*
* Callback from the Sanitizer for expanding items found in HTML attribute
* values, so they can be safely tested and escaped.
*
- * @param string $text
+ * @param string
&
$text
* @param bool|PPFrame $frame
* @return string
*/
* @param bool|PPFrame $frame
* @return string
*/