* $wgMessageCacheType defines now the type of cache used by the MessageCache class,
previously it was choosen based on $wgParserCacheType
* $wgExtensionAliasesFiles option to simplify adding aliases to special pages
-* provided by extensions, in a similar way to $wgExtensionMessagesFiles
+ provided by extensions, in a similar way to $wgExtensionMessagesFiles
=== New features in 1.13 ===
* Allow an $error message to be passed to ArticleDelete hook
* Allow extensions to modify the user creation form by calling addInputItem();
* Add meta generator tag to HTML output
+* Two new hooks, ExtendJSGlobalVars and wfMessageCacheReplace added
+* New global function, wfSharedTable - used to get the name of a table in the
+ shared database ($wgSharedDB)
=== Bug fixes in 1.13 ===
$subject: subject of the mail
$text: text of the mail
+'ExtendJSGlobalVars': called right before Skin::makeVariablesScript is executed
+&$vars: variable (or multiple variables) to be added into the output
+ of Skin::makeVariablesScript
+
'FetchChangesList': When fetching the ChangesList derivative for a particular user
&$user: User the list is being fetched for
&$skin: Skin object to be used with the list
'wgQueryPages': called when initialising $wgQueryPages, use this to add new query pages to be updated with maintenance/updateSpecialPages.php
$query: $wgQueryPages itself
+'wfMessageCacheReplace': called after sidebar memcached key has been deleted, use this to replace core messages by using an extension
+$title: title of the MediaWiki: message page
+$text: text of the MediaWiki: message page
+
More hooks might be available but undocumented, you can execute
./maintenance/findhooks.php to find hidden one.
return md5( mt_rand( 0, 0x7fffffff ) . $salt );
}
+
+/**
+ * Create table name for shared database.
+ *
+ * @access public
+ * @author eloy@wikia
+ *
+ * @param string $table: table name
+ *
+ * @return string: table name with additional shared database
+ */
+function wfSharedTable( $table, $useExternal = true ) {
+ global $wgSharedDB, $wgExternalSharedDB;
+
+ if ($useExternal && !empty( $wgExternalSharedDB )) {
+ return "`$wgExternalSharedDB`.`$table`";
+ } elseif (!empty( $wgSharedDB )) {
+ return "`$wgSharedDB`.`$table`";
+ } else
+ return "`$table`";
+}
\ No newline at end of file
}
$this->unlock();
$parserMemc->delete(wfMemcKey('sidebar'));
+ wfRunHooks( 'wfMessageCacheReplace', array( $title, $text ) );
wfProfileOut( __METHOD__ );
}
$vars['wgAjaxWatch'] = $msgs;
}
+ wfRunHooks('ExtendJSGlobalVars', array(&$vars));
+
return self::makeVariablesScript( $vars );
}