+
+<$MTEntryBody smarty_pants="2"$>
+<$MTEntryMore smarty_pants="2"$>
+
HTML
my $tokens = $build->compile($ctx, $preview_code)
or return $app->error($app->translate(
@@ -2291,14 +2328,25 @@
} elsif ($type eq 'index') {
return $app->error($app->translate("Permission denied."))
unless $perms->can_rebuild;
- $app->rebuild_indexes( BlogID => $blog_id ) or return;
+ ##
+ # sean willson - http://www.seanwillson.com/
+ # added a rebuild type parameter so that it would only rebuild
+ # the indexes that i designated appropriate.
+ #
+ $app->rebuild_indexes( BlogID => $blog_id, RebuildType => 'In' ) or return;
+ ##
} elsif ($type =~ /^index-(\d+)$/) {
return $app->error($app->translate("Permission denied."))
unless $perms->can_rebuild;
my $tmpl_id = $1;
require MT::Template;
$tmpl_saved = MT::Template->load($tmpl_id);
- $app->rebuild_indexes( BlogID => $blog_id, Template => $tmpl_saved,
+ ##
+ # sean willson - http://www.seanwillson.com/
+ # added a rebuild type parameter so that it would only rebuild
+ # the indexes that i designated appropriate.
+ #
+ $app->rebuild_indexes( BlogID => $blog_id, Template => $tmpl_saved, RebuildType => 'In',
Force => 1 )
or return;
$order = "index template '" . $tmpl_saved->name . "'";
--- lib/MT/App/Comments.pm.orig Mon Feb 24 11:16:12 2003
+++ lib/MT/App/Comments.pm Wed May 14 12:21:57 2003
@@ -106,9 +106,15 @@
$comment->subject($q->param('subject'));
$comment->parent_id($q->param('parent_id'));
$comment->save;
- $app->rebuild_indexes( Blog => $blog )
+ ##
+ # sean willson - http://www.seanwillson.com/
+ # added a rebuild type parameter so that it would only rebuild
+ # the indexes that i designated appropriate.
+ #
+ $app->rebuild_indexes( Blog => $blog, RebuildType => 'Co' )
or return $app->error($app->translate(
"Rebuild failed: [_1]", $app->errstr));
+ ##
$app->rebuild_entry( Entry => $entry )
or return $app->error($app->translate(
"Rebuild failed: [_1]", $app->errstr));
--- tmpl/cms/edit_template.tmpl.orig Mon Feb 24 11:15:19 2003
+++ tmpl/cms/edit_template.tmpl Wed May 14 12:27:08 2003
@@ -150,12 +150,33 @@
+
+
+
+
+
+
+
+
+
+
--- tmpl/cms/list_template.tmpl.orig Mon Feb 24 11:15:19 2003
+++ tmpl/cms/list_template.tmpl Wed May 14 12:29:43 2003
@@ -149,16 +149,21 @@
+
+
+
+
-
@@ -167,7 +172,10 @@
+
+
--- lib/MT.pm.orig Fri Mar 7 16:28:37 2003
+++ lib/MT.pm Wed May 14 12:32:49 2003
@@ -175,7 +175,13 @@
}
}
unless ($param{NoIndexes}) {
- $mt->rebuild_indexes( Blog => $blog ) or return;
+ ##
+ # sean willson - http://www.seanwillson.com/
+ # added a rebuild type parameter so that it would only rebuild
+ # the indexes that i designated appropriate.
+ #
+ $mt->rebuild_indexes( Blog => $blog, RebuildType => 'In' ) or return;
+ ##
}
1;
}
@@ -234,7 +240,14 @@
}
## Rebuild all indexes, in case this entry is on an index.
- $mt->rebuild_indexes( Blog => $blog ) or return;
+
+ ##
+ # sean willson - http://www.seanwillson.com/
+ # added a rebuild type parameter so that it would only rebuild
+ # the indexes that i designated appropriate.
+ #
+ $mt->rebuild_indexes( Blog => $blog, RebuildType => 'En' ) or return;
+ ##
## Rebuild previous and next daily, weekly, and monthly archives;
## adding a new entry could cause changes to the intra-archive
@@ -460,8 +473,28 @@
## before that time, the rebuild_me flag will be undefined. But
## we assume that these templates should be rebuilt, since that
## was the previous behavior.
- next if !$param{Force} &&
- defined $tmpl->rebuild_me && !$tmpl->rebuild_me;
+
+ ##
+ # sean willson - http://www.seanwillson.com/
+ # commented this code out because the new rebuild type code overrides this.
+ #
+ #next if !$param{Force} &&
+ # defined $tmpl->rebuild_me && !$tmpl->rebuild_me;
+ ##
+
+ ##
+ # sean willson - http://www.seanwillson.com/
+ # made it so that it doesn't rebuild unless it is supposed to.
+ #
+ my $tmplRebuildType = defined $tmpl->rebuild_type ? $tmpl->rebuild_type : 'EnCo';
+ my $rebuildType = $param{RebuildType};
+
+ next if ((! $param{Force}) && ($tmplRebuildType =~ /ne/gi));
+
+ next if ((! $param{Force}) &&
+ ($rebuildType !~ /in/gi) &&
+ ($tmplRebuildType !~ /$rebuildType|all/gi));
+ ##
my $ctx = MT::Template::Context->new;
my $html = $tmpl->build($ctx);
--- lib/MT/Template.pm.orig Mon Feb 24 11:15:19 2003
+++ lib/MT/Template.pm Wed May 14 12:35:49 2003
@@ -25,7 +25,7 @@
columns => [
'id', 'blog_id', 'name', 'type', 'outfile', 'text',
'linked_file', 'linked_file_mtime', 'linked_file_size',
- 'rebuild_me',
+ 'rebuild_me','rebuild_type',
],
indexes => {
blog_id => 1,
--- lib/MT/App/Trackback.pm.orig Wed May 14 11:46:58 2003
+++ lib/MT/App/Trackback.pm Wed May 14 12:39:27 2003
@@ -197,10 +197,15 @@
}
require MT::Blog;
my $blog = MT::Blog->load($blog_id);
- $app->rebuild_indexes( Blog => $blog )
+ ##
+ # sean willson - http://www.seanwillson.com/
+ # added a rebuild type parameter so that it would only rebuild
+ # the indexes that i designated appropriate.
+ #
+ $app->rebuild_indexes( Blog => $blog, RebuildType => 'Tb' )
or return $app->_response(Error =>
$app->translate("Rebuild failed: [_1]", $app->errstr));
-
+ ##
if ($app->{cfg}->GenerateTrackBackRSS) {
## Now generate RSS feed for this trackback item.
my $rss = _generate_rss($tb, 10);
@@ -213,6 +218,16 @@
$fmgr->errstr));
}
+ ##
+ # sean willson - http://www.seanwillson.com/
+ # added because i wanted to rebuild an entry after a trackback was submitted
+ # automatically. i added it after the previous block because i wasn't sure
+ # if the entry was going to need the trackback rss entry.
+ #
+ $app->rebuild_entry( Entry => $entry )
+ or return $app->error($app->translate(
+ "Rebuild failed: [_1]", $app->errstr)) if ($entry);
+ ##
if ($blog->email_new_pings) {
require MT::Mail;
my($author, $subj, $body);