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
1cd3f2bb
Commit
1cd3f2bb
authored
Feb 11, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed test break.
parent
bb7a6872
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
AssetBundle.php
framework/web/AssetBundle.php
+2
-3
View.php
framework/web/View.php
+3
-0
No files found.
framework/web/AssetBundle.php
View file @
1cd3f2bb
...
@@ -170,13 +170,12 @@ class AssetBundle extends Object
...
@@ -170,13 +170,12 @@ 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
]
=
$baseUrl
.
'/'
.
$js
;
$this
->
js
[
$i
]
=
'/'
.
$js
;
}
}
}
}
}
}
...
@@ -185,7 +184,7 @@ class AssetBundle extends Object
...
@@ -185,7 +184,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
]
=
$baseUrl
.
'/'
.
$css
;
$this
->
css
[
$i
]
=
'/'
.
$css
;
}
}
}
}
}
}
...
...
framework/web/View.php
View file @
1cd3f2bb
...
@@ -431,6 +431,9 @@ class View extends \yii\base\View
...
@@ -431,6 +431,9 @@ class View extends \yii\base\View
$this
->
jsFiles
[
$position
][
$key
]
=
Html
::
jsFile
(
$url
,
$options
);
$this
->
jsFiles
[
$position
][
$key
]
=
Html
::
jsFile
(
$url
,
$options
);
}
else
{
}
else
{
$am
=
Yii
::
$app
->
getAssetManager
();
$am
=
Yii
::
$app
->
getAssetManager
();
if
(
strpos
(
$url
,
'/'
)
!==
0
&&
strpos
(
$url
,
'://'
)
===
false
)
{
$url
=
Yii
::
$app
->
getRequest
()
->
getBaseUrl
()
.
'/'
.
$url
;
}
$am
->
bundles
[
$key
]
=
new
AssetBundle
([
$am
->
bundles
[
$key
]
=
new
AssetBundle
([
'js'
=>
[
$url
],
'js'
=>
[
$url
],
'jsOptions'
=>
$options
,
'jsOptions'
=>
$options
,
...
...
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