dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e85fb29
)
Inner loop optimization: reverse order of conditions for language variant link check...
author
Brion Vibber
<brion@users.mediawiki.org>
Mon, 22 Nov 2004 10:05:11 +0000
(10:05 +0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Mon, 22 Nov 2004 10:05:11 +0000
(10:05 +0000)
includes/Parser.php
patch
|
blob
|
history
diff --git
a/includes/Parser.php
b/includes/Parser.php
index
d25a27b
..
3a17300
100644
(file)
--- a/
includes/Parser.php
+++ b/
includes/Parser.php
@@
-1167,8
+1167,8
@@
class Parser
# Loop for each link
for ($k = 0; isset( $a[$k] ); $k++) {
$line = $a[$k];
# Loop for each link
for ($k = 0; isset( $a[$k] ); $k++) {
$line = $a[$k];
- wfProfileIn( $fname.'-prefixhandling' );
if ( $useLinkPrefixExtension ) {
if ( $useLinkPrefixExtension ) {
+ wfProfileIn( $fname.'-prefixhandling' );
if ( preg_match( $e2, $s, $m ) ) {
$prefix = $m[2];
$s = $m[1];
if ( preg_match( $e2, $s, $m ) ) {
$prefix = $m[2];
$s = $m[1];
@@
-1180,8
+1180,8
@@
class Parser
$prefix = $first_prefix;
$first_prefix = false;
}
$prefix = $first_prefix;
$first_prefix = false;
}
+ wfProfileOut( $fname.'-prefixhandling' );
}
}
- wfProfileOut( $fname.'-prefixhandling' );
$might_be_img = false;
$might_be_img = false;
@@
-1225,8
+1225,8
@@
class Parser
#check other language variants of the link
#if the article does not exist
#check other language variants of the link
#if the article does not exist
- if( $
nt->getArticleID() == 0
-
&& $checkVariantLink
) {
+ if( $
checkVariantLink
+
&& $nt->getArticleID() == 0
) {
$wgContLang->findVariantLink($link, $nt);
}
$wgContLang->findVariantLink($link, $nt);
}
@@
-3137,7
+3137,6
@@
class ParserOptions
# Get user options
function initialiseFromUser( &$userInput ) {
global $wgUseTeX, $wgUseDynamicDates, $wgInterwikiMagic, $wgAllowExternalImages;
# Get user options
function initialiseFromUser( &$userInput ) {
global $wgUseTeX, $wgUseDynamicDates, $wgInterwikiMagic, $wgAllowExternalImages;
-
$fname = 'ParserOptions::initialiseFromUser';
wfProfileIn( $fname );
if ( !$userInput ) {
$fname = 'ParserOptions::initialiseFromUser';
wfProfileIn( $fname );
if ( !$userInput ) {