mewantjob

Topic: Preventing double activation

Here's a really small quick thing.  In testing, I already accidentally clicked the activate link on the same posting notification email twice.  Probably will be more chance of that when the site's up.  This doesn't mess up the data, but it does send a duplicate email to the client which makes the site appear less than totally smooth.

To prevent this, in page_activate.php, replace

if ((isset($_SESSION['later_edit']) && $_SESSION['later_edit'] == $j->GetAuth()) || ($extra != '' && $extra == $j->GetAuth()))

with

if (((isset($_SESSION['later_edit']) && $_SESSION['later_edit'] == $j->GetAuth()) || ($extra != '' && $extra == $j->GetAuth())) && !$j->GetActiveStatus())

That's it.