Fixed token fontpath in windows. Ticket #3316.

This commit is contained in:
Daniel Maya 2016-08-23 11:56:09 +02:00
parent bb26f4b82d
commit 2dffe9b1b8
1 changed files with 5 additions and 4 deletions

View File

@ -647,14 +647,15 @@ ui_require_jquery_file ("colorpicker");
function load_fonts() {
global $config;
$dir = scandir($config['homedir'] . '/include/fonts/');
$home = str_replace('\\', '/', $config['homedir'] );
$dir = scandir($home. '/include/fonts/');
$fonts = array();
foreach ($dir as $file) {
if (strstr($file, '.ttf') !== false) {
$fonts[$config['homedir'] . '/include/fonts/' . $file] = $file;
$fonts[$home . '/include/fonts/' . $file] = $file;
}
}