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
65a8eae7
Commit
65a8eae7
authored
Feb 11, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #2399: Fixed the bug that AssetBundle did not handle relative URLs correctly
parent
b2a2853e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
AssetBundle.php
framework/web/AssetBundle.php
+3
-2
No files found.
framework/CHANGELOG.md
View file @
65a8eae7
...
@@ -45,6 +45,7 @@ Yii Framework 2 Change Log
...
@@ -45,6 +45,7 @@ Yii Framework 2 Change Log
-
Bug #2298: Fixed the bug that Gii controller generator did not allow digit in the controller ID (qiangxue)
-
Bug #2298: Fixed the bug that Gii controller generator did not allow digit in the controller ID (qiangxue)
-
Bug #2303: Fixed the bug that
`yii\base\Theme::pathMap`
did not support dynamic update with path aliases (qiangxue)
-
Bug #2303: Fixed the bug that
`yii\base\Theme::pathMap`
did not support dynamic update with path aliases (qiangxue)
-
Bug #2324: Fixed QueryBuilder bug when building a query with "query" option (mintao)
-
Bug #2324: Fixed QueryBuilder bug when building a query with "query" option (mintao)
-
Bug #2399: Fixed the bug that AssetBundle did not handle relative URLs correctly (qiangxue)
-
Bug: Fixed
`Call to a member function registerAssetFiles() on a non-object`
in case of wrong
`sourcePath`
for an asset bundle (samdark)
-
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: Fixed incorrect event name for
`yii\jui\Spinner`
(samdark)
-
Bug: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe)
-
Bug: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe)
...
...
framework/web/AssetBundle.php
View file @
65a8eae7
...
@@ -170,12 +170,13 @@ class AssetBundle extends Object
...
@@ -170,12 +170,13 @@ class AssetBundle extends Object
list
(
$this
->
basePath
,
$this
->
baseUrl
)
=
$am
->
publish
(
$this
->
sourcePath
,
$this
->
publishOptions
);
list
(
$this
->
basePath
,
$this
->
baseUrl
)
=
$am
->
publish
(
$this
->
sourcePath
,
$this
->
publishOptions
);
}
}
$converter
=
$am
->
getConverter
();
$converter
=
$am
->
getConverter
();
$baseUrl
=
Yii
::
$app
->
getRequest
()
->
getBaseUrl
();
foreach
(
$this
->
js
as
$i
=>
$js
)
{
foreach
(
$this
->
js
as
$i
=>
$js
)
{
if
(
strpos
(
$js
,
'/'
)
!==
0
&&
strpos
(
$js
,
'://'
)
===
false
)
{
if
(
strpos
(
$js
,
'/'
)
!==
0
&&
strpos
(
$js
,
'://'
)
===
false
)
{
if
(
isset
(
$this
->
basePath
,
$this
->
baseUrl
))
{
if
(
isset
(
$this
->
basePath
,
$this
->
baseUrl
))
{
$this
->
js
[
$i
]
=
$converter
->
convert
(
$js
,
$this
->
basePath
,
$this
->
baseUrl
);
$this
->
js
[
$i
]
=
$converter
->
convert
(
$js
,
$this
->
basePath
,
$this
->
baseUrl
);
}
else
{
}
else
{
$this
->
js
[
$i
]
=
'/'
.
$js
;
$this
->
js
[
$i
]
=
$baseUrl
.
'/'
.
$js
;
}
}
}
}
}
}
...
@@ -184,7 +185,7 @@ class AssetBundle extends Object
...
@@ -184,7 +185,7 @@ class AssetBundle extends Object
if
(
isset
(
$this
->
basePath
,
$this
->
baseUrl
))
{
if
(
isset
(
$this
->
basePath
,
$this
->
baseUrl
))
{
$this
->
css
[
$i
]
=
$converter
->
convert
(
$css
,
$this
->
basePath
,
$this
->
baseUrl
);
$this
->
css
[
$i
]
=
$converter
->
convert
(
$css
,
$this
->
basePath
,
$this
->
baseUrl
);
}
else
{
}
else
{
$this
->
css
[
$i
]
=
'/'
.
$css
;
$this
->
css
[
$i
]
=
$baseUrl
.
'/'
.
$css
;
}
}
}
}
}
}
...
...
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