File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ function try_fetch($row){
100100
101101 $ inx = 'emoji_u ' .$ root .'.png ' ;
102102 if (file_exists ("$ src/ $ inx " )){
103+
103104 copy ("$ src/ $ inx " , "$ dst/ $ out " );
104105 echo '. ' ;
105106 return ;
@@ -108,26 +109,31 @@ function try_fetch($row){
108109
109110
110111 #
111- # flags come from elsewhere ...
112+ # manually mapped flags next ...
112113 #
113114
114- if (preg_match ('!flag-(..)! ' , $ row ['short_name ' ], $ m )){
115-
116- $ cc = StrToUpper ($ m [1 ]);
115+ if (isset ($ flag_map [$ row ['short_name ' ]])){
116+ $ cc = $ flag_map [$ row ['short_name ' ]];
117117
118118 if (file_exists ("{$ src_flags }/ {$ cc }.png " )){
119119 copy ("{$ src_flags }/ {$ cc }.png " , "$ dst/ $ out " );
120- echo ', ' ;
120+ echo ': ' ;
121121 return ;
122122 }
123123 }
124124
125- if (isset ($ flag_map [$ row ['short_name ' ]])){
126- $ cc = $ flag_map [$ row ['short_name ' ]];
125+
126+ #
127+ # flags based just on cc
128+ #
129+
130+ if (preg_match ('!flag-(..)! ' , $ row ['short_name ' ], $ m )){
131+
132+ $ cc = StrToUpper ($ m [1 ]);
127133
128134 if (file_exists ("{$ src_flags }/ {$ cc }.png " )){
129135 copy ("{$ src_flags }/ {$ cc }.png " , "$ dst/ $ out " );
130- echo ': ' ;
136+ echo ', ' ;
131137 return ;
132138 }
133139 }
You can’t perform that action at this time.
0 commit comments