[Rt-commit] [svn] r1244 - in rtfm/trunk: etc html/Callbacks/RTFM/autohandler html/RTFM html/RTFM/Admin/Classes html/RTFM/Admin/Elements html/RTFM/Article html/RTFM/Article/Elements html/RTFM/Elements lib/RT/FM

alexmv at pallas.eruditorum.org alexmv at pallas.eruditorum.org
Wed Jul 14 15:01:25 EDT 2004


Author: alexmv
Date: Wed Jul 14 15:01:24 2004
New Revision: 1244

Removed:
   rtfm/trunk/html/RTFM/Admin/Classes/Topics.html
   rtfm/trunk/html/RTFM/Article/Elements/EditTopics
   rtfm/trunk/html/RTFM/Article/Elements/ShowTopics
   rtfm/trunk/html/RTFM/Topics.html
   rtfm/trunk/lib/RT/FM/ObjectTopic.pm
   rtfm/trunk/lib/RT/FM/ObjectTopicCollection.pm
   rtfm/trunk/lib/RT/FM/ObjectTopicCollection_Overlay.pm
   rtfm/trunk/lib/RT/FM/Topic.pm
   rtfm/trunk/lib/RT/FM/TopicCollection.pm
   rtfm/trunk/lib/RT/FM/TopicCollection_Overlay.pm
   rtfm/trunk/lib/RT/FM/Topic_Overlay.pm
Modified:
   rtfm/trunk/etc/acl.Oracle
   rtfm/trunk/etc/acl.Pg
   rtfm/trunk/etc/drop_schema.Oracle
   rtfm/trunk/etc/drop_schema.Pg
   rtfm/trunk/etc/drop_schema.mysql
   rtfm/trunk/etc/schema.Oracle
   rtfm/trunk/etc/schema.Pg
   rtfm/trunk/etc/schema.mysql
   rtfm/trunk/html/Callbacks/RTFM/autohandler/Default
   rtfm/trunk/html/RTFM/Admin/Elements/ClassTabs
   rtfm/trunk/html/RTFM/Article/Display.html
   rtfm/trunk/html/RTFM/Article/Edit.html
   rtfm/trunk/html/RTFM/Article/PreCreate.html
   rtfm/trunk/html/RTFM/Elements/Tabs
   rtfm/trunk/lib/RT/FM/ArticleCollection_Overlay.pm
   rtfm/trunk/lib/RT/FM/Article_Overlay.pm
   rtfm/trunk/lib/RT/FM/Class_Overlay.pm
Log:
 * Revert 1212, which added topic hierarchies; these are now in the
   2.1 branch instead


Modified: rtfm/trunk/etc/acl.Oracle
==============================================================================
--- rtfm/trunk/etc/acl.Oracle	(original)
+++ rtfm/trunk/etc/acl.Oracle	Wed Jul 14 15:01:24 2004
@@ -1,4 +1,4 @@
-# Oracle doesn't need new acls
+# mysql doesn't need new acls
 sub acl {
 	return ('select id from Users where id = 1');
 }

Modified: rtfm/trunk/etc/acl.Pg
==============================================================================
--- rtfm/trunk/etc/acl.Pg	(original)
+++ rtfm/trunk/etc/acl.Pg	Wed Jul 14 15:01:24 2004
@@ -5,7 +5,7 @@
     my @acls;
 
     my @tables = qw (
-FM_Classes_id_seq
+fm_classes_id_seq
 FM_Classes 
 FM_ClassCustomFields_id_seq 
 FM_ClassCustomFields 
@@ -19,10 +19,6 @@
 FM_ArticleCFValues 
 FM_Transactions_id_seq 
 FM_Transactions 
-FM_Topics_id_seq
-FM_Topics
-FM_ObjectTopics_id_seq
-FM_ObjectTopics
 
     );
 

Modified: rtfm/trunk/etc/drop_schema.Oracle
==============================================================================
--- rtfm/trunk/etc/drop_schema.Oracle	(original)
+++ rtfm/trunk/etc/drop_schema.Oracle	Wed Jul 14 15:01:24 2004
@@ -5,8 +5,7 @@
 DROP TABLE FM_CustomFieldValues ;
 DROP TABLE FM_ArticleCFValues ;
 DROP TABLE FM_Transactions ;
