r105706 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105705‎ | r105706 | r105707 >
Date:20:31, 9 December 2011
Author:hashar
Status:resolved (Comments)
Tags:
Comment:
MFT to REL1_18

r105419 (bug 32853) DBA cache broken in MW 1.18
r105372 (bug 32786) Backward compatibility for extension using 1.17's
Database::newFromType()
r103450 fix stack trace when using WhatLinksHere on a Media: file
Modified paths:
  • /branches/REL1_18/extensions (modified) (history)
  • /branches/REL1_18/phase3/RELEASE-NOTES-1.18 (modified) (history)
  • /branches/REL1_18/phase3/includes/DefaultSettings.php (modified) (history)
  • /branches/REL1_18/phase3/includes/SkinTemplate.php (modified) (history)
  • /branches/REL1_18/phase3/includes/db/Database.php (modified) (history)
  • /branches/REL1_18/phase3/includes/objectcache/DBABagOStuff.php (modified) (history)

Diff [purge]

Property changes on: branches/REL1_18/extensions
___________________________________________________________________
Modified: svn:mergeinfo
11 Merged /trunk/phase3/extensions:r103450*,105372*,105419*
Index: branches/REL1_18/phase3/RELEASE-NOTES-1.18
@@ -16,8 +16,10 @@
1717 * (bug 30774) mediawiki.html: Add support for numbers and booleans in the
1818 attribute values and element contents.
1919 * (bug 32473) [[Special:PasswordReset]] can not be used on private wiki
 20+* (bug 32843) DBA cache broken
 21+* (bug 328786) Backward compatibility for extension using 1.17's Database::newFromType()
 22+* fix stack trace when using WhatLinksHere on a Media: file
2023
21 -
2224 == MediaWiki 1.18 ==
2325 2011-11-24
2426
Property changes on: branches/REL1_18/phase3/RELEASE-NOTES-1.18
___________________________________________________________________
Modified: svn:mergeinfo
2527 Merged /trunk/phase3/RELEASE-NOTES-1.18:r103450,105372
Index: branches/REL1_18/phase3/includes/objectcache/DBABagOStuff.php
@@ -6,20 +6,23 @@
77 * writer locks. Intended for development use only, as a memcached workalike
88 * for systems that don't have it.
99 *
 10+ * On construction you can pass array( 'dir' => '/some/path' ); as a parameter
 11+ * to override the default DBA files directory (wgTmpDirectory).
 12+ *
1013 * @ingroup Cache
1114 */
1215 class DBABagOStuff extends BagOStuff {
1316 var $mHandler, $mFile, $mReader, $mWriter, $mDisabled;
1417
15 - public function __construct( $dir = false ) {
 18+ public function __construct( $params ) {
1619 global $wgDBAhandler;
1720
18 - if ( $dir === false ) {
 21+ if ( !isset( $params['dir'] ) ) {
1922 global $wgTmpDirectory;
20 - $dir = $wgTmpDirectory;
 23+ $params['dir'] = $wgTmpDirectory;
2124 }
2225
23 - $this->mFile = "$dir/mw-cache-" . wfWikiID();
 26+ $this->mFile = $params['dir']."/mw-cache-" . wfWikiID();
2427 $this->mFile .= '.db';
2528 wfDebug( __CLASS__ . ": using cache file {$this->mFile}\n" );
2629 $this->mHandler = $wgDBAhandler;
Index: branches/REL1_18/phase3/includes/db/Database.php
@@ -590,6 +590,19 @@
591591 }
592592
593593 /**
 594+ * Same as new factory( ... ), kept for backward compatibility
 595+ * @deprecated since 1.18
 596+ * @see Database::factory()
 597+ */
 598+ public final static function newFromType( $dbType, $p = array() ) {
 599+ wfDeprecated( __METHOD__ );
 600+ if ( isset( $p['tableprefix'] ) ) {
 601+ $p['tablePrefix'] = $p['tableprefix'];
 602+ }
 603+ return self::factory( $dbType, $p );
 604+ }
 605+
 606+ /**
594607 * Given a DB type, construct the name of the appropriate child class of
595608 * DatabaseBase. This is designed to replace all of the manual stuff like:
596609 * $class = 'Database' . ucfirst( strtolower( $type ) );
Property changes on: branches/REL1_18/phase3/includes/db/Database.php
___________________________________________________________________
Modified: svn:mergeinfo
597610 Merged /trunk/phase3/includes/db/Database.php:r103450,105372
Index: branches/REL1_18/phase3/includes/SkinTemplate.php
@@ -853,7 +853,7 @@
854854 wfRunHooks( 'SkinTemplatePreventOtherActiveTabs', array( &$this, &$preventActiveTabs ) );
855855
856856 // Checks if page is some kind of content
857 - if( $title->getNamespace() != NS_SPECIAL ) {
 857+ if( $title->canExist() ) {
858858 // Gets page objects for the related namespaces
859859 $subjectPage = $title->getSubjectPage();
860860 $talkPage = $title->getTalkPage();
Index: branches/REL1_18/phase3/includes/DefaultSettings.php
@@ -1511,6 +1511,8 @@
15121512 * given, giving a callable function which will generate a suitable cache object.
15131513 *
15141514 * The other parameters are dependent on the class used.
 1515+ * - CACHE_DBA uses $wgTmpDirectory by default. The 'dir' parameter let you
 1516+ * overrides that.
15151517 */
15161518 $wgObjectCaches = array(
15171519 CACHE_NONE => array( 'class' => 'EmptyBagOStuff' ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r106163* Fixed release notes bug numbers from r105706, fixed some change descriptionststarling02:50, 14 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r103450skip Media: links in addition to Special: links...hashar10:10, 17 November 2011
r105372* (bug 32786) Fix backwards compatibility for extensions using 1.17's Databas...brion22:37, 6 December 2011
r105419(bug 32853) DBA cache broken in MW 1.18...hashar11:04, 7 December 2011

Comments

#Comment by Tim Starling (talk | contribs)   02:50, 14 December 2011

Please copy and paste the bug numbers into the release notes instead of playing Chinese whispers with a blind typist or whatever it is you're doing at the moment ;)

#Comment by Hashar (talk | contribs)   09:06, 14 December 2011

Sorry about that Tim, looks like my typist is better at Braille 8-)

Status & tagging log