I have a slightly old PHP project I'm working on for a client (I think it was started around 5 years ago), it makes extensive use of the outmoded
mysql_query function, which is concerning not only because it's now deprecated but because it could also open security holes.
The project doesn't seem to have much of a structure either, I think the original developer had some kind of method when working on it, but there's no documentation and I'm not able to get in contact with him regarding said project.
As I've been going through I've been switching the database queries to use PDO, and trying to clean things up a little, but it's quite a big project (a few hundred php files) and I don't want to spend too much time restructuring things at it detracts from the time I've got allotted to this each month.
What should I do? Would a rewrite be a good idea? Or should I simply try and re-mold the current project into something a little nicer?