Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -1964,15 +1964,11 @@ |
1965 | 1965 | |
1966 | 1966 | 'UnwatchArticle': before a watch is removed from an article |
1967 | 1967 | $user: user watching |
1968 | | -$article: article object to be removed |
| 1968 | +$page: WikiPage object to be removed |
1969 | 1969 | |
1970 | | -'UnwatchArticle': after a watch is removed from an article |
1971 | | -$user: user that was watching |
1972 | | -$article: article object removed |
1973 | | - |
1974 | 1970 | 'UnwatchArticleComplete': after a watch is removed from an article |
1975 | 1971 | $user: user that watched |
1976 | | -$article: article object that was watched |
| 1972 | +$page: WikiPage object that was watched |
1977 | 1973 | |
1978 | 1974 | 'UploadForm:initial': before the upload form is generated |
1979 | 1975 | $form: UploadForm object |
— | — | @@ -2220,11 +2216,11 @@ |
2221 | 2217 | |
2222 | 2218 | 'WatchArticle': before a watch is added to an article |
2223 | 2219 | $user: user that will watch |
2224 | | -$article: article object to be watched |
| 2220 | +$page: WikiPage object to be watched |
2225 | 2221 | |
2226 | 2222 | 'WatchArticleComplete': after a watch is added to an article |
2227 | 2223 | $user: user that watched |
2228 | | -$article: article object watched |
| 2224 | +$page: WikiPage object watched |
2229 | 2225 | |
2230 | 2226 | 'WatchlistEditorBuildRemoveLine': when building remove lines in |
2231 | 2227 | Special:Watchlist/edit |
Index: trunk/phase3/includes/actions/WatchAction.php |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | } |
85 | 85 | |
86 | 86 | public static function doWatch( Title $title, User $user ) { |
87 | | - $page = new Article( $title, 0 ); |
| 87 | + $page = WikiPage::factory( $title ); |
88 | 88 | |
89 | 89 | if ( wfRunHooks( 'WatchArticle', array( &$user, &$page ) ) ) { |
90 | 90 | $user->addWatch( $title ); |
— | — | @@ -93,7 +93,7 @@ |
94 | 94 | } |
95 | 95 | |
96 | 96 | public static function doUnwatch( Title $title, User $user ) { |
97 | | - $page = new Article( $title, 0 ); |
| 97 | + $page = WikiPage::factory( $title ); |
98 | 98 | |
99 | 99 | if ( wfRunHooks( 'UnwatchArticle', array( &$user, &$page ) ) ) { |
100 | 100 | $user->removeWatch( $title ); |
Index: trunk/phase3/includes/specials/SpecialEditWatchlist.php |
— | — | @@ -337,8 +337,8 @@ |
338 | 338 | ), |
339 | 339 | __METHOD__ |
340 | 340 | ); |
341 | | - $article = new Article( $title, 0 ); |
342 | | - wfRunHooks( 'UnwatchArticleComplete', array( $this->getUser(), &$article ) ); |
| 341 | + $page = WikiPage::factory( $title ); |
| 342 | + wfRunHooks( 'UnwatchArticleComplete', array( $this->getUser(), &$page ) ); |
343 | 343 | } |
344 | 344 | } |
345 | 345 | } |