Magnetic-field effect in a two-dimensional array of short Josephson junctions