add influence info for failed metadata matches
authorJoey Hess <joey@kitenet.net>
Thu, 22 Apr 2010 04:10:13 +0000 (00:10 -0400)
committerJoey Hess <joey@kitenet.net>
Thu, 22 Apr 2010 04:10:13 +0000 (00:10 -0400)
This is needed so that when a negated pagespec like "!author(foo)"
stops matching, due to the page being changed, ikiwiki knows that
the match was influenced by the page content.

IkiWiki/Plugin/meta.pm

index 128a6342c74a4ad13adb2f0521d85ddfb29232bb..1590086141a7306f570799387a12017fcbaeb716 100644 (file)
@@ -346,11 +346,11 @@ sub match {
                        return IkiWiki::SuccessReason->new("$re matches $field of $page", $page => $IkiWiki::DEPEND_CONTENT, "" => 1);
                }
                else {
-                       return IkiWiki::FailReason->new("$re does not match $field of $page", "" => 1);
+                       return IkiWiki::FailReason->new("$re does not match $field of $page", $page => $IkiWiki::DEPEND_CONTENT, "" => 1);
                }
        }
        else {
-               return IkiWiki::FailReason->new("$page does not have a $field", "" => 1);
+               return IkiWiki::FailReason->new("$page does not have a $field", $page => $IkiWiki::DEPEND_CONTENT);
        }
 }