* @subpackage SpecialPage
*/
-/**
- *
- */
-require_once( 'QueryPage.php' );
-
/**
*
* @package MediaWiki
global $wgLang, $wgContLang, $wgUser, $wgUseRCPatrol;
$u = $result->user;
$ut = $result->user_text;
+ $dirmark = $wgContLang->getDirMark(); // To keep text in correct order
- $length = wfMsgHtml( 'nbytes', htmlspecialchars( $wgLang->formatNum( $result->length ) ) );
+ $length = wfMsgExt( 'nbytes', array('parsemag', 'escape'),
+ $wgLang->formatNum( $result->length ) );
$d = $wgLang->timeanddate( $result->timestamp, true );
# Since there is no diff link, we need to give users a way to
$link = $skin->makeKnownLink( $ns . ':' . $result->title, '' );
}
- $userTools = $skin->userLink( $u, $ut ) . $skin->userToolLinks( $u, $ut );
+ $userLink = $skin->userLink( $u, $ut );
+ $userTools = $skin->userToolLinks( $u, $ut );
- $s = "{$d} {$link} ({$length}) . . {$userTools}";
- $s .= $skin->commentBlock( $result->comment );
+ $s = "{$d} {$dirmark}{$link} {$dirmark}({$length}) . . " .
+ "{$dirmark}{$userLink}{$dirmark}{$userTools}";
+ $s .= $dirmark . $skin->commentBlock( $result->comment );
return $s;
}
}
return parent::feedItemDesc( $row );
}
+
+ /**
+ * Show a namespace selection form for filtering
+ *
+ * @return string
+ */
+ function getPageHeader() {
+ $thisTitle = Title::makeTitle( NS_SPECIAL, $this->getName() );
+ $form = wfOpenElement( 'form', array(
+ 'method' => 'post',
+ 'action' => $thisTitle->getLocalUrl() ) );
+ $form .= wfElement( 'label', array( 'for' => 'namespace' ),
+ wfMsg( 'namespace' ) ) . ' ';
+ $form .= HtmlNamespaceSelector( $this->namespace );
+ # Preserve the offset and limit
+ $form .= wfElement( 'input', array(
+ 'type' => 'hidden',
+ 'name' => 'offset',
+ 'value' => $this->offset ) );
+ $form .= wfElement( 'input', array(
+ 'type' => 'hidden',
+ 'name' => 'limit',
+ 'value' => $this->limit ) );
+ $form .= wfElement( 'input', array(
+ 'type' => 'submit',
+ 'name' => 'submit',
+ 'id' => 'submit',
+ 'value' => wfMsg( 'allpagessubmit' ) ) );
+ $form .= wfCloseElement( 'form' );
+ return( $form );
+ }
+
+ /**
+ * Link parameters
+ *
+ * @return array
+ */
+ function linkParameters() {
+ return( array( 'namespace' => $this->namespace ) );
+ }
+
}
/**
}
}
}
+ } else {
+ if( $ns = $wgRequest->getInt( 'namespace', 0 ) )
+ $namespace = $ns;
}
+
if ( ! isset( $shownavigation ) )
$shownavigation = ! $specialPage->including();
$npp = new NewPagesPage( $namespace );
- if ( ! $npp->doFeed( $wgRequest->getVal( 'feed' ) ) )
+ if ( ! $npp->doFeed( $wgRequest->getVal( 'feed' ), $limit ) )
$npp->doQuery( $offset, $limit, $shownavigation );
}