\n" );
$wgOut->addHTML( " {$sl} ($shm)\n");
}
/**
* Generates each row in the contributions list.
*
* Contributions which are marked "top" are currently on top of the history.
* For these contributions, a [rollback] link is shown for users with sysop
* privileges. The rollback link restores the most recent version that was not
* written by the target user.
*
* If the contributions page is called with the parameter &bot=1, all rollback
* links also get that parameter. It causes the edit itself and the rollback
* to be marked as "bot" edits. Bot edits are hidden by default from recent
* changes, so this allows sysops to combat a busy vandal without bothering
* other users.
*
* @todo This would probably look a lot nicer in a table.
*/
function ucListEdit( $sk, $row ) {
$fname = 'ucListEdit';
wfProfileIn( $fname );
global $wgLang, $wgOut, $wgUser, $wgRequest;
static $messages;
if( !isset( $messages ) ) {
foreach( explode( ' ', 'uctop diff newarticle rollbacklink diff hist minoreditletter' ) as $msg ) {
$messages[$msg] = wfMsg( $msg );
}
}
$page =& Title::makeTitle( $row->page_namespace, $row->page_title );
$link = $sk->makeKnownLinkObj( $page, '' );
$difftext = $topmarktext = '';
if( $row->rev_id == $row->page_latest ) {
$topmarktext .= '' . $messages['uctop'] . '';
if( !$row->page_is_new ) {
$difftext .= $sk->makeKnownLinkObj( $page, '(' . $messages['diff'] . ')', 'diff=0' );
} else {
$difftext .= $messages['newarticle'];
}
if( $wgUser->isAllowed('rollback') ) {
$extraRollback = $wgRequest->getBool( 'bot' ) ? '&bot=1' : '';
$extraRollback .= '&token=' . urlencode(
$wgUser->editToken( array( $page->getPrefixedText(), $row->rev_user_text ) ) );
$topmarktext .= ' ['. $sk->makeKnownLinkObj( $page,
$messages['rollbacklink'],
'action=rollback&from=' . urlencode( $row->rev_user_text ) . $extraRollback ) .']';
}
}
if( $row->rev_deleted && !$wgUser->isAllowed( 'undelete' ) ) {
$difftext = '(' . $messages['diff'] . ')';
} else {
$difftext = $sk->makeKnownLinkObj( $page, '(' . $messages['diff'].')', 'diff=prev&oldid='.$row->rev_id );
}
$histlink='('.$sk->makeKnownLinkObj( $page, $messages['hist'], 'action=history' ) . ')';
$comment = $sk->commentBlock( $row->rev_comment, $page );
$d = $wgLang->timeanddate( $row->rev_timestamp, true );
if( $row->rev_minor_edit ) {
$mflag = '' . $messages['minoreditletter'] . ' ';
} else {
$mflag = '';
}
$ret = "{$d} {$histlink} {$difftext} {$mflag} {$link} {$comment} {$topmarktext}";
if( $row->rev_deleted ) {
$ret = '' . $ret . ' ' . htmlspecialchars( wfMsg( 'deletedrev' ) );
}
$ret = "
$ret
\n";
wfProfileOut( $fname );
return $ret;
}
/**
* Generates a form used to restrict display of contributions
* to a specific namespace
*
* @return none
* @param string $target target user to show contributions for
* @param string $hideminor whether minor contributions are hidden
* @param string $namespace currently selected namespace, NULL for show all
*/
function namespaceForm ( $target, $hideminor, $namespace ) {
global $wgContLang, $wgScript;
$namespaceselect = '';
$submitbutton = '';
$out = "';
return $out;
}
?>