Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
a643bde5
Commit
a643bde5
authored
Jun 04, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved gii input filter, fixes #3689
parent
91722d05
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
Generator.php
extensions/gii/generators/model/Generator.php
+2
-0
No files found.
extensions/gii/generators/model/Generator.php
View file @
a643bde5
...
@@ -55,6 +55,8 @@ class Generator extends \yii\gii\Generator
...
@@ -55,6 +55,8 @@ class Generator extends \yii\gii\Generator
{
{
return
array_merge
(
parent
::
rules
(),
[
return
array_merge
(
parent
::
rules
(),
[
[[
'db'
,
'ns'
,
'tableName'
,
'modelClass'
,
'baseClass'
],
'filter'
,
'filter'
=>
'trim'
],
[[
'db'
,
'ns'
,
'tableName'
,
'modelClass'
,
'baseClass'
],
'filter'
,
'filter'
=>
'trim'
],
[[
'ns'
],
'filter'
,
'filter'
=>
function
(
$value
)
{
return
trim
(
$value
,
'\\'
);
}],
[[
'db'
,
'ns'
,
'tableName'
,
'baseClass'
],
'required'
],
[[
'db'
,
'ns'
,
'tableName'
,
'baseClass'
],
'required'
],
[[
'db'
,
'modelClass'
],
'match'
,
'pattern'
=>
'/^\w+$/'
,
'message'
=>
'Only word characters are allowed.'
],
[[
'db'
,
'modelClass'
],
'match'
,
'pattern'
=>
'/^\w+$/'
,
'message'
=>
'Only word characters are allowed.'
],
[[
'ns'
,
'baseClass'
],
'match'
,
'pattern'
=>
'/^[\w\\\\]+$/'
,
'message'
=>
'Only word characters and backslashes are allowed.'
],
[[
'ns'
,
'baseClass'
],
'match'
,
'pattern'
=>
'/^[\w\\\\]+$/'
,
'message'
=>
'Only word characters and backslashes are allowed.'
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment