$namespaces = $this->getContext()->getLanguage()->getNamespaces();
$out->setPageTitle(
- ( $namespace > 0 && in_array( $namespace, array_keys( $namespaces ) ) ) ?
+ ( $namespace > 0 && array_key_exists( $namespace, $namespaces ) ) ?
$this->msg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) :
$this->msg( 'allarticles' )
);
/**
* HTML for the top form
*
- * @param $namespace Integer: a namespace constant (default NS_MAIN).
- * @param string $from dbKey we are starting listing at.
- * @param string $to dbKey we are ending listing at.
- * @param bool $hideredirects dont show redirects (default FALSE)
+ * @param int $namespace A namespace constant (default NS_MAIN).
+ * @param string $from DbKey we are starting listing at.
+ * @param string $to DbKey we are ending listing at.
+ * @param bool $hideredirects Dont show redirects (default false)
* @return string
*/
function namespaceForm( $namespace = NS_MAIN, $from = '', $to = '', $hideredirects = false ) {
}
/**
- * @param $namespace Integer (default NS_MAIN)
- * @param string $from list all pages from this name
- * @param string $to list all pages to this name
- * @param bool $hideredirects dont show redirects (default FALSE)
+ * @param int $namespace (default NS_MAIN)
+ * @param string $from List all pages from this name
+ * @param string $to List all pages to this name
+ * @param bool $hideredirects Dont show redirects (default false)
*/
function showToplevel( $namespace = NS_MAIN, $from = '', $to = '', $hideredirects = false ) {
$output = $this->getOutput();
// since generating it will cause a lot of scanning
if ( $count > $this->maxTopLevelPages ) {
$this->showChunk( $namespace, $from, $to, $hideredirects );
+
return;
}
/**
* Show a line of "ABC to DEF" ranges of articles
*
- * @param string $inpoint lower limit of pagenames
- * @param string $outpoint upper limit of pagenames
- * @param $namespace Integer (Default NS_MAIN)
- * @param bool $hideRedirects don't show redirects. Default: false
+ * @param string $inpoint Lower limit of pagenames
+ * @param string $outpoint Upper limit of pagenames
+ * @param int $namespace (Default NS_MAIN)
+ * @param bool $hideRedirects Don't show redirects. Default: false
* @return string
*/
function showline( $inpoint, $outpoint, $namespace = NS_MAIN, $hideRedirects = false ) {
/**
* @param int $namespace Namespace (Default NS_MAIN)
- * @param string $from list all pages from this name (default FALSE)
- * @param string $to list all pages to this name (default FALSE)
- * @param bool $hideredirects dont show redirects (default FALSE)
+ * @param string $from List all pages from this name (default FALSE)
+ * @param string $to List all pages to this name (default FALSE)
+ * @param bool $hideredirects Dont show redirects (default FALSE)
*/
function showChunk( $namespace = NS_MAIN, $from = false, $to = false, $hideredirects = false ) {
$output = $this->getOutput();
if ( !$fromList || !$toList ) {
$out = $this->msg( 'allpagesbadtitle' )->parseAsBlock();
- } elseif ( !in_array( $namespace, array_keys( $namespaces ) ) ) {
+ } elseif ( !array_key_exists( $namespace, $namespaces ) ) {
// Show errormessage and reset to NS_MAIN
$out = $this->msg( 'allpages-bad-ns', $namespace )->parse();
$namespace = NS_MAIN;
}
/**
- * @param $ns Integer: the namespace of the article
- * @param string $text the name of the article
+ * @param int $ns The namespace of the article
+ * @param string $text The name of the article
* @return array( int namespace, string dbkey, string pagename ) or NULL on error
*/
protected function getNamespaceKeyAndText( $ns, $text ) {