}
function execute( $par ) {
- global $wgUrlProtocols, $wgMiserMode, $wgScript;
-
$this->initServices();
$this->setHeaders();
$namespace = $request->getIntorNull( 'namespace', null );
$protocols_list = array();
- foreach ( $wgUrlProtocols as $prot ) {
+ foreach ( $this->getConfig()->get( 'UrlProtocols' ) as $prot ) {
if ( $prot !== '//' ) {
$protocols_list[] = $prot;
}
);
$s = Html::openElement(
'form',
- array( 'id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $wgScript )
+ array( 'id' => 'mw-linksearch-form', 'method' => 'get', 'action' => wfScript() )
) . "\n" .
Html::hidden( 'title', $this->getPageTitle()->getPrefixedDBkey() ) . "\n" .
Html::openElement( 'fieldset' ) . "\n" .
)
) . "\n";
- if ( !$wgMiserMode ) {
+ if ( !$this->getConfig()->get( 'MiserMode' ) ) {
$s .= Html::namespaceSelector(
array(
'selected' => $namespace,
}
function linkParameters() {
- global $wgMiserMode;
$params = array();
$params['target'] = $this->mProt . $this->mQuery;
- if ( $this->mNs !== null && !$wgMiserMode ) {
+ if ( $this->mNs !== null && !$this->getConfig()->get( 'MiserMode' ) ) {
$params['namespace'] = $this->mNs;
}
}
function getQueryInfo() {
- global $wgMiserMode;
$dbr = wfGetDB( DB_SLAVE );
// strip everything past first wildcard, so that
// index-based-only lookup would be done
'options' => array( 'USE INDEX' => $clause )
);
- if ( $this->mNs !== null && !$wgMiserMode ) {
+ if ( $this->mNs !== null && !$this->getConfig()->get( 'MiserMode' ) ) {
$retval['conds']['page_namespace'] = $this->mNs;
}