Make sure variables are initialised before use
Use native PHP functions for speed improvements
Only bother tofind the latest DB update when it is needed
More efficient code for showing Reports/Forms links
Merge pull request #528 from timschofield/develop

Develop