Open-org/PhotoAccounting — pull request #62 by nukedss (2012-10-08 20:05:17+00:00)
Title: Bug fixes from the last pull

email.php

- If device id does not exist in cust_devices then create new customer in customer with the email address provided, then create new row in cust_devices with the newly created customerid and the device id provided
- If device id exists in cust_devices, then look up the corresponding customerid in customer and replace the email address with the email address received by email.php

imageuploader.php
- If device id does not exist in cust_devices, then create new customer in customer with empty email address, then create new row in cust_devices with the newly created customerid and the device id provided
- If device id does not exist in cust_devices, then just use the corresponding customerid

--------------------------
I have tested the sql logic in these files for:
1. non-existent device_id, non-existent email
2. non-existent device_id, existent email
3. existent device_id

Existent device_id and non existent email wasn't tested as this was considered an impossibility.