Nothing in this act shall be construed to affect the special provisions in the charter of any city already authorizing the construction or purchase of detention hospitals, or for the securing of the care and treatment of persons afflicted with contagious or communicable diseases.