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
b12f4dd7
Commit
b12f4dd7
authored
Jun 20, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #3956: Debug toolbar was affecting flash message removal
parent
517cf3df
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
CHANGELOG.md
extensions/debug/CHANGELOG.md
+1
-0
RequestPanel.php
extensions/debug/panels/RequestPanel.php
+24
-3
No files found.
extensions/debug/CHANGELOG.md
View file @
b12f4dd7
...
...
@@ -5,6 +5,7 @@ Yii Framework 2 debug extension Change Log
--------------------------
-
Bug #1263: Fixed the issue that Gii and Debug modules might be affected by incompatible asset manager configuration (qiangxue)
-
Bug #3956: Debug toolbar was affecting flash message removal (samdark)
-
Enh #2299: Date and time in request list is now never wrapped (samdark)
-
Enh #3088: The debug module will manage their own URL rules now (qiangxue)
-
Enh #3103: debugger panel is now not displayed when printing a page (githubjeka)
...
...
extensions/debug/panels/RequestPanel.php
View file @
b12f4dd7
...
...
@@ -85,11 +85,9 @@ class RequestPanel extends Panel
}
else
{
$action
=
null
;
}
/** @var \yii\web\Session $session */
$session
=
Yii
::
$app
->
has
(
'session'
,
true
)
?
Yii
::
$app
->
get
(
'session'
)
:
null
;
return
[
'flashes'
=>
$
session
?
$session
->
getAllFlashes
()
:
[]
,
'flashes'
=>
$
this
->
getFlashes
()
,
'statusCode'
=>
Yii
::
$app
->
getResponse
()
->
getStatusCode
(),
'requestHeaders'
=>
$requestHeaders
,
'responseHeaders'
=>
$responseHeaders
,
...
...
@@ -109,4 +107,27 @@ class RequestPanel extends Panel
'SESSION'
=>
empty
(
$_SESSION
)
?
[]
:
$_SESSION
,
];
}
/**
* Getting flash messages without deleting them or touching deletion counters
*
* @return array flash messages (key => message).
*/
protected
function
getFlashes
()
{
/** @var \yii\web\Session $session */
$session
=
Yii
::
$app
->
has
(
'session'
,
true
)
?
Yii
::
$app
->
get
(
'session'
)
:
null
;
if
(
$session
===
null
)
{
return
[];
}
$counters
=
$session
->
get
(
$session
->
flashParam
,
[]);
$flashes
=
[];
foreach
(
array_keys
(
$counters
)
as
$key
)
{
if
(
array_key_exists
(
$key
,
$_SESSION
))
{
$flashes
[
$key
]
=
$_SESSION
[
$key
];
}
}
return
$flashes
;
}
}
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