Changeset 60
- Timestamp:
- 02/25/05 12:23:41
- Files:
-
- trunk/plugins/spamlookup/mt-spamlookup.cgi (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plugins/spamlookup/mt-spamlookup.cgi
r58 r60 95 95 my @ids = $query->param('id'); 96 96 if (my $action = $query->param('action')) { 97 if ($action eq 'delete') { 98 $app->delete_these($type, \@ids); 99 } elsif ($action eq 'approve') { 100 $app->approve_these($type, \@ids); 101 } elsif ($action eq 'moderate') { 102 $app->moderate_these($type, \@ids); 97 if ($action =~ m/^(delete|approve|moderate)$/) { 98 $app->process_objects($action, $type, \@ids); 103 99 } 104 100 } … … 148 144 } 149 145 150 sub approve_these { 151 my $self = shift; 152 $self->operate_these('approve', @_); 153 } 154 sub moderate_these { 155 my $self = shift; 156 $self->operate_these('moderate', @_); 157 } 158 sub delete_these { 159 my $self = shift; 160 $self->operate_these('delete', @_); 161 } 162 163 sub operate_these { 146 sub process_objects { 164 147 my $app = shift; 165 148 my ($action, $type, $ids) = @_; … … 214 197 $blog_rebuild{$entry->blog_id} = 1; 215 198 } else { 199 require MT::Trackback; 216 200 my $tb = MT::Trackback->load($id); 217 201 next unless $tb; … … 387 371 $text = $obj->url . ' ' . $obj->text; 388 372 } else { 373 require MT::Trackback; 389 374 my $tb = MT::Trackback->load($obj->tb_id); 390 375 my ($entry, $cat);
