* Generate correct section anchors for numeric headers
* (bug 14520) Don't load nonexistent CSS files for Chick/Myskin/Simple skins
* (bug 14551) Cancel upload no longer automatically suppresses warnings
+* (bug 13878) Deprecate Article::getDB() in favor of direct wfGetDB() calls
=== API changes in 1.13 ===
*/
function loadPageData( $data = 'fromdb' ) {
if ( $data === 'fromdb' ) {
- $dbr = $this->getDB();
+ $dbr = wfGetDB( DB_MASTER );
$data = $this->pageDataFromId( $dbr, $this->getId() );
}
return $this->mContent;
}
- $dbr = $this->getDB();
+ $dbr = wfGetDB( DB_MASTER );
# Pre-fill content with error message so that if something
# fails we'll have something telling us what we intended.
* Get the database which should be used for reads
*
* @return Database
+ * @deprecated - just call wfGetDB( DB_MASTER ) instead
*/
function getDB() {
return wfGetDB( DB_MASTER );
$id = $this->getID();
if ( 0 == $id ) return;
- $this->mLastRevision = Revision::loadFromPageId( $this->getDB(), $id );
+ $this->mLastRevision = Revision::loadFromPageId( wfGetDB( DB_MASTER ), $id );
if( !is_null( $this->mLastRevision ) ) {
$this->mUser = $this->mLastRevision->getUser();
$this->mUserText = $this->mLastRevision->getUserText();