class SpecialGlobalFileUsage extends SpecialPage {
public function __construct() {
- parent::__construct( 'GlobalFileUsage' );
+ parent::__construct( 'Globalfileusage' );
}
/**
$this->showResult();
}
-
+
/**
* Shows the search form
*/
// Filter local checkbox
. "\n\t<p>" . Xml::checkLabel( wfMsg( 'globalfileusage-filterlocal' ),
'filterlocal', 'mw-filterlocal', $this->filterLocal ) . '</p>';
-
+
if ( !is_null( $this->target ) && wfFindFile( $this->target ) ) {
// Show the image if it exists
global $wgUser, $wgContLang;
/* $handlerParams */ array(), /* $framed */ false,
/* $thumb */ true );
}
-
+
// Wrap the entire form in a nice fieldset
$html .= Xml::fieldSet( wfMsg( 'globalfileusage-text' ), $formContent ) . "\n</form>";
/**
* Helper function to create the navbar, stolen from wfViewPrevNext
- *
+ *
* @param $query GlobalUsageQuery An executed GlobalUsageQuery object
* @return string Navbar HTML
*/
$target = $this->target->getText();
$limit = $query->getLimit();
$fmtLimit = $wgLang->formatNum( $limit );
-
+
# Find out which strings are for the prev and which for the next links
$offset = $query->getOffsetString();
$continue = $query->getContinueFileString();
$numLinks = array();
foreach ( array( 20, 50, 100, 250, 500 ) as $num ) {
$fmtLimit = $wgLang->formatNum( $num );
-
+
$q = array( 'offset' => $offset, 'limit' => $num, 'target' => $target );
if ( $this->filterLocal )
$q['filterlocal'] = '1';
* to show the usage of a template instead of a file.
* Special page to show global template usage. Also contains hook functions for
* showing usage on an template page.
- *
+ *
* @author Bryan Tong Minh <bryan.tongminh@gmail.com>
* @author Peter Potrowl <peter017@gmail.com>
*/
class SpecialGlobalTemplateUsage extends SpecialPage {
public function __construct() {
- parent::__construct( 'GlobalTemplateUsage' );
+ parent::__construct( 'Globaltemplateusage' );
}
/**
$this->showResult();
}
-
+
/**
* Shows the search form
*/
'type' => 'submit',
'value' => wfMsg( 'globaltemplateusage-ok' )
) );
-
+
// Wrap the entire form in a nice fieldset
$html .= Xml::fieldSet( wfMsg( 'globaltemplateusage-text' ), $formContent ) . "\n</form>";
if ( $wgRequest->getText( 'from' ) ) {
$query->setOffset( $wgRequest->getText( 'from' ) );
} elseif ( $wgRequest->getText( 'to' ) ) {
- $query->setOffset( $wgRequest->getText( 'to' ), true );
+ $query->setOffset( $wgRequest->getText( 'to' ), true );
}
$query->setLimit( $wgRequest->getInt( 'limit', 50 ) );
// Bottom navbar
$wgOut->addHtml( $navbar );
}
-
+
/**
* Helper to format a specific item
*/
/**
* Helper function to create the navbar, stolen from wfViewPrevNext
- *
+ *
* @param $query GlobalTemplateUsageQuery An executed GlobalTemplateUsageQuery object
* @return string Navbar HTML
*/
$target = $this->target->getPrefixedText();
$limit = $query->getLimit();
$fmtLimit = $wgLang->formatNum( $limit );
-
+
# Find out which strings are for the prev and which for the next links
$offset = $query->getOffsetString();
$continue = $query->getContinueTemplateString();
$numLinks = array();
foreach ( array( 20, 50, 100, 250, 500 ) as $num ) {
$fmtLimit = $wgLang->formatNum( $num );
-
+
$q = array( 'offset' => $offset, 'limit' => $num, 'target' => $target );
$lTitle = wfMsgExt( 'shown-title', array( 'parsemag', 'escape' ), $num );
$attr = array( 'title' => $lTitle, 'class' => 'mw-numlink' );