Market ends higher to log weekly gain