JacksonRiver/springboard_modules — pull request #82 by benclark (2012-06-18 22:32:57+00:00)
Title: Fixes for the Fundraiser standalone cron to match the changes to queue_processor

Fixes for the Fundraiser standalone cron to match the changes to queue_processor (sha 83b0a5a5). Allows Fundraiser standalone cron to work via Drush (instead of cron.php).

Summary of changes:

* Changed fundraiser_cron() to simply skip calling anything when the standalone cron is enabled, rather than having it try to figure out where the request was coming from via a regex on REQUEST_URI. The assumption is made that when hook_cron() is invoked, it's coming from one form of cron or another.
* Changed fundraiser_menu() to have the fundraiser_cron path call a new menu callback, fundraiser_standalone_cron. It was previously calling fundraiser_cron(), which is why the regex was there in the first place. This new menu callback calls _fundraiser_cron_process().
* Added _fundraiser_cron_process() for both crons to share the same processing logic: check sustainer key, then call fundraiser_process_recurring_donations().
* Rather than wrapping the menu item in an if statement that checks whether standalone cron is enabled, I added an access callback that checks whether standalone cron is enabled. It assumes that if it is, all requests are allowed (i.e. just like it was previously with access callback => TRUE). Now the menu router cache won't need to be rebuilt to turn standalone cron on and off.