Skip to content

Commit 0ae4154

Browse files
committed
Fix config setting to disable url sources
1 parent 99d4e45 commit 0ae4154

File tree

6 files changed

+20
-3
lines changed

6 files changed

+20
-3
lines changed

.craftplugin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"pluginName":"Imgix Url","pluginDescription":"Build imgix urls, including secure images.","pluginVersion":"0.0.2","pluginAuthorName":"Sprokets","pluginAuthorUrl":"http://sprokets.net","pluginAuthorGithub":"","codeComments":"yes","pluginComponents":["variables"],"controllerName":"","elementName":"","fieldName":"","modelName":"","purchasableName":"","recordName":"","serviceName":"","taskName":"","widgetName":"","apiVersion":"api_version_2_5"}
1+
{"pluginName":"Imgix Url","pluginDescription":"Build imgix urls, including secure images.","pluginVersion":"0.0.3","pluginAuthorName":"Sprokets","pluginAuthorUrl":"http://sprokets.net","pluginAuthorGithub":"","codeComments":"yes","pluginComponents":["variables"],"controllerName":"","elementName":"","fieldName":"","modelName":"","purchasableName":"","recordName":"","serviceName":"","taskName":"","widgetName":"","apiVersion":"api_version_2_5"}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Imgix Url Changelog
22

3+
## 0.0.3 -- 2017-08-23
4+
- Fix config setting to disable url sources
5+
36
## 0.0.2 -- 2017-08-23
47
- Rename repository
58

ImgixUrlPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function getReleaseFeedUrl()
9494
*/
9595
public function getVersion()
9696
{
97-
return '0.0.1';
97+
return '0.0.3';
9898
}
9999

100100
/**

config-sample.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
)
1717
)
1818
)
19-
// '.dev' => array()
19+
// '.dev' => array(
20+
// 'sources' => null
21+
// )
2022
// this would allow you to turn off imgix routing on .dev domains, saving you some bandwidth.
2123
// the full image url would be returned.
2224
);

releases.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
[
2+
{
3+
"version": "0.0.3",
4+
"downloadUrl": "https://github.com/Sprokets/craft-imgixurl/archive/master.zip",
5+
"date": "2017-08-28T10:03:21.257Z",
6+
"notes": [
7+
"Fix config setting to disable url sources"
8+
]
9+
},
210
{
311
"version": "0.0.2",
412
"downloadUrl": "https://github.com/Sprokets/craft-imgixurl/archive/master.zip",

variables/ImgixUrlVariable.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ function getUrl($img, $settings=array()) {
3939

4040
$sources = craft()->config->get('sources', 'imgixurl');
4141

42+
if(!is_array($sources)) {
43+
$sources = array();
44+
}
45+
4246
$defaultSettings = craft()->config->get('defaultSettings', 'imgixurl');
4347

4448
if(!is_array($defaultSettings)) {

0 commit comments

Comments
 (0)