diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index 50d1c5dcb..24c69f573 100755 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -5346,12 +5346,12 @@ class G foreach ($allowedTypes as $types => $val) { if((preg_match('/^\*\.?[a-z]{2,8}$/', $val)) || ($val == '*.*')){ $allowedDocTypes = substr($val, 2); - if(($dtype[count($dtype) -1]) != $allowedDocTypes){ - $flag = 1; + if(($dtype[count($dtype) -1]) == $allowedDocTypes || $allowedDocTypes == '*'){ + $res->status = true; + return $res; + break; } else { - $res->status = true; - return $res; - break; + $flag = 1; } } else { $res->status = false;