Merge "Add parser tests about building table with {{!}}"
[lhc/web/wiklou.git] / includes / specials / SpecialLockdb.php
index 3382405..1c1f125 100644 (file)
@@ -38,11 +38,9 @@ class SpecialLockdb extends FormSpecialPage {
        }
 
        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' );
                }
        }
@@ -69,14 +67,14 @@ class SpecialLockdb extends FormSpecialPage {
        }
 
        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 ) {