Complaint as to the legality of any ordinance or resolution must be made to the court of common pleas. In cases of ordinances laying out streets over private lands, the court shall have jurisdiction to review the propriety as well as the legality of the ordinance.