mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-15 20:48:00 +00:00
fixed a bug where files woul get saved even though they were not allowed by type
This commit is contained in:
@@ -309,6 +309,9 @@ class PictshareModel extends Model
|
||||
$type = $this->getTypeOfFile($url);
|
||||
$type = $this->isTypeAllowed($type);
|
||||
|
||||
if(!$type)
|
||||
return array('status'=>'ERR','reason'=>'wrong filetype');
|
||||
|
||||
$dup_id = $this->isDuplicate($url);
|
||||
if($dup_id)
|
||||
{
|
||||
@@ -322,8 +325,7 @@ class PictshareModel extends Model
|
||||
}
|
||||
|
||||
|
||||
if(!$type)
|
||||
return array('status'=>'ERR','reason'=>'wrong filetype');
|
||||
|
||||
|
||||
if($dup_id)
|
||||
return array('status'=>'OK','type'=>$type,'hash'=>$hash,'url'=>DOMAINPATH.$hash,'domain'=>DOMAINPATH);
|
||||
|
||||
Reference in New Issue
Block a user