X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27votes%27%2C%20votes=%27waiting%27%29%20%7D%7D?a=blobdiff_plain;f=includes%2FRevision.php;h=8721ef9a56fb04bc36e581e5910459547f0aacf7;hb=350dcb4cd7990daa4ea8fe4c8335f9353f442605;hp=b812191398ab718d465f4186f74d6163bcdec7ae;hpb=61898ad28ed69c5b391eb43e0db9386279b9612c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Revision.php b/includes/Revision.php index b812191398..8721ef9a56 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -874,7 +874,7 @@ class Revision implements IDBAccessObject { /** * Fetch revision's user id without regard for the current user's permissions * - * @return string + * @return int * @deprecated since 1.25, use getUser( Revision::RAW ) */ public function getRawUser() { @@ -1131,7 +1131,7 @@ class Revision implements IDBAccessObject { * * @return string The content model id associated with this revision, * see the CONTENT_MODEL_XXX constants. - **/ + */ public function getContentModel() { if ( !$this->mContentModel ) { $title = $this->getTitle(); @@ -1155,7 +1155,7 @@ class Revision implements IDBAccessObject { * * @return string The content format id associated with this revision, * see the CONTENT_FORMAT_XXX constants. - **/ + */ public function getContentFormat() { if ( !$this->mContentFormat ) { $handler = $this->getContentHandler(); @@ -1269,7 +1269,7 @@ class Revision implements IDBAccessObject { * (same as the the wiki $row was loaded from) or false to indicate the local * wiki (this is the default). Otherwise, it must be a symbolic wiki database * identifier as understood by the LoadBalancer class. - * @return string Text the text requested or false on failure + * @return string|false Text the text requested or false on failure */ public static function getRevisionText( $row, $prefix = 'old_', $wiki = false ) { @@ -1505,7 +1505,9 @@ class Revision implements IDBAccessObject { ); } - Hooks::run( 'RevisionInsertComplete', [ &$this, $data, $flags ] ); + // Avoid PHP 7.1 warning of passing $this by reference + $revision = $this; + Hooks::run( 'RevisionInsertComplete', [ &$revision, $data, $flags ] ); return $this->mId; }