User:Lysander/UploadPermissionsError

From BoyWiki

Installation

Download and place the file(s) in a directory called UploadPermissionsError in your extensions/ folder. Add the following code at the bottom of your LocalSettings.php:

require_once "$IP/extensions/UploadPermissionsError/UploadPermissionsError.php";

Hack SpecialUpload.php by changing:

		if ( $permissionRequired !== true ) {
			throw new PermissionsError( $permissionRequired );
		}

to:

		if ( $permissionRequired !== true ) {
			Hooks::run( 'UploadForm:permissionRequired',
				array( &$permissionRequired ) );
			throw new PermissionsError( $permissionRequired );
		}

Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.