}
/**
- *
+ * @todo document (just needs one-sentence top-level class description)
* @addtogroup SpecialPage
*/
class PageArchive {
function listRevisions() {
$dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select( 'archive',
- array( 'ar_minor_edit', 'ar_timestamp', 'ar_user', 'ar_user_text', 'ar_comment' ),
+ array( 'ar_minor_edit', 'ar_timestamp', 'ar_user', 'ar_user_text', 'ar_comment', 'ar_len' ),
array( 'ar_namespace' => $this->title->getNamespace(),
'ar_title' => $this->title->getDBkey() ),
'PageArchive::listRevisions',
* if not a file page.
*
* @return ResultWrapper
- * @fixme Does this belong in Image for fuller encapsulation?
+ * @todo Does this belong in Image for fuller encapsulation?
*/
function listFiles() {
if( $this->title->getNamespace() == NS_IMAGE ) {
'ar_timestamp',
'ar_minor_edit',
'ar_flags',
- 'ar_text_id' ),
+ 'ar_text_id',
+ 'ar_len' ),
array( 'ar_namespace' => $this->title->getNamespace(),
'ar_title' => $this->title->getDbkey(),
'ar_timestamp' => $dbr->timestamp( $timestamp ) ),
'ar_timestamp',
'ar_minor_edit',
'ar_flags',
- 'ar_text_id' ),
+ 'ar_text_id',
+ 'ar_len' ),
/* WHERE */ array(
'ar_namespace' => $this->title->getNamespace(),
'ar_title' => $this->title->getDBkey(),
'timestamp' => $row->ar_timestamp,
'minor_edit' => $row->ar_minor_edit,
'text_id' => $row->ar_text_id,
+ 'len' => $row->ar_len
) );
$revision->insertOn( $dbw );
$restored++;
}
/**
- *
+ * The HTML form for Special:Undelete, which allows users with the appropriate
+ * permissions to view and restore deleted content.
* @addtogroup SpecialPage
*/
class UndeleteForm {
$pageLink = $wgLang->timeanddate( $ts, true );
}
$userLink = $sk->userLink( $row->ar_user, $row->ar_user_text ) . $sk->userToolLinks( $row->ar_user, $row->ar_user_text );
+ $stxt = '';
+ if (!is_null($size = $row->ar_len)) {
+ if ($size == 0) {
+ $stxt = wfMsgHtml('historyempty');
+ } else {
+ $stxt = wfMsgHtml('historysize', $wgLang->formatNum( $size ) );
+ }
+ }
$comment = $sk->commentBlock( $row->ar_comment );
- $wgOut->addHTML( "<li>$checkBox $pageLink . . $userLink $comment</li>\n" );
+ $wgOut->addHTML( "<li>$checkBox $pageLink . . $userLink $stxt $comment</li>\n" );
}
$revisions->free();