Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -308,6 +308,10 @@ |
309 | 309 | $block: the Block object that was saved |
310 | 310 | $user: the user who did the block (not the one being blocked) |
311 | 311 | |
| 312 | +'BookInformation': Before information output on Special:Booksources |
| 313 | +$isbn: ISBN to show information for |
| 314 | +$output: OutputPage object in use |
| 315 | + |
312 | 316 | 'DiffViewHeader': called before diff display |
313 | 317 | $diff: DifferenceEngine object that's calling |
314 | 318 | $oldRev: Revision object of the "old" revision (may be null/invalid) |
Index: trunk/phase3/includes/SpecialBooksources.php |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | $this->isbn = $this->cleanIsbn( $isbn ? $isbn : $wgRequest->getText( 'isbn' ) ); |
36 | 36 | $wgOut->addWikiText( wfMsgNoTrans( 'booksources-summary' ) ); |
37 | 37 | $wgOut->addHtml( $this->makeForm() ); |
38 | | - if( strlen( $this->isbn) > 0 ) |
| 38 | + if( strlen( $this->isbn ) > 0 ) |
39 | 39 | $this->showList(); |
40 | 40 | } |
41 | 41 | |
— | — | @@ -75,6 +75,10 @@ |
76 | 76 | private function showList() { |
77 | 77 | global $wgOut, $wgContLang; |
78 | 78 | |
| 79 | + # Hook to allow extensions to insert additional HTML, |
| 80 | + # e.g. for API-interacting plugins and so on |
| 81 | + wfRunHooks( 'BookInformation', array( $this->isbn, &$wgOut ) ); |
| 82 | + |
79 | 83 | # Check for a local page such as Project:Book_sources and use that if available |
80 | 84 | $title = Title::makeTitleSafe( NS_PROJECT, wfMsg( 'booksources' ) ); # Should this be wfMsgForContent()? -- RC |
81 | 85 | if( is_object( $title ) && $title->exists() ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -79,6 +79,7 @@ |
80 | 80 | * (bug 3000) Fall back to SCRIPT_NAME plus QUERY_STRING when REQUEST_URI is |
81 | 81 | not available, as on IIS with PHP-CGI |
82 | 82 | * (bug 8621) Log revisions marked as patrolled |
| 83 | +* Introduce "BookInformation" hook; see docs/hooks.txt for more details |
83 | 84 | |
84 | 85 | == Languages updated == |
85 | 86 | |