diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
commit | 9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch) | |
tree | 46d1a0dee7febef5c2d57a9f7b972be16a163b3d /includes/Revision.php | |
parent | 78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff) |
update to MediaWiki 1.17.0
Diffstat (limited to 'includes/Revision.php')
-rw-r--r-- | includes/Revision.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/includes/Revision.php b/includes/Revision.php index 8d2c7e9d..9cc49350 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -82,6 +82,9 @@ class Revision { if ( isset( $row->ar_text ) && !$row->ar_text_id ) { // Pre-1.5 ar_text row $attribs['text'] = self::getRevisionText( $row, 'ar_' ); + if ( $attribs['text'] === false ) { + throw new MWException( 'Unable to load text from archive row (possibly bug 22624)' ); + } } return new self( $attribs ); } @@ -290,7 +293,7 @@ class Revision { * @param $row Mixed: either a database row or an array * @access private */ - function Revision( $row ) { + function __construct( $row ) { if( is_object( $row ) ) { $this->mId = intval( $row->rev_id ); $this->mPage = intval( $row->rev_page ); @@ -314,8 +317,7 @@ class Revision { if( isset( $row->page_latest ) ) { $this->mCurrent = ( $row->rev_id == $row->page_latest ); - $this->mTitle = Title::makeTitle( $row->page_namespace, $row->page_title ); - $this->mTitle->resetArticleID( $this->mPage ); + $this->mTitle = Title::newFromRow( $row ); } else { $this->mCurrent = false; $this->mTitle = null; @@ -601,6 +603,7 @@ class Revision { /** * Alias for getText(Revision::FOR_THIS_USER) * + * @deprecated * @return String */ public function revText() { @@ -798,7 +801,7 @@ class Revision { * Insert a new revision into the database, returning the new revision ID * number on success and dies horribly on failure. * - * @param $dbw DatabaseBase (master connection) + * @param $dbw DatabaseBase: (master connection) * @return Integer */ public function insertOn( $dbw ) { @@ -996,7 +999,6 @@ class Revision { public static function userCanBitfield( $bitfield, $field ) { if( $bitfield & $field ) { // aspect is deleted global $wgUser; - $permission = ''; if ( $bitfield & self::DELETED_RESTRICTED ) { $permission = 'suppressrevision'; } elseif ( $field & self::DELETED_TEXT ) { |