瀏覽代碼

Fix for . after non-extension uploads of files.

pull/24/head
Brett Bohnenkamper 5 年之前
父節點
當前提交
79b3322911
共有 1 個檔案被更改,包括 6 行新增2 行删除
  1. 6
    2
      includes/common.php

+ 6
- 2
includes/common.php 查看文件

@@ -190,8 +190,12 @@ function upload($files, $CONF, $db)
$file_used = true;
while ($file_used)
{
$randomString = rand_string(6);
$fileURL = $randomString.".".$ext;
$randomString = rand_string(6);
if (empty($ext)) {
$fileURL = $randomString;
} else {
$fileURL = $randomString.".".$ext;
}
$result = $db->select("uploads", "url=?", array($fileURL));
if (!$result)
{

Loading…
取消
儲存