- Chg #3640: All cookies are now httpOnly by default in order to increase overall security (samdark)
- Chg #3687: Default `sourceLanguage` and `language` are now `en-US` in order for i18n formatter to work correctly (samdark)
- Chg #3804: Added `fileinfo` PHP extension to the basic requirement of Yii (Ragazzo)
- Chg #3866: `FileValidator::types` attribute changed to `FileValidator::extensions` (Ragazzo)
- Chg: Replaced `clearAll()` and `clearAllAssignments()` in `yii\rbac\ManagerInterface` with `removeAll()`, `removeAllRoles()`, `removeAllPermissions()`, `removeAllRules()` and `removeAllAssignments()` (qiangxue)
- Chg: Added `$user` as the first parameter of `yii\rbac\Rule::execute()` (qiangxue)
- Chg: `yii\grid\DataColumn::getDataCellValue()` visibility is now `public` to allow accessing the value from a GridView directly (cebe)
@@ -29,13 +29,13 @@ class FileValidator extends Validator
* extensions are allowed.
* @see wrongType
*/
public$types;
public$extensions;
/**
*
* @var boolean whether to check file type (extension) with mime-type. If extension produced by
* file mime-type check differs from uploaded file extension, file will be counted as not valid.
*/
public$checkTypeAgainstMime=true;
public$checkExtensionByMimeType=true;
/**
* @var array|string a list of file MIME types that are allowed to be uploaded.
* This can be either an array or a string consisting of file MIME types
...
...
@@ -94,13 +94,13 @@ class FileValidator extends Validator
public$tooSmall;
/**
* @var string the error message used when the uploaded file has an extension name
* that is not listed in [[types]]. You may use the following tokens in the message:
* that is not listed in [[extensions]]. You may use the following tokens in the message:
*
* - {attribute}: the attribute name
* - {file}: the uploaded file name
* - {extensions}: the list of the allowed extensions.
*/
public$wrongType;
public$wrongExtension;
/**
* @var string the error message used if the count of multiple uploads exceeds limit.
* You may use the following tokens in the message:
...
...
@@ -136,8 +136,8 @@ class FileValidator extends Validator
if($this->tooMany===null){
$this->tooMany=Yii::t('yii','You can upload at most {limit, number} {limit, plural, one{file} other{files}}.');
}
if($this->wrongType===null){
$this->wrongType=Yii::t('yii','Only files with these extensions are allowed: {extensions}.');
if($this->wrongExtension===null){
$this->wrongExtension=Yii::t('yii','Only files with these extensions are allowed: {extensions}.');
}
if($this->tooBig===null){
$this->tooBig=Yii::t('yii','The file "{file}" is too big. Its size cannot exceed {limit, number} {limit, plural, one{byte} other{bytes}}.');
...
...
@@ -145,8 +145,8 @@ class FileValidator extends Validator
if($this->tooSmall===null){
$this->tooSmall=Yii::t('yii','The file "{file}" is too small. Its size cannot be smaller than {limit, number} {limit, plural, one{byte} other{bytes}}.');