Hi,
there seems to be a bug in
sub build_changed_flags in Links/Build.pm:
in line 680 ff.:
Code:
# Update the category flags.
my $catlink_db = $DB->table ('Links', 'CatLinks');
my $cat_db = $DB->table ('Category');
$cat_db->indexing(0);
$cat_db->update ( { Has_Changed_Links => 'No' }, {}, { GT_SQL_SKIP_CHECK => 1 } );
my $sth = $catlink_db->select ( { isChanged => 'Yes' }, ['CategoryID', '
Add_Date'] );
while (my ($cat_id, $date) = $sth->fetchrow_array) {
my $parents = $cat_db->parents ($cat_id);
my $str = '(' . join (',', $cat_id, @$parents) . ')';
$cat_db->update ( { Newest_Link => $date,
Has_New_Links => 'Yes' }, GT::SQL::Condition->new ('ID', 'IN', \$str), { GT_SQL_SKIP_CHECK => 1 } );
}
should be:
Code:
# Update the category flags.
my $catlink_db = $DB->table ('Links', 'CatLinks');
my $cat_db = $DB->table ('Category');
$cat_db->indexing(0);
$cat_db->update ( { Has_Changed_Links => 'No' }, {}, { GT_SQL_SKIP_CHECK => 1 } );
my $sth = $catlink_db->select ( { isChanged => 'Yes' }, ['CategoryID', '
Mod_Date'] );
while (my ($cat_id, $date) = $sth->fetchrow_array) {
my $parents = $cat_db->parents ($cat_id);
my $str = '(' . join (',', $cat_id, @$parents) . ')';
$cat_db->update ( {
Has_Changed_Links => 'Yes' }, GT::SQL::Condition->new ('ID', 'IN', \$str), { GT_SQL_SKIP_CHECK => 1 } );
}
At least after changing Build.pm as described
and setting isChanged to 'No' manually via SQL all categories with changed links are flagged accordingly and showing the 'updated' icon on my pages after all.
Manually setting isChanged to 'No' is necessary because the code above comes into action
only if there are links that were modified (Mod_Date >= Add_Date) but their isChanged value is
not set to 'Yes' (see lines 671 - 678 in Build.pm).
Best regards
Andreas
http://www.archaeologie-online.de