X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2FRevision.php;h=8ba79df4c716258784ff36e5586241711e03bc8d;hb=2f0220a56ddf5528bff59aed8123515fad6920b0;hp=28a825d051361d34a0875e34a7c9ac146a90f1b9;hpb=768493b825348b42e4bf9837153a937c8033c59e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Revision.php b/includes/Revision.php index 28a825d051..8ba79df4c7 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -678,13 +678,8 @@ class Revision implements IDBAccessObject { $this->mCurrent = false; // If we still have no length, see it we have the text to figure it out - if ( !$this->mSize ) { - if ( $this->mContent !== null ) { - $this->mSize = $this->mContent->getSize(); - } else { - #NOTE: this should never happen if we have either text or content object! - $this->mSize = null; - } + if ( !$this->mSize && $this->mContent !== null ) { + $this->mSize = $this->mContent->getSize(); } // Same for sha1 @@ -1065,8 +1060,6 @@ class Revision implements IDBAccessObject { $format = $this->getContentFormat(); $this->mContent = $handler->unserializeContent( $this->mText, $format ); - } else { - $this->mContent = false; // negative caching! } } @@ -1426,7 +1419,7 @@ class Revision implements IDBAccessObject { $this->mId = $rev_id !== null ? $rev_id : $dbw->insertId(); - wfRunHooks( 'RevisionInsertComplete', array( &$this, $data, $flags ) ); + Hooks::run( 'RevisionInsertComplete', array( &$this, $data, $flags ) ); wfProfileOut( __METHOD__ ); return $this->mId;