Check that a value for global messaging is set before using it's value

If the user doesn't have the massmessage-global userright, they won't get the
checkbox, so a value is never set for $data['global']. Now it checks that
the value is set and is true.

Change-Id: I88daf6faaab9af32685d6ca9b1cd1f261fd03bb1
Merge "Check that a value for global messaging is set before using it's value"