Court orders disciplinary action against magistrate for detention without reasons