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:
41e944b
)
Cache the result of User::getDefaultOptions(), so the UserGetDefaultOptions hook...
author
Roan Kattouw
<catrope@users.mediawiki.org>
Tue, 1 Nov 2011 15:55:57 +0000
(15:55 +0000)
committer
Roan Kattouw
<catrope@users.mediawiki.org>
Tue, 1 Nov 2011 15:55:57 +0000
(15:55 +0000)
includes/User.php
patch
|
blob
|
history
diff --git
a/includes/User.php
b/includes/User.php
index
e3e2c9a
..
973a304
100644
(file)
--- a/
includes/User.php
+++ b/
includes/User.php
@@
-1207,6
+1207,10
@@
class User {
*/
public static function getDefaultOptions() {
global $wgNamespacesToBeSearchedDefault, $wgDefaultUserOptions, $wgContLang, $wgDefaultSkin;
+ static $defOpt = null;
+ if ( $defOpt !== null ) {
+ return $defOpt;
+ }
$defOpt = $wgDefaultUserOptions;
# default language setting