https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153

Marcel de Rooy <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|BLOCKED                     |Failed QA

--- Comment #10 from Marcel de Rooy <[email protected]> ---
+# FIXME The output for dry-run mode needs to be improved
Yes. Agreed.

+    $tokens->delete if $confirm;
+    say sprintf "Removed %s expired OAuth2 tokens", $count if $verbose;
This might be confusing. Among other examples.

* perl misc/cronjobs/cleanup_database.pl -m 10 -v
Mail queue purge triggered for 10 days.
Use of uninitialized value $count in concatenation (.) or string at
misc/cronjobs/cleanup_database.pl line 293.
 messages were deleted from the mail queue.

So uninitialized warning that we do not want.
But this example could serve to illustrate that even the wrong count could have
been printed. Look at:
    if ( $confirm ) {
        $sth->execute($mail) or die $dbh->errstr;
        $count = $sth->rows;
    }
    print "$count messages were deleted from the mail queue.\nDone with
message_queue purge.\n" if $verbose;
=> Since the count is not set, it could well be the count of a former statement
!

I do not think that this is ready for production. Since we do not really
support testing for many options, I do not see why this patch is useful.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to