[2014.7] Prevent all `publish.` calls from publish calls

The old if statement only stopped `publish.publish` calls. Should not allow any calls to the `publish` module.