X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FRevision.php;h=eda898916c72717fdf5632d5ca609ce983d84042;hb=0bcd4a16a46b3a8768f9ab01595cc598929ef63b;hp=0e45b251c18210c9bf1a209360c550ec662daf2f;hpb=20b4f9d311ba743b88e277907293e5f8f2bb6ee1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Revision.php b/includes/Revision.php index 0e45b251c1..eda898916c 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -720,11 +720,28 @@ class Revision implements IDBAccessObject { /** * Set the revision ID * + * This should only be used for proposed revisions that turn out to be null edits + * * @since 1.19 * @param int $id */ public function setId( $id ) { - $this->mId = $id; + $this->mId = (int)$id; + } + + /** + * Set the user ID/name + * + * This should only be used for proposed revisions that turn out to be null edits + * + * @since 1.28 + * @param integer $id User ID + * @param string $name User name + */ + public function setUserIdAndName( $id, $name ) { + $this->mUser = (int)$id; + $this->mUserText = $name; + $this->mOrigUserText = $name; } /**