Providing the hydraulic system wasn't running at the time you should be fine. Just drain everything out, change all filters, flush with some hydraulic fluid, then put it all back together. If it was running there could possibly be damage. There's really only two ways I can think of to tell if there's damage. The time consuming, but probably cheaper in the long, way would be to tear the pump down and inspect it for wear/damage, replace/repair whatever needs it and put it back together. The other way is to just fire t back up and hope for the best. If there's no damage, you're golden. If there's damage then you've probably just made it a heck of a lot worse and more expensive. I guess the choice is yours ;)