API calls replaced by SQL queries in ajaxTriggers.php.