-DROP TABLE FM_ObjectTopics ;
-DROP TABLE FM_Topics ;
+DROP TABLE FM_Deltas ;
 DROP sequence FM_Classes_seq;
 DROP sequence FM_ClassCustomFields_seq;
 DROP sequence FM_CustomFields_seq;
@@ -14,5 +13,4 @@
 DROP sequence FM_CustomFieldValues_seq;
 DROP sequence FM_ArticleCFValues_seq;
 DROP sequence FM_Transactions_seq;
-DROP sequence FM_ObjectTopics_seq;
-DROP sequence FM_Topics_seq;
+DROP sequence FM_Deltas_seq;

Modified: rtfm/trunk/etc/drop_schema.Pg
==============================================================================
--- rtfm/trunk/etc/drop_schema.Pg	(original)
+++ rtfm/trunk/etc/drop_schema.Pg	Wed Jul 14 15:01:24 2004
@@ -5,8 +5,7 @@
 DROP TABLE FM_CustomFieldValues ;
 DROP TABLE FM_ArticleCFValues ;
 DROP TABLE FM_Transactions ;
-DROP TABLE FM_ObjectTopics ;
-DROP TABLE FM_Topics ;
+DROP TABLE FM_Deltas ;
 DROP sequence FM_Classes_id_seq;
 DROP sequence FM_ClassCustomFields_id_seq;
 DROP sequence FM_CustomFields_id_seq;
@@ -14,5 +13,4 @@
 DROP sequence FM_CustomFieldValues_id_seq;
 DROP sequence FM_ArticleCFValues_id_seq;
 DROP sequence FM_Transactions_id_seq;
-DROP sequence FM_ObjectTopics_id_seq;
-DROP sequence FM_Topics_id_seq;
+DROP sequence FM_Deltas_id_seq;

Modified: rtfm/trunk/etc/drop_schema.mysql
==============================================================================
--- rtfm/trunk/etc/drop_schema.mysql	(original)
+++ rtfm/trunk/etc/drop_schema.mysql	Wed Jul 14 15:01:24 2004
@@ -5,6 +5,4 @@
 DROP TABLE FM_CustomFieldValues ;
 DROP TABLE FM_ArticleCFValues ;
 DROP TABLE FM_Transactions ;
-DROP TABLE FM_ObjectTopics ;
-DROP TABLE FM_Topics ;
 DELETE FROM Links;

Modified: rtfm/trunk/etc/schema.Oracle
==============================================================================
--- rtfm/trunk/etc/schema.Oracle	(original)
+++ rtfm/trunk/etc/schema.Oracle	Wed Jul 14 15:01:24 2004
@@ -1,4 +1,3 @@
-
 CREATE SEQUENCE FM_Classes_seq;
 CREATE TABLE FM_Classes (
 id NUMBER(11,0)
@@ -13,7 +12,6 @@
 LastUpdated DATE
 );
 
-
 CREATE SEQUENCE FM_ClassCustomFields_seq;
 CREATE TABLE FM_ClassCustomFields (
 id NUMBER(11,0)
@@ -27,7 +25,6 @@
 LastUpdated DATE
 );
 
-
 CREATE SEQUENCE FM_CustomFields_seq;
 CREATE TABLE FM_CustomFields (
 id NUMBER(11,0)
@@ -42,7 +39,6 @@
 LastUpdated DATE
 );
 
-
 CREATE SEQUENCE FM_Articles_seq;
 CREATE TABLE FM_Articles (
 id NUMBER(11,0)
@@ -59,7 +55,6 @@
 LastUpdated DATE
 );
 
-
 CREATE SEQUENCE FM_CustomFieldValues_seq;
 CREATE TABLE FM_CustomFieldValues (
 id NUMBER(11,0)
@@ -74,7 +69,6 @@
 LastUpdated DATE
 );
 
-
 CREATE SEQUENCE FM_ArticleCFValues_seq;
 CREATE TABLE FM_ArticleCFValues (
 id NUMBER(11,0)
@@ -88,7 +82,6 @@
 LastUpdated DATE
 );
 
