Use Config instead of globals in CategoryViewer.php

Change-Id: If33619694f1cf298b356a1761e454e274fe6aa5c