aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/avatar
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-19 14:39:14 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-19 14:39:14 +0200
commita6fd55db354c91dcd0220ab66ebf1036f5f05d85 (patch)
tree2d8b997eae6b674d0c0f195e522ae3418bbf78fe /phpBB/phpbb/avatar
parentdfd5ec6835f7cd4dd9a248c8a55da35c2032d98c (diff)
parent5b8a721b73122ee25b332ac06ce723c8756acead (diff)
downloadforums-a6fd55db354c91dcd0220ab66ebf1036f5f05d85.tar
forums-a6fd55db354c91dcd0220ab66ebf1036f5f05d85.tar.gz
forums-a6fd55db354c91dcd0220ab66ebf1036f5f05d85.tar.bz2
forums-a6fd55db354c91dcd0220ab66ebf1036f5f05d85.tar.xz
forums-a6fd55db354c91dcd0220ab66ebf1036f5f05d85.zip
Merge pull request #3647 from marc1706/ticket/13799
[ticket/13799] Do not rawurlencode category in gallery avatar * marc1706/ticket/13799: [ticket/13799] Split lines in HTML files for better readability [ticket/13799] Add missing space before checked attribute [ticket/13799] Correctly urlencode category and show selected avatar [ticket/13799] Do not rawurlencode category in gallery avatar
Diffstat (limited to 'phpBB/phpbb/avatar')
-rw-r--r--phpBB/phpbb/avatar/driver/local.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/phpbb/avatar/driver/local.php b/phpBB/phpbb/avatar/driver/local.php
index 36087f8ba0..75c384f31e 100644
--- a/phpBB/phpbb/avatar/driver/local.php
+++ b/phpBB/phpbb/avatar/driver/local.php
@@ -84,11 +84,13 @@ class local extends \phpbb\avatar\driver\driver
'AVATAR_IMAGE' => $this->phpbb_root_path . $this->config['avatar_gallery_path'] . '/' . $img['file'],
'AVATAR_NAME' => $img['name'],
'AVATAR_FILE' => $img['filename'],
+ 'CHECKED' => $img['file'] === $row['avatar'],
));
$template->assign_block_vars('avatar_local_row.avatar_local_option', array(
'AVATAR_FILE' => $img['filename'],
- 'S_OPTIONS_AVATAR' => $img['filename']
+ 'S_OPTIONS_AVATAR' => $img['filename'],
+ 'CHECKED' => $img['file'] === $row['avatar'],
));
$col_count = ($col_count + 1) % $table_cols;
@@ -182,7 +184,7 @@ class local extends \phpbb\avatar\driver\driver
}
$cat = ($path == $file_path) ? $user->lang['NO_AVATAR_CATEGORY'] : str_replace("$path/", '', $file_path);
$avatar_list[$cat][$image] = array(
- 'file' => ($cat != $user->lang['NO_AVATAR_CATEGORY']) ? rawurlencode($cat) . '/' . rawurlencode($image) : rawurlencode($image),
+ 'file' => ($cat != $user->lang['NO_AVATAR_CATEGORY']) ? str_replace('%2F', '/', rawurlencode($cat)) . '/' . rawurlencode($image) : rawurlencode($image),
'filename' => rawurlencode($image),
'name' => ucfirst(str_replace('_', ' ', preg_replace('#^(.*)\..*$#', '\1', $image))),
'width' => $dims[0],