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
66e5be7f
Commit
66e5be7f
authored
Dec 12, 2013
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Widget IDs are now always unique no matter if it's the same request or new one
parent
4d812d46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
Widget.php
framework/yii/base/Widget.php
+1
-6
No files found.
framework/CHANGELOG.md
View file @
66e5be7f
...
@@ -12,6 +12,7 @@ Yii Framework 2 Change Log
...
@@ -12,6 +12,7 @@ Yii Framework 2 Change Log
-
Enh #1437: Added ListView::viewParams (qiangxue)
-
Enh #1437: Added ListView::viewParams (qiangxue)
-
Enh #1469: ActiveRecord::find() now works with default conditions (default scope) applied by createQuery (cebe)
-
Enh #1469: ActiveRecord::find() now works with default conditions (default scope) applied by createQuery (cebe)
-
Enh: Added
`favicon.ico`
and
`robots.txt`
to defauly application templates (samdark)
-
Enh: Added
`favicon.ico`
and
`robots.txt`
to defauly application templates (samdark)
-
Enh: Widget IDs are now always unique no matter if it's the same request or new one (samdark)
-
New #1438:
[
MongoDB integration
](
https://github.com/yiisoft/yii2-mongodb
)
ActiveRecord and Query (klimov-paul)
-
New #1438:
[
MongoDB integration
](
https://github.com/yiisoft/yii2-mongodb
)
ActiveRecord and Query (klimov-paul)
2.
0.0 alpha, December 1, 2013
2.
0.0 alpha, December 1, 2013
...
...
framework/yii/base/Widget.php
View file @
66e5be7f
...
@@ -25,11 +25,6 @@ use ReflectionClass;
...
@@ -25,11 +25,6 @@ use ReflectionClass;
class
Widget
extends
Component
implements
ViewContextInterface
class
Widget
extends
Component
implements
ViewContextInterface
{
{
/**
/**
* @var integer a counter used to generate [[id]] for widgets.
* @internal
*/
public
static
$counter
=
0
;
/**
* @var Widget[] the widgets that are currently being rendered (not ended). This property
* @var Widget[] the widgets that are currently being rendered (not ended). This property
* is maintained by [[begin()]] and [[end()]] methods.
* is maintained by [[begin()]] and [[end()]] methods.
* @internal
* @internal
...
@@ -101,7 +96,7 @@ class Widget extends Component implements ViewContextInterface
...
@@ -101,7 +96,7 @@ class Widget extends Component implements ViewContextInterface
public
function
getId
(
$autoGenerate
=
true
)
public
function
getId
(
$autoGenerate
=
true
)
{
{
if
(
$autoGenerate
&&
$this
->
_id
===
null
)
{
if
(
$autoGenerate
&&
$this
->
_id
===
null
)
{
$this
->
_id
=
'w
'
.
self
::
$counter
++
;
$this
->
_id
=
'w
-'
.
str_replace
(
'.'
,
'-'
,
uniqid
(
''
,
true
))
;
}
}
return
$this
->
_id
;
return
$this
->
_id
;
}
}
...
...
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