Fix hiding embed field

Resolves #145.
This commit is contained in:
Trevor Slocum 2020-12-05 18:02:24 -08:00
parent 0f7b97b659
commit c0102405bd
2 changed files with 3 additions and 3 deletions

View File

@ -405,7 +405,7 @@ if (!isset($_GET['delete']) && !isset($_GET['manage']) && (isset($_POST['name'])
if ($post['file'] == '') { // No file uploaded
$file_ok = !empty($tinyib_uploads) && ($rawpost || !in_array('file', $hide_fields));
$embed_ok = !empty($tinyib_embeds) && ($rawpost || !in_array('embed', $hide_fields));
$embed_ok = (!empty($tinyib_embeds) || TINYIB_UPLOADVIAURL) && ($rawpost || !in_array('embed', $hide_fields));
$allowed = '';
if ($file_ok && $embed_ok) {
$allowed = __('upload a file or embed a URL');

View File

@ -184,8 +184,8 @@ EOF;
EOF;
}
$embeds_enabled = !empty($tinyib_embeds) && ($raw_post || !in_array('embed', $hide_fields));
if (TINYIB_UPLOADVIAURL || $embeds_enabled) {
$embeds_enabled = (!empty($tinyib_embeds) || TINYIB_UPLOADVIAURL) && ($raw_post || !in_array('embed', $hide_fields));
if ($embeds_enabled) {
$txt_embed = __('Embed');
$txt_embed_help = '';
if ($embeds_enabled) {