aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions_upload.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/include/functions_upload.inc.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/admin/include/functions_upload.inc.php b/admin/include/functions_upload.inc.php
index 648b8ddc6..2a5206c1b 100644
--- a/admin/include/functions_upload.inc.php
+++ b/admin/include/functions_upload.inc.php
@@ -296,8 +296,10 @@ SELECT
else
{
// database registration
+ $file = pwg_db_real_escape_string(isset($original_filename) ? $original_filename : basename($file_path));
$insert = array(
- 'file' => pwg_db_real_escape_string(isset($original_filename) ? $original_filename : basename($file_path)),
+ 'file' => $file,
+ 'name' => get_name_from_file($file),
'date_available' => $dbnow,
'path' => preg_replace('#^'.preg_quote(PHPWG_ROOT_PATH).'#', '', $file_path),
'filesize' => $file_infos['filesize'],