317 - Attorney fees and costs.

     § 317.  Attorney fees and costs.        In an action brought under section 315(b) (relating to right     of action), the court may do any of the following:            (1)  If the court determines that the local government        unit enacted or enforced an unauthorized local ordinance with        negligent disregard of the limitation of authority        established under State law, it may order the local        government unit to pay the plaintiff reasonable attorney fees        and other litigation costs incurred by the plaintiff in        connection with the action.            (2)  If the court determines that the action brought by        the plaintiff was frivolous or was brought without        substantial justification in claiming that the local        ordinance in question was unauthorized, it may order the        plaintiff to pay the local government unit reasonable        attorney fees and other litigation costs incurred by the        local government unit in defending the action.