|
Revision 1609, 1.2 kB
(checked in by bchoate, 20 months ago)
|
|
Removing redundant index.
|
-
Property svn:keywords set to
Id Revision
|
| Line | |
|---|
| 1 | # Movable Type (r) Open Source (C) 2001-2008 Six Apart, Ltd. |
|---|
| 2 | # This program is distributed under the terms of the |
|---|
| 3 | # GNU General Public License, version 2. |
|---|
| 4 | # |
|---|
| 5 | # $Id$ |
|---|
| 6 | |
|---|
| 7 | package MT::ObjectTag; |
|---|
| 8 | |
|---|
| 9 | use strict; |
|---|
| 10 | |
|---|
| 11 | use MT::Blog; |
|---|
| 12 | use base qw( MT::Object ); |
|---|
| 13 | |
|---|
| 14 | __PACKAGE__->install_properties({ |
|---|
| 15 | column_defs => { |
|---|
| 16 | 'id' => 'integer not null auto_increment', |
|---|
| 17 | 'blog_id' => 'integer', |
|---|
| 18 | 'object_id' => 'integer not null', |
|---|
| 19 | 'object_datasource' => 'string(50) not null', |
|---|
| 20 | 'tag_id' => 'integer not null', |
|---|
| 21 | }, |
|---|
| 22 | indexes => { |
|---|
| 23 | object_id => 1, |
|---|
| 24 | tag_id => 1, |
|---|
| 25 | object_datasource => 1, |
|---|
| 26 | # For MTTags |
|---|
| 27 | blog_ds_tag => { |
|---|
| 28 | columns => ['blog_id', 'object_datasource', 'tag_id'], |
|---|
| 29 | }, |
|---|
| 30 | # For tag count |
|---|
| 31 | blog_ds_object_tag => { |
|---|
| 32 | columns => ['blog_id', 'object_datasource', 'object_id', 'tag_id'], |
|---|
| 33 | }, |
|---|
| 34 | }, |
|---|
| 35 | child_of => 'MT::Blog', |
|---|
| 36 | datasource => 'objecttag', |
|---|
| 37 | primary_key => 'id', |
|---|
| 38 | cacheable => 0, |
|---|
| 39 | }); |
|---|
| 40 | |
|---|
| 41 | sub class_label { |
|---|
| 42 | MT->translate("Tag Placement"); |
|---|
| 43 | } |
|---|
| 44 | |
|---|
| 45 | sub class_label_plural { |
|---|
| 46 | MT->translate("Tag Placements"); |
|---|
| 47 | } |
|---|
| 48 | |
|---|
| 49 | 1; |
|---|
| 50 | __END__ |
|---|
| 51 | |
|---|
| 52 | =head1 NAME |
|---|
| 53 | |
|---|
| 54 | MT::ObjectTag |
|---|
| 55 | |
|---|
| 56 | =head1 AUTHOR & COPYRIGHT |
|---|
| 57 | |
|---|
| 58 | Please see L<MT/AUTHOR & COPYRIGHT>. |
|---|
| 59 | |
|---|
| 60 | =cut |
|---|