*/
function showToplevel ( $namespace = NS_MAIN, $including = false ) {
global $wgOut, $wgContLang;
- $fname = "indexShowToplevel";
$align = $wgContLang->isRtl() ? 'left' : 'right';
# TODO: Either make this *much* faster or cache the title index points
if ( ! $dbr->implicitOrderby() ) {
$options['ORDER BY'] = 'page_title';
}
- $firstTitle = $dbr->selectField( 'page', 'page_title', $where, $fname, $options );
+ $firstTitle = $dbr->selectField( 'page', 'page_title', $where, __METHOD__, $options );
$lastTitle = $firstTitle;
# This array is going to hold the page_titles in order.
'page', /* FROM */
'page_title', /* WHAT */
$where + array( $chunk),
- $fname,
+ __METHOD__,
array ('LIMIT' => 2, 'OFFSET' => $this->maxPerPage - 1, 'ORDER BY' => 'page_title') );
if ( $s = $dbr->fetchObject( $res ) ) {
array(
'page_namespace' => $namespace,
$chunk
- ), $fname );
+ ), __METHOD__ );
array_push( $lines, $endTitle );
$done = true;
}
function showChunk( $namespace = NS_MAIN, $from, $including = false ) {
global $wgOut, $wgUser, $wgContLang;
- $fname = 'indexShowChunk';
$sk = $wgUser->getSkin();
$fromList = $this->getNamespaceKeyAndText($namespace, $from);
'page_namespace' => $namespace,
'page_title >= ' . $dbr->addQuotes( $fromKey )
),
- $fname,
+ __METHOD__,
array(
'ORDER BY' => 'page_title',
'LIMIT' => $this->maxPerPage + 1,
'page',
'page_title',
array( 'page_namespace' => $namespace, 'page_title < '.$dbr->addQuotes($from) ),
- $fname,
+ __METHOD__,
array( 'ORDER BY' => 'page_title DESC', 'LIMIT' => $this->maxPerPage, 'OFFSET' => ($this->maxPerPage - 1 ) )
);
if ( ! $dbr->implicitOrderby() ) {
$options['ORDER BY'] = 'page_title';
}
- $reallyFirstPage_title = $dbr->selectField( 'page', 'page_title', array( 'page_namespace' => $namespace ), $fname, $options );
+ $reallyFirstPage_title = $dbr->selectField( 'page', 'page_title', array( 'page_namespace' => $namespace ), __METHOD__, $options );
# Show the previous link if it s not the current requested chunk
if( $from != $reallyFirstPage_title ) {
$prevTitle = Title::makeTitle( $namespace, $reallyFirstPage_title );