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:
7ba0982
)
MediaWiki: namespace memcached synchronisation
author
Tim Starling
<tstarling@users.mediawiki.org>
Sat, 6 Dec 2003 02:09:48 +0000
(
02:09
+0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Sat, 6 Dec 2003 02:09:48 +0000
(
02:09
+0000)
includes/Article.php
patch
|
blob
|
history
diff --git
a/includes/Article.php
b/includes/Article.php
index
4bc527b
..
84bbdad
100644
(file)
--- a/
includes/Article.php
+++ b/
includes/Article.php
@@
-1080,7
+1080,14
@@
class Article {
if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
$messageCache = $wgMemc->get( "$wgDBname:messages" );
if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
$messageCache = $wgMemc->get( "$wgDBname:messages" );
- if (!$messageCache) {
+
+ # If another thread is loading, poll
+ for ( $i=0; $i<70 && $messageCache == 'loading'; $i++ ) {
+ sleep(1);
+ $messageCache = $wgMemc->get( "$wgDBname:messages" );
+ }
+
+ if ( !$messageCache || $messageCache == 'loading' ) {
$messageCache = wfLoadAllMessages();
}
$messageCache[$this->mTitle->getDBkey()] = $text;
$messageCache = wfLoadAllMessages();
}
$messageCache[$this->mTitle->getDBkey()] = $text;
@@
-1172,6
+1179,14
@@
class Article {
$mw =& MagicWord::get( MAG_SUBST );
$text = $mw->substituteCallback( $text, "wfReplaceSubstVar" );
$mw =& MagicWord::get( MAG_SUBST );
$text = $mw->substituteCallback( $text, "wfReplaceSubstVar" );
+/* Experimental:
+ # Trim trailing whitespace
+ # MAG_END (__END__) tag allows for trailing
+ # whitespace to be deliberately included
+ $text = rtrim( $text );
+ $mw =& MagicWord::get( MAG_END );
+ $mw->matchAndRemove( $text );
+*/
return $text;
}
return $text;
}