Bug 5379 - import_borrowers.pl fails with db insert/update errors
authorChris Nighswonger <cnighswonger@foundations.edu>
Fri, 12 Nov 2010 14:34:52 +0000 (09:34 -0500)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Sun, 10 Jul 2011 18:31:23 +0000 (14:31 -0400)
commit1ea00e655fe0cacdb081da5c628c1e0969bc2619
treee0637dddc58eb63e2612b463c5573cf68979ba3f
parent99728ab8831f0f4913bc0832cbdd203a68c13270
Bug 5379 - import_borrowers.pl fails with db insert/update errors

Some spreadsheet programs use smart quotes which causes the db to throw
an error when an insert/update is attempted due to improper processing
of the CSV file. This patch adds code to check for smart quotes and change
them to "dumb" quotes.

This patch also adds more logging of errors and a notice to the user to check
the logs for errors when they occur.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit ae48ebbcaae50a0af7ceca00d04f2aedb8d5cc2c)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
C4/Members.pm
C4/Members/Attributes.pm
tools/import_borrowers.pl