-
 CREATE SEQUENCE FM_Transactions_seq;
 CREATE TABLE FM_Transactions (
 id NUMBER(11,0)
@@ -102,25 +95,3 @@
 Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
 Created DATE
 );
-
-
-CREATE SEQUENCE FM_Topics_seq;
-CREATE TABLE FM_Topics (
-id NUMBER(11,0)
-  CONSTRAINT FM_Topics_key PRIMARY KEY,
-Parent NUMBER(11,0) DEFAULT 0 NOT NULL,
-Name varchar2(255) DEFAULT '' NOT NULL,
-Description varchar2(255) DEFAULT '' NOT NULL,
-ObjectType varchar2(64) DEFAULT '' NOT NULL,
-ObjectId NUMBER(11,0) NOT NULL
-);
-
-
-CREATE SEQUENCE FM_ObjectTopics_seq;
-CREATE TABLE FM_ObjectTopics (
-id NUMBER(11,0)
-  CONSTRAINT FM_ObjectTopics_key PRIMARY KEY,
-Topic NUMBER(11,0) NOT NULL,
-ObjectType varchar2(64) DEFAULT '' NOT NULL,
-ObjectId NUMBER(11,0) NOT NULL
-);

Modified: rtfm/trunk/etc/schema.Pg
==============================================================================
--- rtfm/trunk/etc/schema.Pg	(original)
+++ rtfm/trunk/etc/schema.Pg	Wed Jul 14 15:01:24 2004
@@ -38,8 +38,6 @@
 LastUpdated TIMESTAMP NULL,
 PRIMARY KEY (id)
 );
-
-
 CREATE TABLE FM_Articles (
 id SERIAL,
 Name varchar(255) NOT NULL DEFAULT '',
@@ -54,8 +52,6 @@
 LastUpdated TIMESTAMP NULL,
 PRIMARY KEY (id)
 );
-
-
 CREATE TABLE FM_CustomFieldValues (
 id SERIAL,
 CustomField int NOT NULL,
@@ -68,8 +64,6 @@
 LastUpdated TIMESTAMP NULL,
 PRIMARY KEY (id)
 );
-
-
 CREATE TABLE FM_ArticleCFValues (
 id SERIAL,
 Article int NOT NULL,
@@ -80,9 +74,8 @@
 LastUpdatedBy integer NOT NULL DEFAULT 0,
 LastUpdated TIMESTAMP NULL,
 PRIMARY KEY (id)
-);
-
 
+);
 CREATE TABLE FM_Transactions (
 id SERIAL,
 Article integer NOT NULL DEFAULT 0,
@@ -95,23 +88,3 @@
 Created TIMESTAMP NULL,
 PRIMARY KEY (id)
 );
-
-
-CREATE TABLE FM_Topics (
-id SERIAL,
-Parent integer NOT NULL DEFAULT 0,
-Name varchar(255) NOT NULL DEFAULT '',
-Description varchar(255) NOT NULL DEFAULT '',
-ObjectType varchar(64) NOT NULL DEFAULT '',
-ObjectId integer NOT NULL,
-PRIMARY KEY (id)
-);
-
-
-CREATE TABLE FM_ObjectTopics (
-id SERIAL,
-Topic integer NOT NULL,
-ObjectType varchar(64) NOT NULL DEFAULT '',
-ObjectId integer NOT NULL,
-PRIMARY KEY (id)
-);

Modified: rtfm/trunk/etc/schema.mysql
==============================================================================
--- rtfm/trunk/etc/schema.mysql	(original)
+++ rtfm/trunk/etc/schema.mysql	Wed Jul 14 15:01:24 2004
@@ -38,8 +38,6 @@
 LastUpdated DATETIME NULL,
 PRIMARY KEY (id)
 ) TYPE=InnoDB;
-
-
 CREATE TABLE FM_Articles (
 id INTEGER NOT NULL AUTO_INCREMENT,
 Name varchar(255) NOT NULL DEFAULT '',
@@ -54,8 +52,6 @@
 LastUpdated DATETIME NULL,
 PRIMARY KEY (id)
 ) TYPE=InnoDB;
