X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FRevision.php;h=658420702a8b3ad2035bcc24cadaf9dc0feb1858;hb=4db800ee441d51a36861d02a54476c9ded26b0f7;hp=71bdf58ceaf5c0752196a868382f99dfed3b8025;hpb=85f481a0dd58ec0bd3033685bc05b8f8baae4057;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Revision.php b/includes/Revision.php index 71bdf58cea..658420702a 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -773,7 +773,7 @@ class Revision implements IDBAccessObject { if ( $this->mTitle !== null ) { return $this->mTitle; } - //rev_id is defined as NOT NULL, but this revision may not yet have been inserted. + // rev_id is defined as NOT NULL, but this revision may not yet have been inserted. if ( $this->mId !== null ) { $dbr = wfGetDB( DB_SLAVE ); $row = $dbr->selectRow( @@ -1418,8 +1418,8 @@ class Revision implements IDBAccessObject { ); if ( $wgContentHandlerUseDB ) { - //NOTE: Store null for the default model and format, to save space. - //XXX: Makes the DB sensitive to changed defaults. + // NOTE: Store null for the default model and format, to save space. + // XXX: Makes the DB sensitive to changed defaults. // Make this behavior optional? Only in miser mode? $model = $this->getContentModel(); @@ -1459,7 +1459,7 @@ class Revision implements IDBAccessObject { protected function checkContentModel() { global $wgContentHandlerUseDB; - $title = $this->getTitle(); //note: may return null for revisions that have not yet been inserted. + $title = $this->getTitle(); // note: may return null for revisions that have not yet been inserted. $model = $this->getContentModel(); $format = $this->getContentFormat(); @@ -1641,8 +1641,9 @@ class Revision implements IDBAccessObject { $row['content_format'] = $current->rev_content_format; } + $row['title'] = Title::makeTitle( $current->page_namespace, $current->page_title ); + $revision = new Revision( $row ); - $revision->setTitle( Title::makeTitle( $current->page_namespace, $current->page_title ) ); } else { $revision = null; }