That was an intro/crossover epi or two for The Sarah Jane Adventures.
They even brought back K9.
Great line by Billie Piper's BF talking to SJ: "OMG- I'm the tin dog!"
One of the best episodes of Tennant’s era. It really dissected the relationship of The Doctor/Sarah/Rose. You also see the the Doctor highly tempted to side with the bad guys, and it is Sarah Jane who pulls him back to his senses. I liked that episode a lot.