User:Lysander/UploadPermissionsError: Difference between revisions

From BoyWiki
No edit summary
(Redirected page to User:Lysander)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Installation==
#redirect [[User:Lysander]]
[https://github.com/lInclumedia/UploadPermissionsError/archive/master.zip Download] and place the file(s) in a directory called <code>UploadPermissionsError</code> in your <code>extensions/</code> folder.
Add the following code at the bottom of your LocalSettings.php:
<pre>require_once "$IP/extensions/UploadPermissionsError/UploadPermissionsError.php";</pre>
Hack <code>specials/SpecialUpload.php</code> by changing:
<pre> if ( $permissionRequired !== true ) {
throw new PermissionsError( $permissionRequired );
}</pre>
to:
<pre> if ( $permissionRequired !== true ) {
Hooks::run( 'UploadForm:permissionRequired',
array( &$permissionRequired ) );
throw new PermissionsError( $permissionRequired );
}</pre>
Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

Latest revision as of 21:44, 7 March 2015

Redirect to: