Fixes listing of "All" categories (#4937)

For issue description please see #4937

This first commit is just a kludge (or is it a nice hack?) equating the value of the option for "All" categories (-1) to the really big int `2147483647` (the biggest representable in 32bit PHP compiles)