* (bug 4377) "[" is not valid in URLs
* Don't delete thumbnails when refreshing exif metadata. This caused thumbs
to vanish mysteriously from time to time for files that didn't have metadata.
+* Added 'PageRenderingHash' hook for changing the parser cache hash key
+ from an extension that changes rendering based on nonstandard options.
=== Caveats ===
'LogPageLogHeader': strings used by wfMsg as a header.
$headerText: array of strings
+'PageRenderingHash': alter the parser cache option hash key
+ A parser extension which depends on user options should install
+ this hook and append its values to the key.
+$hash: reference to a hash key string which can be modified
+
'TitleMoveComplete': after moving an article (title)
$old: old title
$nt: new title
}
+ /**
+ * Generate a string which will be different for any combination of
+ * user options which would produce different parser output.
+ * This will be used as part of the hash key for the parser cache,
+ * so users will the same options can share the same cached data
+ * safely.
+ *
+ * Extensions which require it should install 'PageRenderingHash' hook,
+ * which will give them a chance to modify this key based on their own
+ * settings.
+ *
+ * @return string
+ */
function getPageRenderingHash() {
global $wgContLang;
if( $this->mHash ){
// add in language specific options, if any
$extra = $wgContLang->getExtraHashOptions();
$confstr .= $extra;
+
+ // Give a chance for extensions to modify the hash, if they have
+ // extra options or other effects on the parser cache.
+ wfRunHooks( 'PageRenderingHash', array( &$confstr ) );
$this->mHash = $confstr;
- return $confstr ;
+ return $confstr;
}
function isAllowedToCreateAccount() {