mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-05 17:32:25 +02:00
Fixed Issue ID 0000494: Stats do not currently include Uploads
Fixed: Error when thumbnail directory not exists Fixed: Apply current translation norme Fixed: Improvement style sheet (like other PWG sheet) git-svn-id: http://piwigo.org/svn/trunk@1631 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -215,6 +215,34 @@ function get_dirs($directory)
|
||||
return $sub_dirs;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns thumbnail directory name of input diretoty name
|
||||
* make thumbnail directory is necessary
|
||||
* set error messages on array messages
|
||||
*
|
||||
* @param:
|
||||
* string $dirname
|
||||
* arrayy $errors
|
||||
* @return bool false on error else string directory name
|
||||
*/
|
||||
function mkget_thumbnail_dir($dirname, &$errors)
|
||||
{
|
||||
$tndir = $dirname.'/thumbnail';
|
||||
if (!is_dir($tndir))
|
||||
{
|
||||
if (!is_writable($dirname))
|
||||
{
|
||||
array_push($errors,
|
||||
'['.$dirname.'] : '.l10n('no_write_access'));
|
||||
return false;
|
||||
}
|
||||
umask(0000);
|
||||
mkdir($tndir, 0777);
|
||||
}
|
||||
|
||||
return $tndir;
|
||||
}
|
||||
|
||||
// The get_picture_size function return an array containing :
|
||||
// - $picture_size[0] : final width
|
||||
// - $picture_size[1] : final height
|
||||
|
||||
Reference in New Issue
Block a user