1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-20 07:42:09 +02:00

Merge branch 'develop-olympus' into develop

* develop-olympus:
  [ticket/10407] Fix check for empty image paths in convertor
  [ticket/10407] Fix check for empty image paths in convertor
This commit is contained in:
Andreas Fischer 2012-01-02 19:54:46 +01:00
commit 2f010fe96e

View File

@ -423,7 +423,8 @@ function import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false
$relative_path = empty($convert->convertor['source_path_absolute']);
if (empty($convert->convertor['avatar_gallery_path']))
// check for trailing slash
if (rtrim($convert->convertor['avatar_gallery_path'], '/') === '')
{
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_GALLERY_PATH'], 'import_avatar_gallery()'), __LINE__, __FILE__);
}
@ -587,7 +588,8 @@ function import_attachment($source, $use_target = false)
global $convert, $phpbb_root_path, $config, $user;
if (empty($convert->convertor['upload_path']))
// check for trailing slash
if (rtrim($convert->convertor['upload_path'], '/') === '')
{
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_UPLOAD_DIR'], 'import_attachment()'), __LINE__, __FILE__);
}
@ -646,7 +648,8 @@ function import_smiley($source, $use_target = false)
global $convert, $phpbb_root_path, $config, $user;
if (!isset($convert->convertor['smilies_path']))
// check for trailing slash
if (rtrim($convert->convertor['smilies_path'], '/') === '')
{
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_SMILIES_PATH'], 'import_smiley()'), __LINE__, __FILE__);
}
@ -666,7 +669,8 @@ function import_avatar($source, $use_target = false, $user_id = false)
global $convert, $phpbb_root_path, $config, $user;
if (!isset($convert->convertor['avatar_path']))
// check for trailing slash
if (rtrim($convert->convertor['avatar_path'], '/') === '')
{
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_AVATAR_PATH'], 'import_avatar()'), __LINE__, __FILE__);
}