mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 13:58:55 +08:00
Merge pull request #3536 from rawtaz/3531-gridViewColumnNames-allowMoreChars
Fix #3531, allow more chars in \yii\grid\GridView's short syntax for columns.
This commit is contained in:
@ -61,6 +61,7 @@ Yii Framework 2 Change Log
|
||||
- Chg #3036: Upgraded Twitter Bootstrap to 3.1.x (qiangxue)
|
||||
- Chg #3175: InvalidCallException, InvalidParamException, UnknownMethodException are now extended from SPL BadMethodCallException (samdark)
|
||||
- Chg #3383: Added `$type` parameter to `IdentityInterface::findIdentityByAccessToken()` (qiangxue)
|
||||
- Chg #3531: \yii\grid\GridView now allows any character (except ":") in the attribute part of the shorthand syntax for columns (rawtaz)
|
||||
- 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)
|
||||
|
||||
@ -500,7 +500,7 @@ class GridView extends BaseListView
|
||||
*/
|
||||
protected function createDataColumn($text)
|
||||
{
|
||||
if (!preg_match('/^([\w\.]+)(:(\w*))?(:(.*))?$/', $text, $matches)) {
|
||||
if (!preg_match('/^([^:]+)(:(\w*))?(:(.*))?$/', $text, $matches)) {
|
||||
throw new InvalidConfigException('The column must be specified in the format of "attribute", "attribute:format" or "attribute:format:label"');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user