Hide from public view bug

Small bug with "Hide from public view" button not saving the setting as
"NO". Also had a test for $public as boolean instead of checking for
"YES" value.