(a) In any action based upon prison conditions brought under any statute or Constitutional provision, if attorney fees are recoverable pursuant to any state statute, no attorney fees shall be awarded to a prisoner, except to the extent that:
- (1) The fees were directly and reasonably incurred by an attorney in proving an actual violation of prisoner's rights protected by the Constitution or statute; and
- (2) The amount of the fees is proportionately related to the court-ordered relief for the violation, or the fees were directly and reasonably incurred in enforcing the relief ordered for the violation.