Index: trunk/phase3/includes/Article.php |
— | — | @@ -352,7 +352,7 @@ |
353 | 353 | */ |
354 | 354 | function loadPageData( $data = 'fromdb' ) { |
355 | 355 | if ( $data === 'fromdb' ) { |
356 | | - $dbr = $this->getDB(); |
| 356 | + $dbr = wfGetDB( DB_MASTER ); |
357 | 357 | $data = $this->pageDataFromId( $dbr, $this->getId() ); |
358 | 358 | } |
359 | 359 | |
— | — | @@ -390,7 +390,7 @@ |
391 | 391 | return $this->mContent; |
392 | 392 | } |
393 | 393 | |
394 | | - $dbr = $this->getDB(); |
| 394 | + $dbr = wfGetDB( DB_MASTER ); |
395 | 395 | |
396 | 396 | # Pre-fill content with error message so that if something |
397 | 397 | # fails we'll have something telling us what we intended. |
— | — | @@ -458,6 +458,7 @@ |
459 | 459 | * Get the database which should be used for reads |
460 | 460 | * |
461 | 461 | * @return Database |
| 462 | + * @deprecated - just call wfGetDB( DB_MASTER ) instead |
462 | 463 | */ |
463 | 464 | function getDB() { |
464 | 465 | return wfGetDB( DB_MASTER ); |
— | — | @@ -581,7 +582,7 @@ |
582 | 583 | $id = $this->getID(); |
583 | 584 | if ( 0 == $id ) return; |
584 | 585 | |
585 | | - $this->mLastRevision = Revision::loadFromPageId( $this->getDB(), $id ); |
| 586 | + $this->mLastRevision = Revision::loadFromPageId( wfGetDB( DB_MASTER ), $id ); |
586 | 587 | if( !is_null( $this->mLastRevision ) ) { |
587 | 588 | $this->mUser = $this->mLastRevision->getUser(); |
588 | 589 | $this->mUserText = $this->mLastRevision->getUserText(); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -372,6 +372,7 @@ |
373 | 373 | * Generate correct section anchors for numeric headers |
374 | 374 | * (bug 14520) Don't load nonexistent CSS files for Chick/Myskin/Simple skins |
375 | 375 | * (bug 14551) Cancel upload no longer automatically suppresses warnings |
| 376 | +* (bug 13878) Deprecate Article::getDB() in favor of direct wfGetDB() calls |
376 | 377 | |
377 | 378 | === API changes in 1.13 === |
378 | 379 | |