-
-
 CREATE TABLE FM_CustomFieldValues (
 id INTEGER NOT NULL AUTO_INCREMENT,
 CustomField int NOT NULL,
@@ -68,8 +64,6 @@
 LastUpdated DATETIME NULL,
 PRIMARY KEY (id)
 ) TYPE=InnoDB;
-
-
 CREATE TABLE FM_ArticleCFValues (
 id INTEGER NOT NULL AUTO_INCREMENT,
 Article int NOT NULL,
@@ -80,9 +74,8 @@
 LastUpdatedBy integer NOT NULL DEFAULT 0,
 LastUpdated DATETIME NULL,
 PRIMARY KEY (id)
-) TYPE=InnoDB;
-
 
+) TYPE=InnoDB;
 CREATE TABLE FM_Transactions (
 id INTEGER NOT NULL AUTO_INCREMENT,
 Article integer NOT NULL DEFAULT 0,
@@ -95,23 +88,3 @@
 Created DATETIME NULL,
 PRIMARY KEY (id)
 ) TYPE=InnoDB;
-
-
-CREATE TABLE FM_Topics (
-id INTEGER NOT NULL AUTO_INCREMENT,
-Parent integer NOT NULL DEFAULT 0,
-Name varchar(255) NOT NULL DEFAULT '',
-Description varchar(255) NOT NULL DEFAULT '',
-ObjectType varchar(64) NOT NULL DEFAULT '',
-ObjectId integer NOT NULL,
-PRIMARY KEY (id)
-) TYPE=InnoDB;
-
-
-CREATE TABLE FM_ObjectTopics (
-id INTEGER NOT NULL AUTO_INCREMENT,
-Topic integer NOT NULL,
-ObjectType varchar(64) NOT NULL DEFAULT '',
-ObjectId integer NOT NULL,
-PRIMARY KEY (id)
-) TYPE=InnoDB;

Modified: rtfm/trunk/html/Callbacks/RTFM/autohandler/Default
==============================================================================
--- rtfm/trunk/html/Callbacks/RTFM/autohandler/Default	(original)
+++ rtfm/trunk/html/Callbacks/RTFM/autohandler/Default	Wed Jul 14 15:01:24 2004
@@ -21,8 +21,6 @@
 use RT::FM::ArticleCollection;
 use RT::FM::ClassCollection;
 use RT::FM::CustomFieldCollection;
-use RT::FM::TopicCollection;
-use RT::FM::ObjectTopicCollection;
 use Time::ParseDate;
 return(1);
 </%init>

Modified: rtfm/trunk/html/RTFM/Admin/Elements/ClassTabs
==============================================================================
--- rtfm/trunk/html/RTFM/Admin/Elements/ClassTabs	(original)
+++ rtfm/trunk/html/RTFM/Admin/Elements/ClassTabs	Wed Jul 14 15:01:24 2004
@@ -28,24 +28,22 @@
    $tabs = {
                  D => { title => loc('Basics'),
                         path => "RTFM/Admin/Classes/Modify.html?id=".$id,
-                      },
-
-                 E => { title => loc('Topics'),
-                        path => "RTFM/Admin/Classes/Topics.html?id=".$id,
-                      },
-
-                 F => { title => loc('Custom Fields'),
+                           },
+                 
+                 E => { title => loc('Custom Fields'),
                         path => 'RTFM/Admin/Classes/CustomFields.html?id='.$id,
-                      },
+                        },
+
+                 F => { title => loc('Group Rights'),
+                          path => "RTFM/Admin/Classes/GroupRights.html?id=".$id,
+                        },      
+                 G => { title => loc('User Rights'),
+                          path => "RTFM/Admin/Classes/UserRights.html?id=".$id,
+                        },
 
-                 G => { title => loc('Group Rights'),
-                        path => "RTFM/Admin/Classes/GroupRights.html?id=".$id,
-                      },      
 
