Merge pull request #5847 from rubencm/ticket/16349

[ticket/16349] Fix merge issues in acp_attachments and posting_attach_body.html
This commit is contained in:
Marc Alexander 2020-02-12 07:17:32 +01:00 committed by GitHub
commit 0ceebede32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 45 deletions

View file

@ -1453,50 +1453,6 @@ class acp_attachments
return $group_select; 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 * Perform operations on sites for external linking
*/ */

View file

@ -38,7 +38,7 @@
<td class="attach-name"> <td class="attach-name">
<span class="file-name ellipsis-text"></span> <span class="file-name ellipsis-text"></span>
<span class="attach-controls"> <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" /> <input type="button" value="{L_DELETE_FILE}" class="button1 button button-form-bold file-delete" />
</span> </span>
<span class="clear"></span> <span class="clear"></span>