diff --git a/tools/iwla_convert.pl b/tools/iwla_convert.pl index 2df1928..5141818 100755 --- a/tools/iwla_convert.pl +++ b/tools/iwla_convert.pl @@ -17,6 +17,7 @@ sub dumpList { foreach $r (@list) { $r =~ s/\'/\\\'/g; + if ($first == 0) { print $FIC ", "; @@ -37,6 +38,7 @@ sub dumpHash { while( my ($k,$v) = each(%hash) ) { $k =~ s/\'/\\\'/g; $v =~ s/\'/\\\'/g; + next if ($k == "" || $v == ""); if ($first == 0) { print $FIC ", "; @@ -56,7 +58,7 @@ print $FIC "#This file was automatically generated by iwla_convert.pl. Do not ed print $FIC "robots = ["; dumpList(\@RobotsSearchIDOrder_list1, $FIC, 1); -dumpList(\@RobotsSearchIDOrder_list2, $FIC, 0); +dumpList(\@RobotsSearchIDOrder_list2, $FIC, (@RobotsSearchIDOrder_list1 == 0) ? 1 : 0); print $FIC "]\n\n"; print $FIC "search_engines = ["; @@ -65,7 +67,7 @@ print $FIC "]\n\n"; print $FIC "search_engines_2 = ["; dumpList(\@SearchEnginesSearchIDOrder_list2, $FIC, 1); -dumpList(\@Own_SearchEnginesSearchIDOrder, $FIC, 0); +dumpList(\@Own_SearchEnginesSearchIDOrder, $FIC, (@SearchEnginesSearchIDOrder_list2 == 0) ? 1 : 0); print $FIC "]\n\n"; print $FIC "not_search_engines_keys = {";