("editinginterface")
* (bug 4834) Fix XHTML output when using $wgMaxTocLevel
* Pass login link to "whitelistedittext" containing 'returnto' parameter
+* (bug 5728): mVersion missing from User::__sleep() leading to constant cache miss
== Compatibility ==
* @package MediaWiki
*/
class User {
+ /*
+ * When adding a new private variable, dont forget to add it to __sleep()
+ */
/**@{{
* @private
*/
/**
* Serialze sleep function, for better cache efficiency and avoidance of
- * silly "incomplete type" errors when skins are cached
+ * silly "incomplete type" errors when skins are cached. The array should
+ * contain names of private variables (see at top of User.php).
*/
function __sleep() {
- return array( 'mId', 'mName', 'mPassword', 'mEmail', 'mNewtalk',
- 'mEmailAuthenticated', 'mRights', 'mOptions', 'mDataLoaded',
- 'mNewpassword', 'mBlockedby', 'mBlockreason', 'mTouched',
- 'mToken', 'mRealName', 'mHash', 'mGroups', 'mRegistration' );
+ return array(
+'mBlockedby',
+'mBlockreason',
+'mDataLoaded',
+'mEmail',
+'mEmailAuthenticated',
+'mGroups',
+'mHash',
+'mId',
+'mName',
+'mNewpassword',
+'mNewtalk',
+'mOptions',
+'mPassword',
+'mRealName',
+'mRegistration',
+'mRights',
+'mToken',
+'mTouched',
+'mVersion',
+);
}
/**