From a0cbaf877f0ca9dbc12cc187edc3787c05a1c64b Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Fri, 12 Mar 2010 14:08:24 -0500 Subject: [PATCH] minor test patch to see if i can't fix a macro issue --- plugins/factoids.pm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/plugins/factoids.pm b/plugins/factoids.pm index 113f055..31af94a 100644 --- a/plugins/factoids.pm +++ b/plugins/factoids.pm @@ -454,11 +454,11 @@ sub _db_get_protect { sub _db_get_fact { - my( $self, $subj, $name ) = @_; + my( $self, $subj, $name, $func ) = @_; my $dbh = $self->dbh; my $fact = $dbh->selectrow_hashref( " - SELECT factoid_id, subject, copula, predicate, author, modified_time, compose_macro, protected + SELECT factoid_id, subject, copula, predicate, author, modified_time, compose_macro, protected, original_subject FROM factoid WHERE original_subject = ? ORDER BY factoid_id DESC @@ -467,7 +467,15 @@ sub _db_get_fact { $subj, ); - return $fact; + if ($func && (!$fact->{compose_macro})) + { + return undef; + } + else + { + return $fact; + } + } sub basic_get_fact {