#!/usr/bin/perl -w # Tagwire PluginData Cleaner # # $Id$ # # This software is provided as-is. You may use it for commercial or # personal use. If you distribute it, please keep this notice intact. # # Copyright (c) 2005 Hirotaka Ogawa use strict; local $|=1; my($MT_DIR); BEGIN { if ($0 =~ m!(.*[/\\])!) { $MT_DIR = $1; } else { $MT_DIR = './'; } unshift @INC, $MT_DIR . 'lib'; unshift @INC, $MT_DIR . 'extlib'; } use MT; use MT::Blog; use MT::PluginData; print "Content-Type: text/html\n\n"; print < Tagwire PluginData Cleaner

Tagwire PluginData Cleaner

HTML my $mt = MT->new; my $iter = MT::Blog->load_iter(); while (my $b = $iter->()) { while (my $pd = MT::PluginData->load({ plugin => 'Tagwire Plugin', key => $b->id })) { $pd->remove; print "."; } } print <PluginData successfully removed.

HTML