Update ajax-functions.php

Fixed a bug that resulted in multisite links getting mixed up.