r70516 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70515‎ | r70516 | r70517 >
Date:18:38, 5 August 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Further cleanup by removing unused member variables, adding protected access and documentation

Found no direct access to member variables in the repo.
Modified paths:
  • /trunk/phase3/includes/MessageCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/MessageCache.php
@@ -18,15 +18,30 @@
1919 * @ingroup Cache
2020 */
2121 class MessageCache {
22 - // Holds loaded messages that are defined in MediaWiki namespace.
23 - var $mCache;
 22+ /**
 23+ * Process local cache of loaded messages that are defined in
 24+ * MediaWiki namespace. First array level is a language code,
 25+ * second level is message key and the values are either message
 26+ * content prefixed with space, or !NONEXISTENT for negative
 27+ * caching.
 28+ */
 29+ protected $mCache;
2430
25 - var $mDisable, $mExpiry;
26 - var $mKeys, $mParserOptions, $mParser;
 31+ // Should mean that database cannot be used, but check
 32+ protected $mDisable;
2733
28 - // Variable for tracking which variables are loaded
29 - var $mLoadedLanguages = array();
 34+ /// Lifetime for cache, used by object caching
 35+ protected $mExpiry;
3036
 37+ /**
 38+ * Message cache has it's own parser which it uses to transform
 39+ * messages.
 40+ */
 41+ protected $mParserOptions, $mParser;
 42+
 43+ /// Variable for tracking which variables are already loaded
 44+ protected $mLoadedLanguages = array();
 45+
3146 function __construct( $memCached, $useDB, $expiry ) {
3247 if ( !$memCached ) {
3348 $memCached = wfGetCache( CACHE_NONE );
@@ -35,9 +50,6 @@
3651 $this->mMemc = $memCached;
3752 $this->mDisable = !$useDB;
3853 $this->mExpiry = $expiry;
39 - $this->mDisableTransform = false;
40 - $this->mKeys = false; # initialised on demand
41 - $this->mParser = null;
4254 }
4355
4456

Status & tagging log