Update locallib.php