We have a price comparison website which works by importing feeds and placing the data into a database. We recently had an admin section (/admin2), which allows us to edit the titles of any product - this data is then entered into the "products" table in the database, which then updates the "products" database when necessary.
The idea of being able to edit the products titles ourselves was so that identical products from different shops, but with slightly different names can be "merged" and compared by the system.
The problem, however, is that the admin section has resulted in a large number of products being incorrectly renamed. For example, if you look at:
[url removed, login to view]+Moto+Chopper+Dirt+Bike, you'll see a large number of unrelated products that were accidentally renamed to "Mini+Moto+Chopper+Dirt+Bike". All of the products on this page have the word "mini" in, so instead of only renaming that particular product, the scripts seem to be renaming all products that match that search!
Just by browsing the site, you'll notice a number of other incorrectly renamed products such as:
[url removed, login to view]+Digital+Camera
[url removed, login to view]+Drinking+Party+Game
The page in question is /[url removed, login to view], but the other files may help.
Your job is to work out the problem, explain it to us, and fix it. Renaming a product in the admin panel and clicking "save" should only result in that product being changed, not any others.
The feature to recategorise/edit categories must remain unchanged (this feature does a search of the database and changes the category for all products with that exact name).
If you have any questions, please do not hesitate to ask. Priority will be given to coders who have looked at the attached files.