Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -1823,6 +1823,11 @@ |
1824 | 1824 | &$join_conds: join conditions for the tables |
1825 | 1825 | &$fields: array of query fields |
1826 | 1826 | |
| 1827 | +'TestCanonicalRedirect': called when about to force a redirect to a canonical URL for a title when we have no other parameters on the URL. Gives a chance for extensions that alter page view behavior radically to abort that redirect or handle it manually. |
| 1828 | +$request: WebRequest |
| 1829 | +$title: Title of the currently found title obj |
| 1830 | +$output: OutputPage object |
| 1831 | + |
1827 | 1832 | 'TitleArrayFromResult': called when creating an TitleArray object from a |
1828 | 1833 | database result |
1829 | 1834 | &$titleArray: set this to an object to override the default object returned |
Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -180,7 +180,8 @@ |
181 | 181 | } elseif ( $request->getVal( 'action', 'view' ) == 'view' && !$request->wasPosted() |
182 | 182 | && ( $request->getVal( 'title' ) === null || |
183 | 183 | $title->getPrefixedDBKey() != $request->getVal( 'title' ) ) |
184 | | - && !count( $request->getValueNames( array( 'action', 'title' ) ) ) ) |
| 184 | + && !count( $request->getValueNames( array( 'action', 'title' ) ) ) |
| 185 | + && wfRunHooks( 'TestCanonicalRedirect', array( $request, $title, $output ) ) ) |
185 | 186 | { |
186 | 187 | if ( $title->getNamespace() == NS_SPECIAL ) { |
187 | 188 | list( $name, $subpage ) = SpecialPageFactory::resolveAlias( $title->getDBkey() ); |