-                 H => { title => loc('User Rights'),
-                        path => "RTFM/Admin/Classes/UserRights.html?id=".$id,
-                      },
-           };
+                 
+};
 }
 if ($session{'CurrentUser'}->HasRight( Object => $RT::FM::System, Right => 'AdminClass')) {
   $tabs->{"A"} = { title => loc('Select class'),

Modified: rtfm/trunk/html/RTFM/Article/Display.html
==============================================================================
--- rtfm/trunk/html/RTFM/Article/Display.html	(original)
+++ rtfm/trunk/html/RTFM/Article/Display.html	Wed Jul 14 15:01:24 2004
@@ -24,8 +24,6 @@
 <br><br><br>
   <& Elements/ShowCustomFields, article => $article &>
 <br>
-<& Elements/ShowTopics, article => $article &>
-<br>
 <& Elements/ShowLinks, article => $article &>
 <%init>
 

Modified: rtfm/trunk/html/RTFM/Article/Edit.html
==============================================================================
--- rtfm/trunk/html/RTFM/Article/Edit.html	(original)
+++ rtfm/trunk/html/RTFM/Article/Edit.html	Wed Jul 14 15:01:24 2004
@@ -33,18 +33,14 @@
 
 <& Elements/EditBasics, ArticleObj => $ArticleObj,
                         EditClass =>$EditClass,
-                        ClassObj => $ClassObj,  
+                        ClassObj =>$ClassObj,  
                         id => $id,
-                        %ARGS &>
+                       %ARGS &>
 <& Elements/EditCustomFields, ArticleObj => $ArticleObj, 
                               CFContent => \%CFContent, 
                               ClassObj => $ClassObj, 
                               id =>$id,
                               %ARGS &>
-<& Elements/EditTopics, ArticleObj => $ArticleObj,
-                        ClassObj => $ArticleObj->Id ? $ArticleObj->ClassObj : $ClassObj,
-                        id => $id,
-                        %ARGS &>
 <& Elements/EditLinks, ArticleObj => $ArticleObj, 
                         id => $id,
                        %ARGS &>
@@ -55,10 +51,6 @@
 </form>
 <%INIT>
 
-if (exists $ARGS{'Topics'}) {
-  $ARGS{'Topics'} = ref($ARGS{'Topics'}) ? $ARGS{'Topics'} : [$ARGS{'Topics'}]
-}
-
 my @results;
 my $title;
 
@@ -107,7 +99,6 @@
     ( $id, $msg ) = $ArticleObj->Create( Summary => $ARGS{'Summary'},
                                          Name    => $ARGS{'Name'},
                                          Class   => $ARGS{'Class'},
-                                         Topics  => $ARGS{'Topics'},
                                          %create_args );
         push ( @results, $msg );
     if ($id ) {
@@ -270,26 +261,6 @@
 
     }
 
-    my %topics;
-    if ($ARGS{'EditTopics'}) {
-        $topics{$_}++ for @{$ARGS{'Topics'}};
-        my $objTopics = new RT::FM::ObjectTopicCollection($session{'CurrentUser'});
-        $objTopics->LimitToObject($ArticleObj);
-        while (my $t = $objTopics->Next) {
-            $topics{$t->Topic}--;
-        }
-        for my $id (keys %topics) {
-            if ($topics{$id} > 0) {
-                my ($val, $msg) = $ArticleObj->AddTopic(Topic => $id);
-                push @results, $msg;
-            } elsif ($topics{$id} < 0) {
-                my ($val, $msg) = $ArticleObj->DeleteTopic(Topic => $id);
-                push @results, $msg;
-            }
-        }
-    }
-    
-
     $title = loc( 'Modify article #[_1]', $ArticleObj->Id );
   }
 

Modified: rtfm/trunk/html/RTFM/Article/PreCreate.html
==============================================================================
--- rtfm/trunk/html/RTFM/Article/PreCreate.html	(original)
+++ rtfm/trunk/html/RTFM/Article/PreCreate.html	Wed Jul 14 15:01:24 2004
@@ -16,13 +16,14 @@
 %# 
 %# END LICENSE BLOCK
 
-<& /RTFM/Article/Elements/Tabs, current_tab => "RTFM/Topics.html",
+<& /RTFM/Article/Elements/Tabs, current_tab => "RTFM/Article/PreCreate.html",
 Title => loc('Create an article in class...') &>
 <ul>                                                                            
 % my $Classes = RT::FM::ClassCollection->new($session{'CurrentUser'});          
 % $Classes->UnLimit;                                                            
 % while (my $Class = $Classes->Next) {                                          
-<li><a href="Edit.html?Class=<%$Class->Id%>"><&|/l, $Class->Name&>in class [_1]</&></a></li>
+<li><a href="Edit.html?Class=<%$Class->Id%>"><&|/l, $Class->Name&>in class [_1]</&>
+</a></li>                                                                       
 % }                                                                             
                                                                                 
 </ul>                                                                           

Modified: rtfm/trunk/html/RTFM/Elements/Tabs
==============================================================================
--- rtfm/trunk/html/RTFM/Elements/Tabs	(original)
+++ rtfm/trunk/html/RTFM/Elements/Tabs	Wed Jul 14 15:01:24 2004
@@ -39,14 +39,12 @@
                 };
 
 my $second_tabs = { 'aab' => { title => loc('Overview'),
-                               path  => 'RTFM/index.html' },
-                    'articles' => { title => loc('Articles'),
-                                    path => 'RTFM/Article/Search.html' },
-                    'atopics' => { title => loc('Topics'),
-                                   path => 'RTFM/Topics.html'},
-                    'd' => { title => loc('Configuration'),
-                             path  => 'RTFM/Admin/index.html' } 
-                  };
+                                               path  => 'RTFM/index.html' },
+                                      'articles' => { title => loc('Articles'),
+                                              path => 'RTFM/Article/Search.html' },
+                                      'd' => { title => loc('Configuration'),
+                                               path  => 'RTFM/Admin/index.html' } 
+                                 };
 
 my $topactions = {
         B => { html => $m->scomp('/RTFM/Elements/GotoArticle') }

Modified: rtfm/trunk/lib/RT/FM/ArticleCollection_Overlay.pm
==============================================================================
--- rtfm/trunk/lib/RT/FM/ArticleCollection_Overlay.pm	(original)
+++ rtfm/trunk/lib/RT/FM/ArticleCollection_Overlay.pm	Wed Jul 14 15:01:24 2004
@@ -200,7 +200,6 @@
 
 
 # {{{ LimitToParent ID
-
 =item LimitToParent ID
 
 Limit the returned set of articles to articles which are children

Modified: rtfm/trunk/lib/RT/FM/Article_Overlay.pm
==============================================================================
--- rtfm/trunk/lib/RT/FM/Article_Overlay.pm	(original)
+++ rtfm/trunk/lib/RT/FM/Article_Overlay.pm	Wed Jul 14 15:01:24 2004
@@ -91,6 +91,9 @@
                  Links        => {},
                  @_ );
 
