checkoverdues should not require $dbh
authorJoe Atzberger <joe.atzberger@liblime.com>
Sat, 20 Jun 2009 00:32:42 +0000 (19:32 -0500)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 16 Sep 2009 21:19:13 +0000 (23:19 +0200)
commitc0fd827a8ab61d95e182c917b10d38fdb793a25f
tree57db1f2223b94d9fa9edc628472a437b63b1f6ef
parentfdf6cda5778134cbdadc9cfb48e65e714e1e6be5
checkoverdues should not require $dbh

Passing $dbh around is an ancient style that doesn't know
to use C4::Context.  C4::Context->dbh is efficient, especially
for modules that already use Context, including almost all C4.

I also internalized $today into the SQL using NOW() in the query
and removed sth->finish.  Even though I dislike the return style
that gives the count, then the array, I left it becuase I don't
have time to fix/test all the callers.  However, I did convert
it so it doesn't require a $count variable and its own loop.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
C4/Overdues.pm