Changeset 25
- Timestamp:
- 04/06/05 22:04:09 (4 years ago)
- Files:
-
- 1 modified
-
recently-pinged-on/trunk/recently-pinged-on.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
recently-pinged-on/trunk/recently-pinged-on.pl
r1 r25 2 2 # by Hirotaka Ogawa (http://as-is.net/blog/) 3 3 # 4 # Release 0.1 0(Jan 29, 2005)4 # Release 0.11 (Jan 29, 2005) 5 5 # 6 6 # This software is provided as-is. You may use it for commercial or … … 15 15 require MT::Plugin; 16 16 my $plugin = new MT::Plugin(); 17 $plugin->name("recently_pinged_on Plugin 0.1 0");17 $plugin->name("recently_pinged_on Plugin 0.11"); 18 18 $plugin->description("Add 'recently_ping_on' option to MTEntries container"); 19 19 $plugin->doc_link("http://as-is.net/hacks/2005/01/recently_pinged_on_plugin.html"); … … 41 41 my $count = 0; 42 42 while (my $tbping = $iter->()) { 43 my $tb_id = $tbping->tb_id; 44 next if exists($temp{$tb_id}); 45 43 46 require MT::Trackback; 47 my $trackback = MT::Trackback->load($tb_id); 48 my $entry_id = $trackback->entry_id or next; 49 44 50 require MT::Entry; 45 my $trackback = MT::Trackback->load($tbping->tb_id); 46 my $entry_id = $trackback->entry_id; 47 if (!exists($temp{$entry_id})) { 48 my $entry = MT::Entry->load($entry_id); 49 next if $entry->status != MT::Entry::RELEASE(); 50 push(@entries, MT::Entry->load($entry_id)); 51 $temp{$entry_id} = (); 52 last if ++$count == $recently_pinged_on; 53 } 51 my $entry = MT::Entry->load($entry_id); 52 next if $entry->status != MT::Entry::RELEASE(); 53 54 push(@entries, $entry); 55 last if ++$count == $recently_pinged_on; 56 $temp{$tb_id} = (); 54 57 } 55 58
![(please configure the [header_logo] section in trac.ini)](/public/chrome/common/trac_banner.png)