adminActivityLog: crashes if the version number includes a non-number

for #2220 
This code is not easy to understand. Improve readability.