commit 647a71257a3107e172e73ab265c209f0ba9137f7
parent db129d377454087f82c5e5220d3e9c4f55eab616
Author: markseu <mark2011@mayberg.se>
Date: Sat, 4 Mar 2017 19:44:13 +0100
System update (WOFF2 file format, thanks Richi)
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/system/plugins/commandline.php b/system/plugins/commandline.php
@@ -5,7 +5,7 @@
class YellowCommandline
{
- const VERSION = "0.6.18";
+ const VERSION = "0.6.19";
var $yellow; //access to API
var $files; //number of files
var $errors; //number of errors
@@ -409,7 +409,7 @@ class YellowCommandline
function getSystemLocations()
{
$locations = array();
- $regex = "/\.(css|ico|js|jpg|png|svg|txt|woff)/";
+ $regex = "/\.(css|ico|js|jpg|png|svg|txt|woff|woff2)$/";
$pluginDirLength = strlenu($this->yellow->config->get("pluginDir"));
$fileNames = $this->yellow->toolbox->getDirectoryEntriesRecursive($this->yellow->config->get("pluginDir"), $regex, false, false);
foreach($fileNames as $fileName)
diff --git a/system/plugins/core.php b/system/plugins/core.php
@@ -2373,7 +2373,7 @@ class YellowLookup
// Return file path for system location
function findFileFromSystem($location)
{
- if(preg_match("/\.(css|ico|js|jpg|png|svg|txt|woff)$/", $location))
+ if(preg_match("/\.(css|ico|js|jpg|png|svg|txt|woff|woff2)$/", $location))
{
$pluginLocationLength = strlenu($this->yellow->config->get("pluginLocation"));
$themeLocationLength = strlenu($this->yellow->config->get("themeLocation"));
@@ -2906,6 +2906,7 @@ class YellowToolbox
"svg" => "image/svg+xml",
"txt" => "text/plain",
"woff" => "application/font-woff",
+ "woff2" => "application/font-woff2",
"xml" => "text/xml; charset=utf-8");
$contentType = "";
$extension = $this->getFileExtension($fileName);