allow PROTECTED and OFFICIAL flags to work as intended in deadwiki script

Lots of useless whitespace changes here so use ?w=1 when viewing.