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
92c64994
Commit
92c64994
authored
Jul 23, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved strtr calls
parent
81d5dd01
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
CodeFile.php
extensions/gii/CodeFile.php
+1
-1
BaseFileHelper.php
framework/helpers/BaseFileHelper.php
+1
-1
BaseVarDumper.php
framework/helpers/BaseVarDumper.php
+1
-1
No files found.
extensions/gii/CodeFile.php
View file @
92c64994
...
...
@@ -61,7 +61,7 @@ class CodeFile extends Object
*/
public
function
__construct
(
$path
,
$content
)
{
$this
->
path
=
strtr
(
$path
,
[
'/'
=>
DIRECTORY_SEPARATOR
,
'\\'
=>
DIRECTORY_SEPARATOR
]
);
$this
->
path
=
strtr
(
$path
,
'/\\'
,
DIRECTORY_SEPARATOR
.
DIRECTORY_SEPARATOR
);
$this
->
content
=
$content
;
$this
->
id
=
md5
(
$this
->
path
);
if
(
is_file
(
$path
))
{
...
...
framework/helpers/BaseFileHelper.php
View file @
92c64994
...
...
@@ -42,7 +42,7 @@ class BaseFileHelper
*/
public
static
function
normalizePath
(
$path
,
$ds
=
DIRECTORY_SEPARATOR
)
{
$path
=
rtrim
(
strtr
(
$path
,
[
'/'
=>
$ds
,
'\\'
=>
$ds
]
),
$ds
);
$path
=
rtrim
(
strtr
(
$path
,
'/\\'
,
$ds
.
$ds
),
$ds
);
if
(
strpos
(
$ds
.
$path
,
"
{
$ds
}
."
)
===
false
&&
strpos
(
$path
,
"
{
$ds
}{
$ds
}
"
)
===
false
)
{
return
$path
;
}
...
...
framework/helpers/BaseVarDumper.php
View file @
92c64994
...
...
@@ -114,7 +114,7 @@ class BaseVarDumper
$spaces
=
str_repeat
(
' '
,
$level
*
4
);
self
::
$_output
.=
"
$className
#
$id
\n
"
.
$spaces
.
'('
;
foreach
((
array
)
$var
as
$key
=>
$value
)
{
$keyDisplay
=
strtr
(
trim
(
$key
),
[
"
\0
"
=>
':'
]
);
$keyDisplay
=
strtr
(
trim
(
$key
),
"
\0
"
,
':'
);
self
::
$_output
.=
"
\n
"
.
$spaces
.
" [
$keyDisplay
] => "
;
self
::
dumpInternal
(
$value
,
$level
+
1
);
}
...
...
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