Update for Renameuser extension to follow.
Also make docs for LogEventsList::showLogExtract() actually useful
excerpt from the block log.
* (bug 19646) New hook: ImgAuthBeforeStream for tests and functionality before
file is streamed to user, but only when using img_auth
-* Note on non-existing user and user talk pages if user does not exist and show
- renameuser log if the user has been renamed
+* Note on non-existing user and user talk pages if user does not exist
+* New hook ShowMissingArticle so extensions can modify the output for
+ non-existent pages.
=== Bug fixes in 1.16 ===
'SetupAfterCache': Called in Setup.php, after cache objects are set
+'ShowMissingArticle': Called when generating the output for a non-existent page
+$article: The article object corresponding to the page
+
'ShowRawCssJs': Customise the output of raw CSS and JavaScript in page views
$text: Text being shown
$title: Title of the custom script/stylesheet page
public function showMissingArticle() {
global $wgOut, $wgRequest, $wgUser;
- # Show info in user (talk) namespace. Does the user exist and if not, has he been renamed.
+ # Show info in user (talk) namespace. Does the user exist?
if ( $this->mTitle->getNamespace() == NS_USER || $this->mTitle->getNamespace() == NS_USER_TALK ) {
$id = User::idFromName( $this->mTitle->getBaseText() );
$ip = User::isIP( $this->mTitle->getBaseText() );
if ( $id == 0 && !$ip ) { # User does not exist
$wgOut->wrapWikiMsg( '<div class="mw-userpage-userdoesnotexist error">$1</div>',
array( 'userpage-userdoesnotexist-view', $this->mTitle->getBaseText() ) );
-
- # Show rename log because user does not exist.
- $parent = $this->mTitle->getNsText() . ":" . $this->mTitle->getBaseText();
- LogEventsList::showLogExtract( $wgOut, 'renameuser', $parent, '', 10, array(), false, 'renamed-notice' );
}
}
+ wfRunHooks( 'ShowMissingArticle', array( $this ) );
# Show delete and move logs
LogEventsList::showLogExtract( $wgOut, array( 'delete', 'move' ),
$this->mTitle->getPrefixedText(), '', 10, array( "log_action != 'revision'" ), false, 'moveddeleted-notice');
* Show log extract. Either with text and a box (set $msgKey) or without (don't set $msgKey)
* @param $out OutputPage or String-by-reference
* @param $types String or Array
- * @param $page String
- * @param $user String
+ * @param $page String The page title to show log entries for
+ * @param $user String The user who made the log entries
* @param $lim Integer Limit of items to show, default is 50
- * @param $conds Array
+ * @param $conds Array Extra conditions for the query
* @param $showIfEmpty boolean Set to false if you don't want any output in case the loglist is empty
* if set to true (default), "No matching items in log" is displayed if loglist is empty
* @param $msgKey String if you want a nice box with a message, set this to the key of the message
/**
* constructor
* @param $list LogEventsList
- * @param $types String or Array
- * @param $user String
- * @param $title String
- * @param $pattern String
- * @param $conds Array
- * @param $year Integer
- * @param $month Integer
+ * @param $types String or Array log types to show
+ * @param $user String The user who made the log entries
+ * @param $title String The page title the log entries are for
+ * @param $pattern String Do a prefix search rather than an exact title match
+ * @param $conds Array Extra conditions for the query
+ * @param $year Integer The year to start from
+ * @param $month Integer The month to start from
*/
public function __construct( $list, $types = array(), $user = '', $title = '', $pattern = '',
$conds = array(), $year = false, $month = false, $tagFilter = '' )
The deletion and move log for this page are provided here for convenience:",
'moveddeleted-notice' => 'This page has been deleted.
The deletion and move log for the page are provided below for reference.',
-'renamed-notice' => 'This user has been renamed.
-The rename log is provided below for reference.',
'log-fulllog' => 'View full log',
'edit-hook-aborted' => 'Edit aborted by hook.
It gave no explanation.',
'permissionserrorstext-withaction',
'recreate-moveddeleted-warn',
'moveddeleted-notice',
- 'renamed-notice',
'log-fulllog',
'edit-hook-aborted',
'edit-gone-missing',