mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-22 03:08:54 +00:00
Merge pull request #2552 from marc1706/ticket/12666
[ticket/12666] Use "None" for images in root of gallery avatar path * marc1706/ticket/12666: [ticket/12666] Use "None" for images in root of gallery avatar path
This commit is contained in:
commit
1f78ab536b
4 changed files with 3 additions and 6 deletions
|
@ -1,7 +1,6 @@
|
|||
<dl>
|
||||
<dt><label for="category">{L_AVATAR_CATEGORY}{L_COLON}</label></dt>
|
||||
<dd><select name="avatar_local_cat" id="category">
|
||||
<option value="">{L_NO_AVATAR_CATEGORY}</option>
|
||||
<!-- BEGIN avatar_local_cats -->
|
||||
<option value="{avatar_local_cats.NAME}"<!-- IF avatar_local_cats.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_local_cats.NAME}</option>
|
||||
<!-- END avatar_local_cats -->
|
||||
|
|
|
@ -131,7 +131,7 @@ class local extends \phpbb\avatar\driver\driver
|
|||
}
|
||||
|
||||
return array(
|
||||
'avatar' => ($category != $user->lang['MAIN']) ? $category . '/' . $file : $file,
|
||||
'avatar' => ($category != $user->lang['NO_AVATAR_CATEGORY']) ? $category . '/' . $file : $file,
|
||||
'avatar_width' => $avatar_list[$category][urldecode($file)]['width'],
|
||||
'avatar_height' => $avatar_list[$category][urldecode($file)]['height'],
|
||||
);
|
||||
|
@ -179,9 +179,9 @@ class local extends \phpbb\avatar\driver\driver
|
|||
{
|
||||
$dims = array(0, 0);
|
||||
}
|
||||
$cat = ($path == $file_path) ? $user->lang['MAIN'] : str_replace("$path/", '', $file_path);
|
||||
$cat = ($path == $file_path) ? $user->lang['NO_AVATAR_CATEGORY'] : str_replace("$path/", '', $file_path);
|
||||
$avatar_list[$cat][$image] = array(
|
||||
'file' => ($cat != $user->lang['MAIN']) ? rawurlencode($cat) . '/' . rawurlencode($image) : rawurlencode($image),
|
||||
'file' => ($cat != $user->lang['NO_AVATAR_CATEGORY']) ? rawurlencode($cat) . '/' . rawurlencode($image) : rawurlencode($image),
|
||||
'filename' => rawurlencode($image),
|
||||
'name' => ucfirst(str_replace('_', ' ', preg_replace('#^(.*)\..*$#', '\1', $image))),
|
||||
'width' => $dims[0],
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<!-- IF .avatar_local_cats -->
|
||||
<label for="category">{L_AVATAR_CATEGORY}{L_COLON} <select name="avatar_local_cat" id="category">
|
||||
<option value="">{L_NO_AVATAR_CATEGORY}</option>
|
||||
<!-- BEGIN avatar_local_cats -->
|
||||
<option value="{avatar_local_cats.NAME}"<!-- IF avatar_local_cats.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_local_cats.NAME}</option>
|
||||
<!-- END avatar_local_cats -->
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<!-- IF .avatar_local_cats -->
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="center" valign="middle"><span class="genmed">{L_AVATAR_CATEGORY}{L_COLON} </span><select name="avatar_local_cat" id="category">
|
||||
<option value="">{L_NO_AVATAR_CATEGORY}</option>
|
||||
<!-- BEGIN avatar_local_cats -->
|
||||
<option value="{avatar_local_cats.NAME}"<!-- IF avatar_local_cats.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_local_cats.NAME}</option>
|
||||
<!-- END avatar_local_cats -->
|
||||
|
|
Loading…
Add table
Reference in a new issue