diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-01-02 19:54:14 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-01-02 19:54:14 +0100 |
commit | 3e7a0a37461e95f2c97d90230745f7e273565eec (patch) | |
tree | 2d72bb6ea297c4cc000a06d09a1c0e7e2daea38a /phpBB/includes | |
parent | fd55d64996637084096ec83f84c5f007959c9fcd (diff) | |
parent | 24cf7f1d29bdfba636d9692a02188b9cddba4e1f (diff) | |
download | forums-3e7a0a37461e95f2c97d90230745f7e273565eec.tar forums-3e7a0a37461e95f2c97d90230745f7e273565eec.tar.gz forums-3e7a0a37461e95f2c97d90230745f7e273565eec.tar.bz2 forums-3e7a0a37461e95f2c97d90230745f7e273565eec.tar.xz forums-3e7a0a37461e95f2c97d90230745f7e273565eec.zip |
Merge remote-tracking branch 'Dickyf/ticket/10407a' into develop-olympus
* Dickyf/ticket/10407a:
[ticket/10407] Fix check for empty image paths in convertor
[ticket/10407] Fix check for empty image paths in convertor
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_convert.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index 4a359dcade..3b26f417e9 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -424,7 +424,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__); } @@ -588,7 +589,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__); } @@ -647,7 +649,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__); } @@ -667,7 +670,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__); } |