Index: upload_formatter.php =================================================================== --- upload_formatter.php (revision 14318) +++ upload_formatter.php (working copy) @@ -229,8 +229,8 @@ $tc_value = $this->TypeCast($value, $options); if( ($tc_value === false) || ($tc_value != $value) ) return $value; // for leaving badly formatted date on the form - $object->Fields[$field_name]['direct_links'] = true; // for case, when non-swf uploader is used - return $this->GetFormatted($tc_value, $field_name, $object, $format); + // force direct links for case, when non-swf uploader is used + return $this->GetFormatted($tc_value, $field_name, $object, $format, true); } /** @@ -240,9 +240,10 @@ * @param string $field_name * @param kDBItem $object * @param string $format + * @param bool $force_direct_links * @return string */ - function GetFormatted($value, $field_name, &$object, $format = null) + function GetFormatted($value, $field_name, &$object, $format = null, $force_direct_links = null) { if (!$format) { return $value; @@ -265,7 +266,14 @@ switch ($format) { case 'full_url': - if (isset($options['direct_links']) && $options['direct_links']) { + if ( isset($force_direct_links) ) { + $direct_links = $force_direct_links; + } + else { + $direct_links = isset($options['direct_links']) ? $options['direct_links'] : false; + } + + if ( $direct_links ) { return $this->fileHelper->pathToUrl(FULL_PATH . $upload_dir . $value); } else {