-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathObjectTag.pm
63 lines (49 loc) · 1.41 KB
/
ObjectTag.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Movable Type (r) Open Source (C) 2001-2010 Six Apart, Ltd.
# This program is distributed under the terms of the
# GNU General Public License, version 2.
#
# $Id$
package MT::ObjectTag;
use strict;
use MT::Blog;
use base qw( MT::Object );
__PACKAGE__->install_properties( {
column_defs => {
'id' => 'integer not null auto_increment',
'blog_id' => 'integer',
'object_id' => 'integer not null',
'object_datasource' => 'string(50) not null',
'tag_id' => 'integer not null',
},
indexes => {
object_id => 1,
tag_id => 1,
object_datasource => 1,
# For MTTags
blog_ds_tag =>
{ columns => [ 'blog_id', 'object_datasource', 'tag_id' ], },
# For tag count
blog_ds_obj_tag => {
columns =>
[ 'blog_id', 'object_datasource', 'object_id', 'tag_id' ],
},
},
child_of => 'MT::Blog',
datasource => 'objecttag',
primary_key => 'id',
cacheable => 0,
}
);
sub class_label {
MT->translate("Tag Placement");
}
sub class_label_plural {
MT->translate("Tag Placements");
}
1;
__END__
=head1 NAME
MT::ObjectTag
=head1 AUTHOR & COPYRIGHT
Please see L<MT/AUTHOR & COPYRIGHT>.
=cut