mirror of
https://github.com/perlbot/perlbuut
synced 2025-06-08 00:55:42 -04:00
minor test patch to see if i can't fix a macro issue
This commit is contained in:
parent
af3280e753
commit
a0cbaf877f
1 changed files with 11 additions and 3 deletions
|
@ -454,11 +454,11 @@ sub _db_get_protect {
|
||||||
|
|
||||||
|
|
||||||
sub _db_get_fact {
|
sub _db_get_fact {
|
||||||
my( $self, $subj, $name ) = @_;
|
my( $self, $subj, $name, $func ) = @_;
|
||||||
|
|
||||||
my $dbh = $self->dbh;
|
my $dbh = $self->dbh;
|
||||||
my $fact = $dbh->selectrow_hashref( "
|
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
|
FROM factoid
|
||||||
WHERE original_subject = ?
|
WHERE original_subject = ?
|
||||||
ORDER BY factoid_id DESC
|
ORDER BY factoid_id DESC
|
||||||
|
@ -467,7 +467,15 @@ sub _db_get_fact {
|
||||||
$subj,
|
$subj,
|
||||||
);
|
);
|
||||||
|
|
||||||
return $fact;
|
if ($func && (!$fact->{compose_macro}))
|
||||||
|
{
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $fact;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub basic_get_fact {
|
sub basic_get_fact {
|
||||||
|
|
Loading…
Add table
Reference in a new issue