+    use Data::Dumper;
+    $RT::Logger->crit(Dumper \%args);
+
     my $class = RT::FM::Class->new($RT::SystemUser);
     $class->Load( $args{'Class'} );
     unless ( $class->Id ) {
@@ -136,18 +139,6 @@
     }
 
     # }}}
-    # {{{ Add topics
-
-    foreach my $topic (@{$args{Topics}}) {
-        my ( $cfid, $cfmsg ) = $self->AddTopic(Topic => $topic);
-        
-        unless ($cfid) {
-            $RT::Handle->Rollback();
-            return ( undef, $cfmsg );
-        }
-    }
-
-    # }}}
     # {{{ Add relationships
 
     foreach my $type ( keys %args ) {
@@ -300,7 +291,6 @@
     my $linksfrom = $self->_Links( Field => 'Base' );
     my $cfvalues = $self->CustomFieldValues;
     my $txns     = $self->Transactions;
-    my $topics   = $self->Topics;
 
     while ( my $item = $linksto->Next ) {
         my ( $val, $msg ) = $item->Delete();
@@ -319,7 +309,6 @@
             return ( 0, $self->loc('Internal Error') );
         }
     }
-
     while ( my $item = $txns->Next ) {
         my ( $val, $msg ) = $item->Delete();
         unless ($val) {
@@ -338,15 +327,6 @@
         }
     }
 
-    while (my $item = $topics->Next) {
-        my ($val, $msg ) = $item->Delete();
-        unless ($val) {
-            $RT::Logger->crit( ref($item) . ": $msg" );
-            $RT::Handle->Rollback();
-            return ( 0, $self->loc('Internal Error') );
-        }
-    }
-
     $self->SUPER::Delete();
     $RT::Handle->Commit();
     return ( 1, $self->loc('Article Deleted') );
