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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
5b86ec97
Commit
5b86ec97
authored
Oct 17, 2013
by
Eugene Kuzminov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug panel : changed .json to .php
parent
b9de474c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
LogTarget.php
framework/yii/debug/LogTarget.php
+3
-3
DefaultController.php
framework/yii/debug/controllers/DefaultController.php
+2
-2
No files found.
framework/yii/debug/LogTarget.php
View file @
5b86ec97
...
...
@@ -45,7 +45,7 @@ class LogTarget extends Target
if
(
!
is_dir
(
$path
))
{
mkdir
(
$path
);
}
$indexFile
=
"
$path
/index.
json
"
;
$indexFile
=
"
$path
/index.
php
"
;
if
(
!
is_file
(
$indexFile
))
{
$manifest
=
array
();
}
else
{
...
...
@@ -62,7 +62,7 @@ class LogTarget extends Target
);
$this
->
gc
(
$manifest
);
$dataFile
=
"
$path
/
{
$this
->
tag
}
.
json
"
;
$dataFile
=
"
$path
/
{
$this
->
tag
}
.
php
"
;
$data
=
array
();
foreach
(
$this
->
module
->
panels
as
$id
=>
$panel
)
{
$data
[
$id
]
=
$panel
->
save
();
...
...
@@ -93,7 +93,7 @@ class LogTarget extends Target
if
(
count
(
$manifest
)
>
$this
->
module
->
historySize
+
10
)
{
$n
=
count
(
$manifest
)
-
$this
->
module
->
historySize
;
foreach
(
array_keys
(
$manifest
)
as
$tag
)
{
$file
=
$this
->
module
->
dataPath
.
"/
$tag
.
json
"
;
$file
=
$this
->
module
->
dataPath
.
"/
$tag
.
php
"
;
@
unlink
(
$file
);
unset
(
$manifest
[
$tag
]);
if
(
--
$n
<=
0
)
{
...
...
framework/yii/debug/controllers/DefaultController.php
View file @
5b86ec97
...
...
@@ -74,7 +74,7 @@ class DefaultController extends Controller
protected
function
getManifest
()
{
if
(
$this
->
_manifest
===
null
)
{
$indexFile
=
$this
->
module
->
dataPath
.
'/index.
json
'
;
$indexFile
=
$this
->
module
->
dataPath
.
'/index.
php
'
;
if
(
is_file
(
$indexFile
))
{
$this
->
_manifest
=
array_reverse
(
unserialize
(
file_get_contents
(
$indexFile
)),
true
);
}
else
{
...
...
@@ -88,7 +88,7 @@ class DefaultController extends Controller
{
$manifest
=
$this
->
getManifest
();
if
(
isset
(
$manifest
[
$tag
]))
{
$dataFile
=
$this
->
module
->
dataPath
.
"/
$tag
.
json
"
;
$dataFile
=
$this
->
module
->
dataPath
.
"/
$tag
.
php
"
;
$data
=
unserialize
(
file_get_contents
(
$dataFile
));
foreach
(
$this
->
module
->
panels
as
$id
=>
$panel
)
{
if
(
isset
(
$data
[
$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