Author: nickpj
Description:
Use case:
0) Wiki is a fresh SVN checkout.
- User has privs to use Special:Lockdb
- User goes to SpecialLockdb (e.g.
http://192.168.0.64/wiki/index.php?title=Special:Lockdb )
- A reason is entered, and the confirmation checkbox is ticked, and the "Lock
Database" button is clicked.
For me with error_reporting(E_ALL) enabled, and have a fresh SVN checkout, the
result is a HTML page containing this PHP warning:
<b>Warning</b>: fopen(/var/www/hosts/mediawiki/phase3/upload/lock_yBgMBwiR) [<a
href='function.fopen'>function.fopen</a>]: failed to open stream: No such file
or directory in
<b>/var/www/hosts/mediawiki/phase3/includes/SpecialLockdb.php</b> on line
<b>95</b><br />
and page that says :
Internal error
Could not find file "/var/www/hosts/mediawiki/phase3/upload/lock_yBgMBwiR".
I know that this isn't the most user-facing bit of code, but nevertheless, could
we maybe please add in something like this code from Special:Upload before
writing to this file:
/** Check if the image directory is writeable, this is a common
mistake */
if ( !is_writeable( $wgUploadDirectory ) ) { $wgOut->addWikiText( wfMsg(
'upload_directory_read_only', $wgUploadDirectory ) );
return; }
Also is it possible to perhaps create the default "wgUploadDirectory" (usually
"wiki/upload") during installation? (assuming this isn't already being done)
Version: 1.8.x
Severity: minor