aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_convert.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-01-02 19:54:46 +0100
committerAndreas Fischer <bantu@phpbb.com>2012-01-02 19:54:46 +0100
commit2f010fe96e878540209f2923d7de807b77fd3420 (patch)
treeb3b8fd7b116ee8643b021550f9178c2b1c4397ed /phpBB/includes/functions_convert.php
parent6b8d5058c069b4c6198d844cd31db51c591e0c3a (diff)
parent3e7a0a37461e95f2c97d90230745f7e273565eec (diff)
downloadforums-2f010fe96e878540209f2923d7de807b77fd3420.tar
forums-2f010fe96e878540209f2923d7de807b77fd3420.tar.gz
forums-2f010fe96e878540209f2923d7de807b77fd3420.tar.bz2
forums-2f010fe96e878540209f2923d7de807b77fd3420.tar.xz
forums-2f010fe96e878540209f2923d7de807b77fd3420.zip
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
Diffstat (limited to 'phpBB/includes/functions_convert.php')
-rw-r--r--phpBB/includes/functions_convert.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index b14cda5f17..e9ec153c50 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -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__);
}