forked from ZwiiCMS-Team/ZwiiCMS
[9.1.13] erreur supp metaimage
This commit is contained in:
parent
783bf103eb
commit
528153e13c
@ -240,7 +240,9 @@ class config extends common {
|
|||||||
$data = 'data:image/jpeg;base64,'.$screenshot;
|
$data = 'data:image/jpeg;base64,'.$screenshot;
|
||||||
$data = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $data));
|
$data = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $data));
|
||||||
// Effacer la miniature
|
// Effacer la miniature
|
||||||
|
if (file_exists(self::FILE_DIR.'thumb/screenshot.png')) {
|
||||||
unlink (self::FILE_DIR.'thumb/screenshot.png');
|
unlink (self::FILE_DIR.'thumb/screenshot.png');
|
||||||
|
}
|
||||||
file_put_contents( self::FILE_DIR.'source/screenshot.png',$data);
|
file_put_contents( self::FILE_DIR.'source/screenshot.png',$data);
|
||||||
$success =true;
|
$success =true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user