[ticket/16349] Fix merges

PHPBB3-16349
This commit is contained in:
rubencm 2020-02-02 21:09:21 +00:00
parent a6cd4df423
commit ebdb771a0a
2 changed files with 1 additions and 45 deletions

View file

@ -1451,50 +1451,6 @@ class acp_attachments
return $group_select;
}
/**
* Test Settings
*/
function test_upload(&$error, $upload_dir, $create_directory = false)
{
global $user, $phpbb_root_path;
// Does the target directory exist, is it a directory and writable.
if ($create_directory)
{
if (!file_exists($phpbb_root_path . $upload_dir))
{
@mkdir($phpbb_root_path . $upload_dir, 0777);
try
{
$this->filesystem->phpbb_chmod($phpbb_root_path . $upload_dir, CHMOD_READ | CHMOD_WRITE);
}
catch (\phpbb\filesystem\exception\filesystem_exception $e)
{
// Do nothing
}
}
}
if (!file_exists($phpbb_root_path . $upload_dir))
{
$error[] = sprintf($user->lang['NO_UPLOAD_DIR'], $upload_dir);
return;
}
if (!is_dir($phpbb_root_path . $upload_dir))
{
$error[] = sprintf($user->lang['UPLOAD_NOT_DIR'], $upload_dir);
return;
}
if (!$this->filesystem->is_writable($phpbb_root_path . $upload_dir))
{
$error[] = sprintf($user->lang['NO_WRITE_UPLOAD'], $upload_dir);
return;
}
}
/**
* Perform operations on sites for external linking
*/

View file

@ -38,7 +38,7 @@
<td class="attach-name">
<span class="file-name ellipsis-text"></span>
<span class="attach-controls">
{% if S_BBCODE_ALLOWED %}<input type="button" value="{{ lang('PLACE_INLINE') }}}" class="button1 button button-form-bold hidden file-inline-bbcode" />&nbsp;{% endif %}
{% if S_BBCODE_ALLOWED %}<input type="button" value="{{ lang('PLACE_INLINE') }}" class="button1 button button-form-bold hidden file-inline-bbcode" />&nbsp;{% endif %}
<input type="button" value="{L_DELETE_FILE}" class="button1 button button-form-bold file-delete" />
</span>
<span class="clear"></span>