Steps to Reproduce:
- Set up an UploadWizard campaign with a start date in the past and end date in the future.
- Set both whileActive and afterActive messages.
- Go to UploadWizard with the created campaign.
Actual Results:
- The afterActive message appears.
Expected Results:
- The whileActive message appears.
Further Details:
- The currently active Wiki Loves Folklore campaign exhibited this behavior before a hot fix.
- The modifyIfNecessary function smells for me: if I understand the code right, both $cnf === 'whileActive' && $this->isActive() and $cnf === 'afterActive' && $this->wasActive() can be true at a given time, as wasActive does not necessarily mean that the campaign is already finished. This leads to essentially a race condition: whichever config key is iterated later, that wins.