Skip to content

Commit

Permalink
尝试修正 typecho#168
Browse files Browse the repository at this point in the history
  • Loading branch information
joyqi committed Jan 9, 2014
1 parent 8dbe128 commit daf8e1e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions var/Widget/Upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ public static function uploadHandle($file)
return $result;
}

$fileName = preg_split("(\/|\\|:)", $file['name']);
$file['name'] = array_pop($fileName);
$file['name'] = basename($file['name']);

//获取扩展名
$ext = '';
Expand Down Expand Up @@ -152,8 +151,7 @@ public static function modifyHandle($content, $file)
return $result;
}

$fileName = preg_split("(\/|\\|:)", $file['name']);
$file['name'] = array_pop($fileName);
$file['name'] = basename($file['name']);

//获取扩展名
$ext = '';
Expand Down

0 comments on commit daf8e1e

Please sign in to comment.