Commit 31a17d67 by Alexander Makarov

Revert "Fixes #4829: Removed `PARSING_ONLY` from `\yii\rest\UrlRule` to allow…

Revert "Fixes #4829: Removed `PARSING_ONLY` from `\yii\rest\UrlRule` to allow creating non-GET URLs for forms and tests" This reverts commit 4ffbfec9.
parent 280c2ca0
......@@ -242,7 +242,6 @@ Yii Framework 2 Change Log
- Chg #4586: Signed bigint and unsigned int will be converted into integers when they are loaded from DB by AR (qiangxue)
- Chg #4591: `yii\helpers\Url::to()` will no longer prefix relative URLs with the base URL (qiangxue)
- Chg #4595: `yii\widgets\LinkPager`'s `nextPageLabel`, `prevPageLabel`, `firstPageLabel`, `lastPageLabel` are now taking `false` instead of `null` for "no label" (samdark)
- Chg #4829: Removed `PARSING_ONLY` from `\yii\rest\UrlRule` to allow creating non-GET URLs for forms and tests (samdark)
- 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)
......
......@@ -201,6 +201,9 @@ class UrlRule extends CompositeUrlRule
$config['verb'] = $verbs;
$config['pattern'] = rtrim($prefix . '/' . strtr($pattern, $this->tokens), '/');
$config['route'] = $action;
if (!in_array('GET', $verbs)) {
$config['mode'] = \yii\web\UrlRule::PARSING_ONLY;
}
$config['suffix'] = $this->suffix;
return Yii::createObject($config);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment