I noticed this sub routine in Build.pm, Link 2.X
sub build_reset_hits {
# ------------------------------------------------------------------
# Remove old hit and rate tracking information.
#
Links::init_date();
my $delete_by = GT::Date::date_get ( time() - 172800 ); # 2 days old
my $click_db = $DB->table ('ClickTrack');
$click_db->delete ( GT::SQL::Condition->new ( 'Created', '<', $delete_by ));
}
I changed to this:
sub build_reset_hits {
# ------------------------------------------------------------------
# Remove old hit and rate tracking information.
#
Links::init_date();
my $delete_by = GT::Date::date_get ( time() - 172800 ); # 2 days old
my $link_db = $DB->table ('Links');
$link_db->delete ( GT::SQL::Condition->new ( 'Created', '<', $delete_by ));
}
So when I do a build it will remove old links. I also made a new table "Created" and in Add.cgi use NOW to generate the timestamp.
I did everything right but when i build change, it won't delete the link with old timestamp. Please help.
sub build_reset_hits {
# ------------------------------------------------------------------
# Remove old hit and rate tracking information.
#
Links::init_date();
my $delete_by = GT::Date::date_get ( time() - 172800 ); # 2 days old
my $click_db = $DB->table ('ClickTrack');
$click_db->delete ( GT::SQL::Condition->new ( 'Created', '<', $delete_by ));
}
I changed to this:
sub build_reset_hits {
# ------------------------------------------------------------------
# Remove old hit and rate tracking information.
#
Links::init_date();
my $delete_by = GT::Date::date_get ( time() - 172800 ); # 2 days old
my $link_db = $DB->table ('Links');
$link_db->delete ( GT::SQL::Condition->new ( 'Created', '<', $delete_by ));
}
So when I do a build it will remove old links. I also made a new table "Created" and in Add.cgi use NOW to generate the timestamp.
I did everything right but when i build change, it won't delete the link with old timestamp. Please help.