Wikia code/includes/MessageCache.php
< Wikia code | includes
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on the information here being up-to-date. The information shown below refers to the now unmaintained 1.16 MediaWiki release. The current stable release number is 1.43.0. |
--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\includes\MessageCache.php 2011-07-18 22:31:28.052734400 +0100
+++ D:\Programming\SVN\wikia\trunk\includes\MessageCache.php 2011-08-17 15:28:46.416992200 +0100
@@ -364,7 +365,7 @@
* @param $text Mixed: new contents of the page.
*/
public function replace( $title, $text ) {
- global $wgMaxMsgCacheEntrySize;
+ global $wgMaxMsgCacheEntrySize, $wgTitle;
wfProfileIn( __METHOD__ );
@@ -406,6 +407,16 @@
$codes = array_keys( Language::getLanguageNames() );
}
+ $parserMemc->delete( wfMemcKey( 'navlinks' ) );
+ $parserMemc->delete( wfMemcKey( 'MonacoData' ) );
+ $parserMemc->delete( wfMemcKey( 'MonacoDataOld' ) );
+ $parserMemc->delete( wfMemcKey( 'Wiki-navigation', NavigationService::version ) );
+
+ // Set the JavaScript variable which is used by AJAX request to make data caching possible - Inez
+ if(is_object($wgTitle)) {
+ $parserMemc->set(wfMemcKey('wgMWrevId'), $wgTitle->getLatestRevID());
+ }
+
foreach ( $codes as $code ) {
$sidebarKey = wfMemcKey( 'sidebar', $code );
$parserMemc->delete( $sidebarKey );
@@ -527,6 +538,16 @@
$message = $this->getMsgFromNamespace( $title, $langcode );
}
+ wfRunHooks( 'MsgGetFromNamespaceAfter', array( $lckey, $langcode, &$message, $useDB ) );
+
+ # Try the extension array
+ if ( $message === false && isset( $this->mExtensionMessages[$langcode][$lckey] ) ) {
+ $message = $this->mExtensionMessages[$langcode][$lckey];
+ }
+ if ( $message === false && isset( $this->mExtensionMessages['en'][$lckey] ) ) {
+ $message = $this->mExtensionMessages['en'][$lckey];
+ }
+
# Try the array in the language object
if ( $message === false ) {
$message = $lang->getMessage( $lckey );