]>
git.ipfire.org Git - thirdparty/bugzilla.git/blob - clean-bug-user-last-visit.pl
2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 # This Source Code Form is "Incompatible With Secondary Licenses", as
7 # defined by the Mozilla Public License, v. 2.0.
11 clean-bug-user-last-visit.pl
15 This utility script cleans out entries from the bug_user_last_visit table that
16 are older than (a configurable) number of days.
18 It takes no arguments and produces no output except in the case of errors.
28 use Bugzilla
::Constants
;
30 Bugzilla
->usage_mode(USAGE_MODE_CMDLINE
);
32 my $dbh = Bugzilla
->dbh;
33 my $sql = 'DELETE FROM bug_user_last_visit WHERE last_visit_ts < '
34 . $dbh->sql_date_math('NOW()',
36 Bugzilla
->params->{last_visit_keep_days
},