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
f65d1398
Commit
f65d1398
authored
May 26, 2013
by
Klimov Paul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added skipping for absolute URLs at "AssetController::adjustCssUrl()".
parent
2635b477
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
AssetController.php
framework/yii/console/controllers/AssetController.php
+4
-0
AssetControllerTest.php
...nit/framework/console/controllers/AssetControllerTest.php
+12
-0
No files found.
framework/yii/console/controllers/AssetController.php
View file @
f65d1398
...
@@ -558,6 +558,10 @@ EOD
...
@@ -558,6 +558,10 @@ EOD
$fullMatch
=
$matches
[
0
];
$fullMatch
=
$matches
[
0
];
$inputUrl
=
$matches
[
1
];
$inputUrl
=
$matches
[
1
];
if
(
preg_match
(
'/https?:\/\//is'
,
$inputUrl
))
{
return
$fullMatch
;
}
$outputUrlParts
=
array_fill
(
0
,
count
(
$outputFileRelativePathParts
),
'..'
);
$outputUrlParts
=
array_fill
(
0
,
count
(
$outputFileRelativePathParts
),
'..'
);
$outputUrlParts
=
array_merge
(
$outputUrlParts
,
$inputFileRelativePathParts
);
$outputUrlParts
=
array_merge
(
$outputUrlParts
,
$inputFileRelativePathParts
);
...
...
tests/unit/framework/console/controllers/AssetControllerTest.php
View file @
f65d1398
...
@@ -286,6 +286,18 @@ class AssetControllerTest extends TestCase
...
@@ -286,6 +286,18 @@ class AssetControllerTest extends TestCase
'/test/base/path/assets/output'
,
'/test/base/path/assets/output'
,
'.static-relative-dir-class {background-image: url("../../img/static_relative_dir.png");}'
,
'.static-relative-dir-class {background-image: url("../../img/static_relative_dir.png");}'
,
),
),
array
(
'.absolute-url-class {background-image: url(http://domain.com/img/image.gif);}'
,
'/test/base/path/assets/input'
,
'/test/base/path/assets/output'
,
'.absolute-url-class {background-image: url(http://domain.com/img/image.gif);}'
,
),
array
(
'.absolute-url-secure-class {background-image: url(https://secure.domain.com/img/image.gif);}'
,
'/test/base/path/assets/input'
,
'/test/base/path/assets/output'
,
'.absolute-url-secure-class {background-image: url(https://secure.domain.com/img/image.gif);}'
,
),
);
);
}
}
...
...
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