]> git.imager.perl.org - bse.git/blame - site/cgi-bin/modules/BSE/TB/Site.pm
use new style field macros for the file edit page
[bse.git] / site / cgi-bin / modules / BSE / TB / Site.pm
CommitLineData
7646d96e
TC
1package BSE::TB::Site;
2use strict;
3use base qw(BSE::TB::SiteCommon);
4
081a2a9b 5our $VERSION = "1.002";
cb7fd78d 6
7646d96e
TC
7# like an article, but doesn't exist in the database
8
9sub new {
10 my ($class) = @_;
11
12 return bless
13 {
14 id => -1,
15 title => "Your site",
39e87dbd 16 generator => 'BSE::Generate::Article',
7646d96e
TC
17 parentid=>0,
18 level => 0,
19 body => '',
20 flags => '',
21 listed => 0,
22 }, $class;
23}
24
25sub id {
26 -1;
27}
28
8f88bb20
TC
29sub data_only {
30 my ($self) = @_;
31
32 return
33 {
34 map { $_ => $self->{$_} } grep /^[^_]/, keys %$self
35 };
36}
37
537e14d6
TC
38sub restricted_method {
39 my ($self, $name) = @_;
40
41 return $name =~ /^new$/;
42}
43
7646d96e 441;