my $found_fm_tables = {};
foreach my $name ( $RT::Handle->_TableNames ) {
next unless $name =~ /^fm_/i;
my $found_fm_tables = {};
foreach my $name ( $RT::Handle->_TableNames ) {
next unless $name =~ /^fm_/i;
return unless %$found_fm_tables;
unless ( $found_fm_tables->{fm_topics} && $found_fm_tables->{fm_objecttopics} ) {
return unless %$found_fm_tables;
unless ( $found_fm_tables->{fm_topics} && $found_fm_tables->{fm_objecttopics} ) {
my $dbh = $RT::Handle->dbh;
my $result = $dbh->selectall_arrayref("SELECT count(*) AS articlecount FROM FM_Articles", { Slice => {} } );
if ($result->[0]{articlecount} > 0) {
my $dbh = $RT::Handle->dbh;
my $result = $dbh->selectall_arrayref("SELECT count(*) AS articlecount FROM FM_Articles", { Slice => {} } );
if ($result->[0]{articlecount} > 0) {