-MediaWiki 1.22 is a collaborative project released under the
+MediaWiki 1.23 is a collaborative project released under the
GNU General Public License v2. We would like to recognize the
following names for their contribution to the product.
-Change notes from older releases. For current info see RELEASE-NOTES-1.22.
+Change notes from older releases. For current info see RELEASE-NOTES-1.23.
== MediaWiki 1.21 ==
* version are hardcoded here
*/
function wfPHPVersionError( $type ) {
- $mwVersion = '1.22';
+ $mwVersion = '1.23';
$minimumVersionPHP = '5.3.2';
$phpVersion = phpversion();
// Cacheable?
$key = false;
if ( $this->mOldid && $this->mNewid ) {
- $key = wfMemcKey( 'diff', 'version', MW_DIFF_VERSION,
- 'oldid', $this->mOldid, 'newid', $this->mNewid );
+ $key = $this->getDiffBodyCacheKey();
+
// Try cache
if ( !$this->mRefreshCache ) {
$difftext = $wgMemc->get( $key );
return $difftext;
}
+ /**
+ * Returns the cache key for diff body text or content.
+ *
+ * @return string
+ * @since 1.23
+ * @throws MWException
+ */
+ protected function getDiffBodyCacheKey() {
+ if ( !$this->mOldid || !$this->mNewid ) {
+ throw new MWException( 'mOldid and mNewid must be set to get diff cache key.' );
+ }
+
+ return wfMemcKey( 'diff', 'version', MW_DIFF_VERSION,
+ 'oldid', $this->mOldid, 'newid', $this->mNewid );
+ }
+
/**
* Generate a diff, no caching.
*
}
if ( $rows->numRows() === 0 ) {
- $this->getOutput()->wrapWikiMsg(
- "<div class='mw-changeslist-empty'>\n$1\n</div>", 'recentchanges-noresult'
+ $this->getOutput()->addHtml(
+ '<div class="mw-changeslist-empty">' . $this->msg( 'recentchanges-noresult' )->parse() . '</div>'
);
} else {
$this->getOutput()->addHTML( $rclistOutput );
$outputPage = $this->getOutput();
$title = Title::newFromURL( $target );
if ( !$title || $title->getInterwiki() != '' ) {
- $outputPage->wrapWikiMsg( "<div class=\"errorbox\">\n$1\n</div>", 'allpagesbadtitle' );
+ $outputPage->addHtml( '<div class="errorbox">' . $this->msg( 'allpagesbadtitle' )->parse() . '</div>' );
return false;
}