FAA: May I log as cross-country a flight with two or more short legs? Consider a hypothetical flight plan from Redstone to Cullman to Gadsden and back to Redstone. This flight would have legs in order of 26, 42, and 52 nautical miles.

14 CFR 61.1 provides

Cross-country time means—
…
(ii) For the purpose of meeting the aeronautical experience requirements (except for a rotorcraft category rating), for a private pilot certificate (except for a powered parachute category rating), a commercial pilot certificate, or an instrument rating, or for the purpose of exercising recreational pilot privileges (except in a rotorcraft) under §61.101(c), time acquired during a flight—
    (A) Conducted in an appropriate aircraft;
    (B) That includes a point of landing that was at least a straight-line distance of more than 50 nautical miles from the original point of departure; and
    (C) That involves the use of dead reckoning, pilotage, electronic navigation aids, radio aids, or other navigation systems to navigate to the landing point.

The original point of departure is Redstone Army Airfield, and Northeast Alabama Regional is farther than 50 nautical miles away. Would the entire flight count toward the cross-country experience requirements for a private pilot certificate, commercial pilot certificate, or instrument rating? Must the pilot fly the 50+ nm leg first?
From a 2008 FAA interpretation sent to E. Thomas Sisk:

… cross-country flight time is defined as time acquired during a flight that includes a point of landing that is at least a straight-line distance of more than 50 nm from the original point of departure, not the original point of any flight leg. There is no requirement that any specific leg must be 50 nm. Moreover, a cross-country flight may include several legs that are less than a straight-line distance of more than 50 nm from the original point of departure. Nevertheless, at least one leg of the cross-country flight, however long by itself, must include a point of landing that is at least a straight-line distance of more than 50 nm from the original point of departure (i.e. of the flight, not of that particular leg).
Given the above analysis, the answer is each cross-county flight used to meet the aeronautical experience requirements under 14 CFR §61.1 (b)(3) must include one leg that includes a landing that is at least a straight-line distance of more than 50 nm from the original point of departure.

From the above, it is pretty clear that the order of flying does not matter and you can log the whole flight.
Also, see this AOPA response.