]> git.koha-community.org Git - koha.git/commit
Bug 17669: [QA Follow-up] More consistency in return values of delete
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 3 Apr 2017 17:14:52 +0000 (19:14 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 21 Apr 2017 17:55:25 +0000 (13:55 -0400)
commitaee0682d60ddf1f21c5802001d8af91b43102e51
tree0208fdd6126d60684483d245eb9a46e067adfd60
parent05e25dbc188d9d6340d03750a47cb1cce130715f
Bug 17669: [QA Follow-up] More consistency in return values of delete

See Bugzilla comment36 (QA request).

Koha::UploadedFile->delete
Returns 1, 0E0 or -1 (unknown).

Koha::UploadedFiles->delete and delete_temporary
Returns number of deleted records, 0E0 or -1.

POD lines are corrected accordingly. Unit tests adjusted too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Added a note that Koha::Object->delete itself is not completely consistent
with Koha::Objects->delete (DBIx). The singular may return 1 when it
gets 0E0 from DBIx, while the plural one may return 0E0. But should be
handled somewhere else.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/UploadedFile.pm
Koha/UploadedFiles.pm
t/db_dependent/Upload.t