Right at the end. You don't have an "fi" to match the first "if". Or at least that is what I think it is. It felt like there was a couple of possibilities as I wasn't completely sure what it doing.
The way I would indent this is:
Code:
program:
if check_yes_no(field('#onkobo'), '', '1', '') then
'sync.png'
else
if check_yes_no(field('#onkobo'), '', '', '1') then
if str_in_list(field('#onkobo'), ',', "Kobo Store", '1', '') then
'drm-locked.png'
fi
else
'reader.png'
fi
fi
I'm still not sure if that is correct as there is a path through it that will does not return an icon name. I can't tell if that is deliberate, means it isn't complete or I've missed something.