class SpecialNewpages extends IncludableSpecialPage {
// Stored objects
- protected $opts, $skin;
+
+ /**
+ * @var FormOptions
+ */
+ protected $opts;
+
+ /**
+ * @var Skin
+ */
+ protected $skin;
// Some internal settings
protected $showNavigation = false;
Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) .
Xml::fieldset( wfMsg( 'newpages' ) ) .
Xml::openElement( 'table', array( 'id' => 'mw-newpages-table' ) ) .
- "<tr>
- <td class='mw-label'>" .
+ '<tr>
+ <td class="mw-label">' .
Xml::label( wfMsg( 'namespace' ), 'namespace' ) .
- "</td>
- <td class='mw-input'>" .
+ '</td>
+ <td class="mw-input">' .
Xml::namespaceSelector( $namespace, 'all' ) .
- "</td>
- </tr>" . ( $tagFilter ? (
- "<tr>
- <td class='mw-label'>" .
+ '</td>
+ </tr>' . ( $tagFilter ? (
+ '<tr>
+ <td class="mw-label">' .
$tagFilterLabel .
- "</td>
- <td class='mw-input'>" .
+ '</td>
+ <td class="mw-input">' .
$tagFilterSelector .
- "</td>
- </tr>" ) : '' ) .
+ '</td>
+ </tr>' ) : '' ) .
( $wgEnableNewpagesUserFilter ?
- "<tr>
- <td class='mw-label'>" .
+ '<tr>
+ <td class="mw-label">' .
Xml::label( wfMsg( 'newpages-username' ), 'mw-np-username' ) .
- "</td>
- <td class='mw-input'>" .
+ '</td>
+ <td class="mw-input">' .
Xml::input( 'username', 30, $userText, array( 'id' => 'mw-np-username' ) ) .
- "</td>
- </tr>" : '' ) .
- "<tr> <td></td>
- <td class='mw-submit'>" .
+ '</td>
+ </tr>' : '' ) .
+ '<tr> <td></td>
+ <td class="mw-submit">' .
Xml::submitButton( wfMsg( 'allpagessubmit' ) ) .
- "</td>
- </tr>" .
- "<tr>
+ '</td>
+ </tr>' .
+ '<tr>
<td></td>
- <td class='mw-input'>" .
+ <td class="mw-input">' .
$this->filterLinks() .
- "</td>
- </tr>" .
+ '</td>
+ </tr>' .
Xml::closeElement( 'table' ) .
Xml::closeElement( 'fieldset' ) .
$hidden .
public function formatRow( $result ) {
global $wgLang, $wgContLang;
+ # Revision deletion works on revisions, so we should cast one
+ $row = array(
+ 'comment' => $result->rc_comment,
+ 'deleted' => $result->rc_deleted,
+ 'user_text' => $result->rc_user_text,
+ 'user' => $result->rc_user,
+ );
+ $rev = new Revision( $row );
+
$classes = array();
-
+
$dm = $wgContLang->getDirMark();
$title = Title::makeTitleSafe( $result->rc_namespace, $result->rc_title );
'[' . wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), $wgLang->formatNum( $result->length ) ) .
']'
);
- $ulink = $this->skin->userLink( $result->rc_user, $result->rc_user_text ) . ' ' .
- $this->skin->userToolLinks( $result->rc_user, $result->rc_user_text );
- $comment = $this->skin->commentBlock( $result->rc_comment );
-
+
+ $ulink = $this->skin->revUserTools( $rev );
+ $comment = $this->skin->revComment( $rev );
+
if ( $this->patrollable( $result ) ) {
$classes[] = 'not-patrolled';
}
'fields' => array(
'rc_namespace', 'rc_title', 'rc_cur_id', 'rc_user',
'rc_user_text', 'rc_comment', 'rc_timestamp', 'rc_patrolled',
- 'rc_id', 'page_len AS length', 'page_latest AS rev_id',
+ 'rc_id', 'rc_deleted', 'page_len AS length', 'page_latest AS rev_id',
'ts_tags'
),
'conds' => $conds,