/** * @throws OrganisationUnitIDMissingException */ public static function toogle_visible() { if ($_GET['id']) { $organisation_unit = new OrganisationUnit($_GET['id']); $paramquery = $_GET; unset($paramquery['action']); unset($paramquery['id']); $params = http_build_query($paramquery, '', '&'); if ($organisation_unit->get_hidden() == true) { $hidden = false; } else { $hidden = true; } if ($organisation_unit->set_hidden($hidden)) { Common_IO::step_proceed($params, "Upwards", "Operation Successful", null); } else { Common_IO::step_proceed($params, "Upwards", "Operation Failed", null); } } else { throw new OrganisationUnitIDMissingException(); } }