dingproject/drupal-office_hours — pull request #4 by kasperg (2011-12-22 14:41:49+00:00)
Title: Ensure rule order

The rules should be retrieved in the same order as they appear in the administration UI.

This is extremely important as [subsequent code assumes that they appear in this order](https://github.com/Roedovre-Bibliotekerne/drupal-office_hours/blob/DRUPAL-6--2/office_hours.module#L547). If this is not the case users have no chance of knowing what rules will be evaluated first and thus setting the correct order. A rule with scope "all" encountered too soon will override any other rule.

We have encountered [situations where this was the case](https://libraryding.lighthouseapp.com/projects/73205/tickets/4-problemer-med-bningstider-i-2012#ticket-4-14) leading to much confusion.

To ensure retrieval in correct order and ORDER BY has to be introduced.