# GET values
$from = $wgRequest->getVal( 'from' );
$namespace = $wgRequest->getInt( 'namespace' );
-
+
$namespaces = $wgContLang->getNamespaces();
$indexPage = new SpecialAllpages();
wfMsg( 'allinnamespace', $namespaces[$namespace] ) :
wfMsg( 'allarticles' )
);
-
+
if ( isset($par) ) {
$indexPage->showChunk( $namespace, $par, $specialPage->including() );
} elseif ( isset($from) ) {
var $maxPerPage=960;
var $topLevelMax=50;
var $name='Allpages';
+ # Determines, which message describes the input field 'nsfrom' (->SpecialPrefixindex.php)
+ var $nsfromMsg='allpagesfrom';
/**
* HTML for the top form
$frombox = "<input type='text' size='20' name='from' id='nsfrom' value=\""
. htmlspecialchars ( $from ) . '"/>';
$submitbutton = '<input type="submit" value="' . wfMsgHtml( 'allpagessubmit' ) . '" />';
-
+
$out = "<div class='namespaceoptions'><form method='get' action='{$wgScript}'>";
$out .= '<input type="hidden" name="title" value="'.$t->getPrefixedText().'" />';
$out .= "
<table id='nsselect' class='allpages'>
<tr>
- <td align='right'>" . wfMsgHtml('allpagesfrom') . "</td>
+ <td align='right'>" . wfMsgHtml($this->nsfromMsg) . "</td>
<td align='left'><label for='nsfrom'>$frombox</label></td>
</tr>
- <tr>
+ <tr>
<td align='right'><label for='namespace'>" . wfMsgHtml('namespace') . "</label></td>
<td align='left'>
$namespaceselect $submitbutton
global $wgMemc, $wgDBname;
$key = "$wgDBname:allpages:ns:$namespace";
$lines = $wgMemc->get( $key );
-
+
if( !is_array( $lines ) ) {
$firstTitle = $dbr->selectField( 'page', 'page_title', $where, $fname, array( 'LIMIT' => 1 ) );
$lastTitle = $firstTitle;
-
+
# This array is going to hold the page_titles in order.
$lines = array( $firstTitle );
-
+
# If we are going to show n rows, we need n+1 queries to find the relevant titles.
$done = false;
for( $i = 0; !$done; ++$i ) {
}
$wgMemc->add( $key, $lines, 3600 );
}
-
+
// If there are only two or less sections, don't even display them.
// Instead, display the first section directly.
if( count( $lines ) <= 2 ) {
- $this->showChunk( $namespace, '', false, $including );
+ $this->showChunk( $namespace, '', $including );
return;
}
}
$out .= '</table>';
$nsForm = $this->namespaceForm ( $namespace, '', false );
-
+
# Is there more?
if ( $including ) {
$out2 = '';
* @param integer $namespace (Default NS_MAIN)
*/
function showline( $inpoint, $outpoint, $namespace = NS_MAIN ) {
- global $wgOut, $wgLang, $wgUser;
+ global $wgOut, $wgUser;
$sk = $wgUser->getSkin();
$dbr =& wfGetDB( DB_SLAVE );
global $wgOut, $wgUser, $wgContLang;
$fname = 'indexShowChunk';
-
+
$sk = $wgUser->getSkin();
$fromTitle = null;
$namespace = $fromNS;
}
$fromKey = is_null( $fromTitle ) ? '' : $fromTitle->getDBkey();
-
+
$dbr =& wfGetDB( DB_SLAVE );
$res = $dbr->select( 'page',
array( 'page_namespace', 'page_title', 'page_is_redirect' ),