X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FRevision.php;h=e457beb03567e269e7c549d4725e781061042830;hb=21948ec459cbb99167c09b59b7296b7f5d502aa0;hp=c3782ba18a9af2f3a5de40e83b387938d0beec38;hpb=853b17ef5788be25045855ab340c9e0d8b443218;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Revision.php b/includes/Revision.php index c3782ba18a..e457beb035 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -559,8 +559,6 @@ class Revision implements IDBAccessObject { } /** - * Constructor - * * @param object|array $row Either a database row or an array * @throws MWException * @access private @@ -754,7 +752,7 @@ class Revision implements IDBAccessObject { * This should only be used for proposed revisions that turn out to be null edits * * @since 1.28 - * @param integer $id User ID + * @param int $id User ID * @param string $name User name */ public function setUserIdAndName( $id, $name ) { @@ -862,7 +860,7 @@ class Revision implements IDBAccessObject { * Revision::FOR_PUBLIC to be displayed to all users * Revision::FOR_THIS_USER to be displayed to the given user * Revision::RAW get the ID regardless of permissions - * @param User $user User object to check for, only if FOR_THIS_USER is passed + * @param User|null $user User object to check for, only if FOR_THIS_USER is passed * to the $audience parameter * @return int */ @@ -896,7 +894,7 @@ class Revision implements IDBAccessObject { * Revision::FOR_PUBLIC to be displayed to all users * Revision::FOR_THIS_USER to be displayed to the given user * Revision::RAW get the text regardless of permissions - * @param User $user User object to check for, only if FOR_THIS_USER is passed + * @param User|null $user User object to check for, only if FOR_THIS_USER is passed * to the $audience parameter * @return string */ @@ -940,7 +938,7 @@ class Revision implements IDBAccessObject { * Revision::FOR_PUBLIC to be displayed to all users * Revision::FOR_THIS_USER to be displayed to the given user * Revision::RAW get the text regardless of permissions - * @param User $user User object to check for, only if FOR_THIS_USER is passed + * @param User|null $user User object to check for, only if FOR_THIS_USER is passed * to the $audience parameter * @return string */ @@ -1004,7 +1002,7 @@ class Revision implements IDBAccessObject { return RecentChange::newFromConds( [ - 'rc_user_text' => $this->getUserText( Revision::RAW ), + 'rc_user_text' => $this->getUserText( self::RAW ), 'rc_timestamp' => $dbr->timestamp( $this->getTimestamp() ), 'rc_this_oldid' => $this->getId() ], @@ -1309,7 +1307,7 @@ class Revision implements IDBAccessObject { * data is compressed, and 'utf-8' if we're saving in UTF-8 * mode. * - * @param mixed $text Reference to a text + * @param mixed &$text Reference to a text * @return string */ public static function compressRevisionText( &$text ) { @@ -1468,7 +1466,7 @@ class Revision implements IDBAccessObject { ? $this->getPreviousRevisionId( $dbw ) : $this->mParentId, 'rev_sha1' => $this->mSha1 === null - ? Revision::base36Sha1( $this->mText ) + ? self::base36Sha1( $this->mText ) : $this->mSha1, ]; @@ -1557,7 +1555,7 @@ class Revision implements IDBAccessObject { } } - $content = $this->getContent( Revision::RAW ); + $content = $this->getContent( self::RAW ); $prefixedDBkey = $title->getPrefixedDBkey(); $revId = $this->mId; @@ -1586,7 +1584,7 @@ class Revision implements IDBAccessObject { * Get the text cache TTL * * @param WANObjectCache $cache - * @return integer + * @return int */ private static function getCacheTTL( WANObjectCache $cache ) { global $wgRevisionCacheExpiry;