Supposedly, the first fall from the top of the cell was planned, the 2nd where he broke through the roof was not. That is what was said in interviews. I don't buy it because it just looked like that was what the plan was the way they set the spot up during the match.
However, I am the type that always assumes a work is happening. There is a part of my brain that thinks the Montreal Screwjob was a work, but hey.
No matter what, I do believe that Foley's injuries and state of mind during the match were legit effect of the bumps.
Meltzer just said on a recent show (think it was the Hell in a Cell review show) that the plan was for Foley to go through the cell but he wasn't suppose to go straight through the way he did. Apparently he was suppose to get chokeslammed, then roll over and fall "with" the cell so the fall would be a little shorter.