Author: sgaudette
Description:
I got this error for some time from mediawiki 1.19+
j'ai cette erreur depuis un certain temps sur mediawiki 1.19+
Erreur lors de la création de la miniature : Impossible d'enregistrer
la vignette sur la destination
Error creating thumbnail: Unable to save thumbnail to destination
Find this corrector on the web
j'ai trouver cette correction sur le web
http://www.mediawiki.org/wiki/Thread:Talk:MediaWiki_1.19/Thumbnails_didn%27t_work_since_Update_to_1.19
with this code the thumbnail work
avec ce code la vignette fonctionne
fichier /includes/GlobalFunctions.php
remplacer la function wfTempDir() par
file /includes/GlobalFunctions.php
replace function wfTempDir() by
function wfTempDir() {
foreach( array( 'TMPDIR', 'TMP', 'TEMP' ) as $var ) {
$tmp = getenv( $var );
if( $tmp && file_exists( $tmp ) && is_dir( $tmp ) &&
is_writable( $tmp ) ) {
return $tmp;
}
}
if (ini_get('upload_tmp_dir')!==false) {
$tmp = ini_get('upload_tmp_dir');
if( $tmp && file_exists( $tmp ) && is_dir( $tmp ) &&
is_writable( $tmp ) ) {
return $tmp;
}
}
if( function_exists( 'sys_get_temp_dir' ) ) {
$tmp = sys_get_temp_dir();
if( $tmp && file_exists( $tmp ) && is_dir( $tmp ) &&
is_writable( $tmp ) ) {
return $tmp;
}
}
Usual defaults
return wfIsWindows() ? 'C:\Windows\Temp' : '/tmp';
}
Version: 1.20.x
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=39697