* Don't pass $data or $flags by reference. They're never accessed again, so it makes no sense.
* Document in hooks.txt.
The interface for this hook seems very messy. It seems like it would be much cleaner to expose $data as $url (null if stored locally); and $flags as an array, or something like that. If the text is gzipped, the text can be extracted from the Revision and re-gzipped if you really want to for some strange reason.
$user: the User object to load preferences from
'RevisionInsertComplete': called after a revision is inserted into the DB
-$revision: the Revision
+&$revision: the Revision
+$data: the data stored in old_text. The meaning depends on $flags: if external
+ is set, it's the URL of the revision text in external storage; otherwise,
+ it's the revision text itself. In either case, if gzip is set, the revision
+ text is gzipped.
+$flags: a comma-delimited list of strings representing the options used. May
+ include: utf8 (this will always be set for new revisions); gzip; external.
'SavePreferences': called at the end of PreferencesForm::savePreferences;
returning false prevents the preferences from being saved.
$this->mId = !is_null($rev_id) ? $rev_id : $dbw->insertId();
- wfRunHooks( 'RevisionInsertComplete', array( &$this, &$data, &$flags ) );
+ wfRunHooks( 'RevisionInsertComplete', array( &$this, $data, $flags ) );
wfProfileOut( __METHOD__ );
return $this->mId;