make sure source is still used if provided
This commit is contained in:
parent
994652c3f7
commit
7837362711
@ -91,7 +91,7 @@ class Upload extends Extension {
|
|||||||
$sb->add_shorthand_int_option("upload_size", "<br/>Max size per file: ");
|
$sb->add_shorthand_int_option("upload_size", "<br/>Max size per file: ");
|
||||||
$sb->add_label("<i>PHP Limit = ".ini_get('upload_max_filesize')."</i>");
|
$sb->add_label("<i>PHP Limit = ".ini_get('upload_max_filesize')."</i>");
|
||||||
$sb->add_choice_option("transload_engine", $tes, "<br/>Transload: ");
|
$sb->add_choice_option("transload_engine", $tes, "<br/>Transload: ");
|
||||||
$sb->add_bool_option("upload_tlsource", "<br/>Use transloaded URL as source: ");
|
$sb->add_bool_option("upload_tlsource", "<br/>Use transloaded URL as source if none is provided: ");
|
||||||
$event->panel->add_block($sb);
|
$event->panel->add_block($sb);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -352,7 +352,7 @@ class Upload extends Extension {
|
|||||||
$metadata['filename'] = $filename;
|
$metadata['filename'] = $filename;
|
||||||
$metadata['extension'] = getExtension($headers['Content-Type']) ?: $pathinfo['extension'];
|
$metadata['extension'] = getExtension($headers['Content-Type']) ?: $pathinfo['extension'];
|
||||||
$metadata['tags'] = $tags;
|
$metadata['tags'] = $tags;
|
||||||
$metadata['source'] = ($config->get_bool('upload_tlsource') ? $source : "");
|
$metadata['source'] = (($url == $source) && !$config->get_bool('upload_tlsource') ? "" : $source);
|
||||||
|
|
||||||
/* check for locked > adds to metadata if it has */
|
/* check for locked > adds to metadata if it has */
|
||||||
if(!empty($locked)){
|
if(!empty($locked)){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user