Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -589,7 +589,6 @@ |
590 | 590 | 'permissionserrorstext-withaction', |
591 | 591 | 'recreate-moveddeleted-warn', |
592 | 592 | 'moveddeleted-notice', |
593 | | - 'renamed-notice', |
594 | 593 | 'log-fulllog', |
595 | 594 | 'edit-hook-aborted', |
596 | 595 | 'edit-gone-missing', |
Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -1231,6 +1231,9 @@ |
1232 | 1232 | |
1233 | 1233 | 'SetupAfterCache': Called in Setup.php, after cache objects are set |
1234 | 1234 | |
| 1235 | +'ShowMissingArticle': Called when generating the output for a non-existent page |
| 1236 | +$article: The article object corresponding to the page |
| 1237 | + |
1235 | 1238 | 'ShowRawCssJs': Customise the output of raw CSS and JavaScript in page views |
1236 | 1239 | $text: Text being shown |
1237 | 1240 | $title: Title of the custom script/stylesheet page |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -1201,20 +1201,17 @@ |
1202 | 1202 | public function showMissingArticle() { |
1203 | 1203 | global $wgOut, $wgRequest, $wgUser; |
1204 | 1204 | |
1205 | | - # Show info in user (talk) namespace. Does the user exist and if not, has he been renamed. |
| 1205 | + # Show info in user (talk) namespace. Does the user exist? |
1206 | 1206 | if ( $this->mTitle->getNamespace() == NS_USER || $this->mTitle->getNamespace() == NS_USER_TALK ) { |
1207 | 1207 | $id = User::idFromName( $this->mTitle->getBaseText() ); |
1208 | 1208 | $ip = User::isIP( $this->mTitle->getBaseText() ); |
1209 | 1209 | if ( $id == 0 && !$ip ) { # User does not exist |
1210 | 1210 | $wgOut->wrapWikiMsg( '<div class="mw-userpage-userdoesnotexist error">$1</div>', |
1211 | 1211 | array( 'userpage-userdoesnotexist-view', $this->mTitle->getBaseText() ) ); |
1212 | | - |
1213 | | - # Show rename log because user does not exist. |
1214 | | - $parent = $this->mTitle->getNsText() . ":" . $this->mTitle->getBaseText(); |
1215 | | - LogEventsList::showLogExtract( $wgOut, 'renameuser', $parent, '', 10, array(), false, 'renamed-notice' ); |
1216 | 1212 | } |
1217 | 1213 | |
1218 | 1214 | } |
| 1215 | + wfRunHooks( 'ShowMissingArticle', array( $this ) ); |
1219 | 1216 | # Show delete and move logs |
1220 | 1217 | LogEventsList::showLogExtract( $wgOut, array( 'delete', 'move' ), |
1221 | 1218 | $this->mTitle->getPrefixedText(), '', 10, array( "log_action != 'revision'" ), false, 'moveddeleted-notice'); |
Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -569,10 +569,10 @@ |
570 | 570 | * Show log extract. Either with text and a box (set $msgKey) or without (don't set $msgKey) |
571 | 571 | * @param $out OutputPage or String-by-reference |
572 | 572 | * @param $types String or Array |
573 | | - * @param $page String |
574 | | - * @param $user String |
| 573 | + * @param $page String The page title to show log entries for |
| 574 | + * @param $user String The user who made the log entries |
575 | 575 | * @param $lim Integer Limit of items to show, default is 50 |
576 | | - * @param $conds Array |
| 576 | + * @param $conds Array Extra conditions for the query |
577 | 577 | * @param $showIfEmpty boolean Set to false if you don't want any output in case the loglist is empty |
578 | 578 | * if set to true (default), "No matching items in log" is displayed if loglist is empty |
579 | 579 | * @param $msgKey String if you want a nice box with a message, set this to the key of the message |
— | — | @@ -663,13 +663,13 @@ |
664 | 664 | /** |
665 | 665 | * constructor |
666 | 666 | * @param $list LogEventsList |
667 | | - * @param $types String or Array |
668 | | - * @param $user String |
669 | | - * @param $title String |
670 | | - * @param $pattern String |
671 | | - * @param $conds Array |
672 | | - * @param $year Integer |
673 | | - * @param $month Integer |
| 667 | + * @param $types String or Array log types to show |
| 668 | + * @param $user String The user who made the log entries |
| 669 | + * @param $title String The page title the log entries are for |
| 670 | + * @param $pattern String Do a prefix search rather than an exact title match |
| 671 | + * @param $conds Array Extra conditions for the query |
| 672 | + * @param $year Integer The year to start from |
| 673 | + * @param $month Integer The month to start from |
674 | 674 | */ |
675 | 675 | public function __construct( $list, $types = array(), $user = '', $title = '', $pattern = '', |
676 | 676 | $conds = array(), $year = false, $month = false, $tagFilter = '' ) |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1342,8 +1342,6 @@ |
1343 | 1343 | The deletion and move log for this page are provided here for convenience:", |
1344 | 1344 | 'moveddeleted-notice' => 'This page has been deleted. |
1345 | 1345 | The deletion and move log for the page are provided below for reference.', |
1346 | | -'renamed-notice' => 'This user has been renamed. |
1347 | | -The rename log is provided below for reference.', |
1348 | 1346 | 'log-fulllog' => 'View full log', |
1349 | 1347 | 'edit-hook-aborted' => 'Edit aborted by hook. |
1350 | 1348 | It gave no explanation.', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -222,8 +222,9 @@ |
223 | 223 | excerpt from the block log. |
224 | 224 | * (bug 19646) New hook: ImgAuthBeforeStream for tests and functionality before |
225 | 225 | file is streamed to user, but only when using img_auth |
226 | | -* Note on non-existing user and user talk pages if user does not exist and show |
227 | | - renameuser log if the user has been renamed |
| 226 | +* Note on non-existing user and user talk pages if user does not exist |
| 227 | +* New hook ShowMissingArticle so extensions can modify the output for |
| 228 | + non-existent pages. |
228 | 229 | |
229 | 230 | === Bug fixes in 1.16 === |
230 | 231 | |