}
public function checkExecutePermissions( User $user ) {
- global $wgReadOnlyFile;
-
parent::checkExecutePermissions( $user );
# If the lock file isn't writable, we can do sweet bugger all
- if ( !is_writable( dirname( $wgReadOnlyFile ) ) ) {
+ if ( !is_writable( dirname( $this->getConfig()->get( 'ReadOnlyFile' ) ) ) ) {
throw new ErrorPageError( 'lockdb', 'lockfilenotwritable' );
}
}
}
public function onSubmit( array $data ) {
- global $wgContLang, $wgReadOnlyFile;
+ global $wgContLang;
if ( !$data['Confirm'] ) {
return Status::newFatal( 'locknoconfirm' );
}
wfSuppressWarnings();
- $fp = fopen( $wgReadOnlyFile, 'w' );
+ $fp = fopen( $this->getConfig()->get( 'ReadOnlyFile' ), 'w' );
wfRestoreWarnings();
if ( false === $fp ) {
}
function execute( $par ) {
- global $wgScript;
-
$mime = $par ? $par : $this->getRequest()->getText( 'mime' );
$mime = trim( $mime );
$this->getOutput()->addHTML(
Xml::openElement(
'form',
- array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => $wgScript )
+ array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => wfScript() )
) .
Xml::openElement( 'fieldset' ) .
Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) .
}
function showMergeForm() {
- global $wgScript;
-
$this->getOutput()->addWikiMsg( 'mergehistory-header' );
$this->getOutput()->addHTML(
Xml::openElement( 'form', array(
'method' => 'get',
- 'action' => $wgScript ) ) .
+ 'action' => wfScript() ) ) .
'<fieldset>' .
Xml::element( 'legend', array(),
$this->msg( 'mergehistory-box' )->text() ) .