He held both positions until he was replaced by incoming Mayor Ed Koch on January 5, 1978.
The passage describes a person who held two roles until they were succeeded by the incoming mayor, Ed Koch, on January 5, 1978.