mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
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:
commit
0ceebede32
2 changed files with 1 additions and 45 deletions
|
@ -1453,50 +1453,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
|
||||
*/
|
||||
|
|
|
@ -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" /> {% endif %}
|
||||
{% if S_BBCODE_ALLOWED %}<input type="button" value="{{ lang('PLACE_INLINE') }}" class="button1 button button-form-bold hidden file-inline-bbcode" /> {% endif %}
|
||||
<input type="button" value="{L_DELETE_FILE}" class="button1 button button-form-bold file-delete" />
|
||||
</span>
|
||||
<span class="clear"></span>
|
||||
|
|
Loading…
Add table
Reference in a new issue