diff options
author | Andreas Gohr <andi@splitbrain.org> | 2011-06-18 10:16:47 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2011-06-18 10:16:47 +0200 |
commit | 28f4004c937cfc11f16e6cc7c0eb7da1a61dfcbe (patch) | |
tree | bd271a130837a35f1ca5932d57d1e0c730c10468 /lib/exe/css.php | |
parent | 809d3ba53bea8b34155cb8d009d7fa4b8a7bbdaf (diff) | |
download | rpg-28f4004c937cfc11f16e6cc7c0eb7da1a61dfcbe.tar.gz rpg-28f4004c937cfc11f16e6cc7c0eb7da1a61dfcbe.tar.bz2 |
Made the maximum embed size for datauris configurable
The feature is now disabled by default.
Metadata for config manager was added.
Diffstat (limited to 'lib/exe/css.php')
-rw-r--r-- | lib/exe/css.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php index 02ed169c4..92d198e19 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -289,6 +289,8 @@ function css_loadfile($file,$location=''){ * Callback for preg_replace_callback */ function css_datauri($match){ + global $conf; + $pre = unslash($match[1]); $base = unslash($match[2]); $url = unslash($match[3]); @@ -296,7 +298,7 @@ function css_datauri($match){ $local = DOKU_INC.$url; $size = @filesize($local); - if($size && $size < 600){ + if($size && $size < $conf['cssdatauri']){ $data = base64_encode(file_get_contents($local)); } if($data){ |