mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
Update Upload.php
This commit is contained in:
parent
522d89993b
commit
a6faf4191a
1 changed files with 2 additions and 2 deletions
|
@ -190,7 +190,7 @@ class Upload
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check extension
|
// Check extension
|
||||||
if ($uploaded_only && (!isset($this->ext_ids[$this->file_ext]) || !\in_array($this->file_ext, $this->cfg['allowed_ext'], true))) {
|
if ($uploaded_only && (!isset($this->ext_ids[$this->file_ext]) || !in_array($this->file_ext, $this->cfg['allowed_ext'], true))) {
|
||||||
$this->errors[] = sprintf($lang['UPLOAD_ERROR_NOT_ALLOWED'], htmlCHR($this->file_ext));
|
$this->errors[] = sprintf($lang['UPLOAD_ERROR_NOT_ALLOWED'], htmlCHR($this->file_ext));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -231,7 +231,7 @@ class Upload
|
||||||
*/
|
*/
|
||||||
public function _move($file_path)
|
public function _move($file_path)
|
||||||
{
|
{
|
||||||
$dir = \dirname($file_path);
|
$dir = dirname($file_path);
|
||||||
if (!file_exists($dir)) {
|
if (!file_exists($dir)) {
|
||||||
if (!bb_mkdir($dir)) {
|
if (!bb_mkdir($dir)) {
|
||||||
$this->errors[] = "Cannot create dir: $dir";
|
$this->errors[] = "Cannot create dir: $dir";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue