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:
8fa8df1
)
Slightly dirty hack to avoid a fatal PHP error when changing sig. I'll need to rethin...
author
Rob Church
<robchurch@users.mediawiki.org>
Thu, 12 Jan 2006 20:50:33 +0000
(20:50 +0000)
committer
Rob Church
<robchurch@users.mediawiki.org>
Thu, 12 Jan 2006 20:50:33 +0000
(20:50 +0000)
includes/Parser.php
patch
|
blob
|
history
diff --git
a/includes/Parser.php
b/includes/Parser.php
index
b6af7fa
..
0b3d92d
100644
(file)
--- a/
includes/Parser.php
+++ b/
includes/Parser.php
@@
-3236,7
+3236,7
@@
class Parser
# Sig. might contain markup; validate this
if( $this->validateSig( $nickname ) !== false ) {
# Validated; clean up (if needed) and return it
# Sig. might contain markup; validate this
if( $this->validateSig( $nickname ) !== false ) {
# Validated; clean up (if needed) and return it
- return( $this->cleanSig( $nickname ) );
+ return( $this->cleanSig( $nickname
, true
) );
} else {
# Failed to validate; fall back to the default
$nickname = $username;
} else {
# Failed to validate; fall back to the default
$nickname = $username;
@@
-3269,7
+3269,7
@@
class Parser
* @param string $text
* @return string Text
*/
* @param string $text
* @return string Text
*/
- function cleanSig( $text ) {
+ function cleanSig( $text
, $parsing = false
) {
$mw = MagicWord::get( MAG_SUBST );
$substre = $mw->getBaseRegex();
$subst = $mw->getSynonym( 0 );
$mw = MagicWord::get( MAG_SUBST );
$substre = $mw->getBaseRegex();
$subst = $mw->getSynonym( 0 );
@@
-3289,7
+3289,9
@@
class Parser
);
$text = preg_replace( '/~{3,5}/', '', $text );
);
$text = preg_replace( '/~{3,5}/', '', $text );
- $text = $this->replaceVariables( $text );
+ if( $parsing) {
+ $text = $this->replaceVariables( $text );
+ }
return $text;
return $text;