@@ -1082,9 +1062,9 @@
 # {{{ DeleteCustomFieldValue
 
 =item DeleteCustomFieldValue { CustomField => undef, Content => undef } 
-
-Takes a paramhash. Deletes the Keyword denoted by the I<Keyword>
-parameter from this ticket's object keywords.
+  
+  Takes a paramhash. Deletes the Keyword denoted by the I<Keyword> parameter from this
+  ticket's object keywords.
 
 =cut
 
@@ -1150,70 +1130,6 @@
 
 # }}}
 
-# {{{ Topics
-
-# {{{ Topics
-sub Topics {
-    my $self = shift;
-    
-    my $topics = new RT::FM::ObjectTopicCollection($self->CurrentUser);
-    if ($self->CurrentUserHasRight('ShowArticle')) {
-        $topics->LimitToObject($self);
-    }
-    return $topics;
-}
-# }}}
-
-# {{{ AddTopic
-sub AddTopic {
-    my $self = shift;
-    my %args = ( @_ );
-    
-    unless ( $self->CurrentUserHasRight('ModifyArticleTopics') ) {
-        return ( 0, $self->loc("Permission Denied") );
-    }
-
-    my $t = new RT::FM::ObjectTopic($self->CurrentUser);
-    my ($tid) = $t->Create( Topic      => $args{'Topic'},
-                            ObjectType => ref($self),
-                            ObjectId   => $self->Id );
-    if ($tid) {
-        return ($tid, $self->loc("Topic membership added"));
-    } else {
-        return (0, $self->loc("Unable to add topic membership"));
-    } 
-}
-# }}}
-
-# {{{ DeleteTopic
-sub DeleteTopic {
-    my $self = shift;
-    my %args = ( @_ );
-
-    unless ( $self->CurrentUserHasRight('ModifyArticleTopics') ) {
-        return ( 0, $self->loc("Permission Denied") );
-    }
-
-    my $t = new RT::FM::ObjectTopic($self->CurrentUser);
-    $t->LoadByCols(Topic => $args{'Topic'}, ObjectId => $self->Id, ObjectType => ref($self));
-    if ($t->Id) {
-        my $del = $t->Delete;
-        unless ($del) {
-            return ( undef, 
-                     $self->loc("Unable to delete topic membership in [_1]",
-                                $t->TopicObj->Name));
-        } else {
-            return ( 1,
-                     $self->loc("Topic membership removed"));
-        }
-    } else {
-        return ( undef,
-                 $self->loc("Couldn't load topic membership while trying to delete it"));
-    }
-}
-# }}}
-# }}}
-
 # {{{ CurrentUserHasRight
 
 =head2 CurrentUserHasRight

Modified: rtfm/trunk/lib/RT/FM/Class_Overlay.pm
==============================================================================
--- rtfm/trunk/lib/RT/FM/Class_Overlay.pm	(original)
+++ rtfm/trunk/lib/RT/FM/Class_Overlay.pm	Wed Jul 14 15:01:24 2004
@@ -52,14 +52,12 @@
 
     SeeClass            => 'See that this class exists', #loc_pair
     CreateArticle       => 'Create articles in this class', #loc_pair
-    ShowArticle         => 'See articles in this class', #loc_pair
-    ShowArticleHistory  => 'See articles in this class', #loc_pair
+    ShowArticle       => 'See articles in this class', #loc_pair
+    ShowArticleHistory       => 'See articles in this class', #loc_pair
     ModifyArticle       => 'Modify or delete articles in this class', #loc_pair
-    ModifyArticleTopics => 'Modify topics for articles in this class', #loc_pair
     AdminClass          => 'Modify metadata and custom fields for this class', #loc_pair
-    AdminTopics         => 'Modify topic hierarchy associated with this class', #loc_pair
-    ShowACL             => 'Display Access Control List', # loc_pair
-    ModifyACL           => 'Modify Access Control List', # loc_pair
+    ShowACL             => 'Display Access Control List',             # loc_pair
+    ModifyACL           => 'Modify Access Control List',              # loc_pair
 };
 
 # TODO: This should be refactored out into an RT::ACLedObject or something


More information about the Rt-commit mailing list