fix inheritence for BSE::DummyArticle
[bse.git] / site / cgi-bin / modules / BSE / DummyArticle.pm
CommitLineData
6c8fac02 1package BSE::DummyArticle;
8c29aaac 2use strict;
6c8fac02 3use base 'BSE::TB::SiteCommon';
a85fb6e0 4use base 'BSE::FormatterBase';
e0ed81d7 5use BSE::TB::Articles;
14e4ca03 6use base 'BSE::MetaOwnerBase';
6c8fac02 7
14e4ca03 8our $VERSION = "1.007";
6c8fac02
TC
9
10sub images {
11 return;
12}
13
14sub files {
15 return;
16}
17
18{
e0ed81d7 19 for my $name (BSE::TB::Article->columns) {
6c8fac02
TC
20 eval "sub $name { \$_[0]{$name} }";
21 }
22}
23
24sub restricted_method {
25 return 0;
26}
27
28sub section {
29 $_[0];
30}
31
32sub is_descendant_of {
33 0;
34}
35
36sub parent {
37 return;
38}
39
40sub is_dynamic {
41 1;
42}
43
44sub is_step_ancestor {
45 0;
46}
47
48sub menu_ancestors {
49 return;
50}
51
d0180060
AO
52sub should_index {
53 1;
54}
55
d5052b4d
TC
56sub tags {
57 ();
58}
59
4e0d7704
AO
60sub has_tags {
61 0;
62}
63
d5052b4d
TC
64sub meta_owner_type {
65 'bse_article';
66}
67
68sub meta_meta_cfg_section {
69 "global article metadata";
70}
71
72sub meta_meta_cfg_prefix {
73 "article metadata";
74}
75
76sub metafields {
77 my ($self, $cfg) = @_;
78
79 $cfg ||= BSE::Cfg->single;
80
81 my %metanames = map { $_ => 1 } $self->metanames;
82
83 require BSE::ArticleMetaMeta;
84 my @fields = grep $metanames{$_->name} || $_->cond($self), BSE::ArticleMetaMeta->all_metametadata($cfg);
85
86 return ( @fields );
87}
88
89
6c8fac02 901;