Remove slow CASE WHEN statement since this is handled in PHP anyway
Merge branch '2.4-LazyOptimised' of github.com:BJMDesign/sapphire into 2.4-LazyOptimised