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
05e63b9b
Commit
05e63b9b
authored
Jun 04, 2014
by
Klimov Paul
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:yiisoft/yii2
parents
804aded5
d8c55954
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
3 deletions
+15
-3
application-lifecycle.graphml
docs/guide/images/application-lifecycle.graphml
+1
-1
application-lifecycle.png
docs/guide/images/application-lifecycle.png
+0
-0
security-authorization.md
docs/guide/security-authorization.md
+0
-1
Generator.php
extensions/gii/generators/crud/Generator.php
+9
-1
Generator.php
extensions/gii/generators/model/Generator.php
+2
-0
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
Request.php
framework/web/Request.php
+2
-0
No files found.
docs/guide/images/application-lifecycle.graphml
View file @
05e63b9b
...
...
@@ -342,7 +342,7 @@
<y:Geometry
height=
"141.666015625"
width=
"159.91864204406738"
x=
"313.2978515625"
y=
"225.33495140075684"
/>
<y:Fill
color=
"#FFCC0024"
transparent=
"false"
/>
<y:BorderStyle
hasColor=
"false"
type=
"line"
width=
"1.0"
/>
<y:NodeLabel
alignment=
"center"
autoSizePolicy=
"node_width"
backgroundColor=
"#FFCC00"
borderDistance=
"0.0"
fontFamily=
"Dialog"
fontSize=
"15"
fontStyle=
"plain"
hasLineColor=
"false"
height=
"21.666015625"
modelName=
"internal"
modelPosition=
"t"
textColor=
"#000000"
visible=
"true"
width=
"159.91864204406738"
x=
"0.0"
y=
"0.0"
>
index.php
</y:NodeLabel>
<y:NodeLabel
alignment=
"center"
autoSizePolicy=
"node_width"
backgroundColor=
"#FFCC00"
borderDistance=
"0.0"
fontFamily=
"Dialog"
fontSize=
"15"
fontStyle=
"plain"
hasLineColor=
"false"
height=
"21.666015625"
modelName=
"internal"
modelPosition=
"t"
textColor=
"#000000"
visible=
"true"
width=
"159.91864204406738"
x=
"0.0"
y=
"0.0"
>
entry script
</y:NodeLabel>
<y:Shape
type=
"rectangle"
/>
<y:State
closed=
"false"
closedHeight=
"50.0"
closedWidth=
"50.0"
innerGraphDisplayEnabled=
"false"
/>
<y:Insets
bottom=
"15"
bottomF=
"15.0"
left=
"15"
leftF=
"15.0"
right=
"15"
rightF=
"15.0"
top=
"15"
topF=
"15.0"
/>
...
...
docs/guide/images/application-lifecycle.png
View replaced file @
804aded5
View file @
05e63b9b
39.2 KB
|
W:
|
H:
39.4 KB
|
W:
|
H:
2-up
Swipe
Onion skin
docs/guide/security-authorization.md
View file @
05e63b9b
...
...
@@ -244,7 +244,6 @@ class RbacController extends Controller
$author
=
$auth
->
createRole
(
'author'
);
$auth
->
add
(
$author
);
$auth
->
addChild
(
$author
,
$createPost
);
$auth
->
addChild
(
$author
,
$reader
);
// add "admin" role and give this role the "updatePost" permission
// as well as the permissions of the "author" role
...
...
extensions/gii/generators/crud/Generator.php
View file @
05e63b9b
...
...
@@ -13,6 +13,7 @@ use yii\db\BaseActiveRecord;
use
yii\db\Schema
;
use
yii\gii\CodeFile
;
use
yii\helpers\Inflector
;
use
yii\helpers\VarDumper
;
use
yii\web\Controller
;
/**
...
...
@@ -247,7 +248,14 @@ class Generator extends \yii\gii\Generator
}
else
{
$input
=
'textInput'
;
}
if
(
$column
->
phpType
!==
'string'
||
$column
->
size
===
null
)
{
if
(
is_array
(
$column
->
enumValues
)
&&
count
(
$column
->
enumValues
)
>
0
)
{
$dropDownOptions
=
[];
foreach
(
$column
->
enumValues
as
$enumValue
)
{
$dropDownOptions
[
$enumValue
]
=
Inflector
::
humanize
(
$enumValue
);
}
return
"
\$
form->field(
\$
model, '
$attribute
')->dropDownList("
.
preg_replace
(
"/
\n
\s*/"
,
' '
,
VarDumper
::
export
(
$dropDownOptions
))
.
", ['prompt' => ''])"
;
}
else
if
(
$column
->
phpType
!==
'string'
||
$column
->
size
===
null
)
{
return
"
\$
form->field(
\$
model, '
$attribute
')->
$input
()"
;
}
else
{
return
"
\$
form->field(
\$
model, '
$attribute
')->
$input
(['maxlength' =>
$column->size
])"
;
...
...
extensions/gii/generators/model/Generator.php
View file @
05e63b9b
...
...
@@ -55,6 +55,8 @@ class Generator extends \yii\gii\Generator
{
return
array_merge
(
parent
::
rules
(),
[
[[
'db'
,
'ns'
,
'tableName'
,
'modelClass'
,
'baseClass'
],
'filter'
,
'filter'
=>
'trim'
],
[[
'ns'
],
'filter'
,
'filter'
=>
function
(
$value
)
{
return
trim
(
$value
,
'\\'
);
}],
[[
'db'
,
'ns'
,
'tableName'
,
'baseClass'
],
'required'
],
[[
'db'
,
'modelClass'
],
'match'
,
'pattern'
=>
'/^\w+$/'
,
'message'
=>
'Only word characters are allowed.'
],
[[
'ns'
,
'baseClass'
],
'match'
,
'pattern'
=>
'/^[\w\\\\]+$/'
,
'message'
=>
'Only word characters and backslashes are allowed.'
],
...
...
framework/CHANGELOG.md
View file @
05e63b9b
...
...
@@ -161,6 +161,7 @@ Yii Framework 2 Change Log
-
Bug #2848: Individual queries should be enclosed within parenthesis in a UNION query (qiangxue)
-
Bug #2862: Using
`DbCache`
while enabling schema caching may cause infinite loops (qiangxue)
-
Bug #3052: Fixed the issue that cache dependency data is not reused when
`reusable`
is set true (qiangxue)
-
Bug #3691: Fixed the issue that
`CookieCollection::has`
always returns false for cookies from browser (sonicgd)
-
Bug: Fixed
`Call to a member function registerAssetFiles() on a non-object`
in case of wrong
`sourcePath`
for an asset bundle (samdark)
-
Bug: Fixed incorrect event name for
`yii\jui\Spinner`
(samdark)
-
Bug: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe)
...
...
framework/web/Request.php
View file @
05e63b9b
...
...
@@ -1190,6 +1190,7 @@ class Request extends \yii\base\Request
$cookies
[
$name
]
=
new
Cookie
([
'name'
=>
$name
,
'value'
=>
@
unserialize
(
$value
),
'expire'
=>
null
]);
}
}
...
...
@@ -1198,6 +1199,7 @@ class Request extends \yii\base\Request
$cookies
[
$name
]
=
new
Cookie
([
'name'
=>
$name
,
'value'
=>
$value
,
'expire'
=>
null
]);
}
}
...
...
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