Appeals court quashes drill-friendly state law