日付順タイトル一覧 »

このブログの記事を検索

2004年02月25日

MT.pm

By marfua 2004年02月25日 15:06

For Photo blog...

Rewrite; MT.pm

original:
line 228


## Rebuild previous and next entry archive pages.
if (my $prev = $entry->previous(1)) {
$mt->rebuild_entry( Entry => $prev ) or return;
}
if (my $next = $entry->next(1)) {
$mt->rebuild_entry( Entry => $next ) or return;
}

will now become:


## Rebuild previous and next entry archive pages.
## Rebuild *MULTIPLE* previous and next entry archive pages.
# Code modified by Dave Baker
# Attempt to build prev/next 2 entries, if they exist.
my $buildme = $entry;
for (my $buildc = 2; $buildc; $buildc--) {
last unless ($buildme = $buildme->previous);
$mt->rebuild_entry( Entry => $buildme ) or return;
}

$buildme = $entry;
for (my $buildc = 2; $buildc; $buildc--) {
last unless ($buildme = $buildme->next);
$mt->rebuild_entry( Entry => $buildme ) or return;
}

# dsb3 - changes end here



トラックバック カテゴリー: 2004MT
コメント