From f03d5659fdb7d18cddba23bb3c703e9d210d0ab9 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Sat, 5 Mar 2016 16:25:23 +0100 Subject: [PATCH] Move assignment of $dir outside of loop Change-Id: I24009db72d0afbb47532eb2c00329e488461066f --- data/fontrepo/scripts/compile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/fontrepo/scripts/compile.php b/data/fontrepo/scripts/compile.php index 98c74f4f..008988fc 100644 --- a/data/fontrepo/scripts/compile.php +++ b/data/fontrepo/scripts/compile.php @@ -16,6 +16,8 @@ foreach ( glob( '../fonts/*/font.ini' ) as $inifile ) { $languages = array(); $version = null; + $dir = dirname( $inifile ); + foreach ( $conf as $fontname => $font ) { if ( isset( $font['languages'] ) ) { $languages = explode( ',', $font['languages'] ); @@ -52,8 +54,6 @@ foreach ( glob( '../fonts/*/font.ini' ) as $inifile ) { $list['fonts'][$fontname]['fontstyle'] = $font['fontstyle']; } - $dir = dirname( $inifile ); - if ( isset( $font['ttf'] ) ) { $list['fonts'][$fontname]['ttf'] = basename( $dir ) . '/' . $font['ttf']; }