Dismissed Bogota mayor acted within the law, says judge