Create PageViewUpdates hook
Bug: T97622 Change-Id: I0f2dedf84a540b6f87623792c7b4f8b8ad8f8059
This commit is contained in:
parent
5d62627a21
commit
12c370c68b
2 changed files with 7 additions and 0 deletions
|
|
@ -2125,6 +2125,12 @@ the key.
|
|||
&$confstr: reference to a hash key string which can be modified
|
||||
$user: User (object) requesting the page
|
||||
|
||||
'PageViewUpdate': Allow database (or other) changes to be made after a
|
||||
page view is seen by MediaWiki. Note this does not capture views made
|
||||
via external caches such as Squid.
|
||||
$wikipage: WikiPage (object) for the page being viewed.
|
||||
$user: User (object) for the user who is viewing.
|
||||
|
||||
'ParserAfterParse': Called from Parser::parse() just after the call to
|
||||
Parser::internalParse() returns.
|
||||
$parser: parser object
|
||||
|
|
|
|||
|
|
@ -1141,6 +1141,7 @@ class WikiPage implements Page, IDBAccessObject {
|
|||
return;
|
||||
}
|
||||
|
||||
Hooks::run( 'PageViewUpdates', array( $this, $user ) );
|
||||
// Update newtalk / watchlist notification status
|
||||
try {
|
||||
$user->clearNotification( $this->mTitle, $oldid );
|
||||
|
|
|
|||
Loading…
Reference in a new issue