Apply slightly modified versions of DBell's patches for:

- admin bar causing pages to extend forever
  - changing asset URL returning to old URL rather than new
  - performance indicators interfering with non-HTML data
This commit is contained in:
Drake 2006-09-26 04:59:15 +00:00
parent 4f7a3bf490
commit dbc34c6270
4 changed files with 23 additions and 4 deletions

View file

@ -107,7 +107,16 @@ sub contentHandler {
if ($output =~ /<\/title>/) {
$output =~ s/<\/title>/ : ${t} seconds<\/title>/i;
} else {
$session->output->print("\nPage generated in $t seconds.\n");
# Kludge.
my $mimeType = $session->http->getMimeType();
if ($mimeType eq 'text/css') {
$session->output->print("\n/* Page generated in $t seconds. */\n");
} elsif ($mimeType eq 'text/html') {
$session->output->print("\nPage generated in $t seconds.\n");
} else {
# Don't apply to content when we don't know how
# to modify it semi-safely.
}
}
} else {
$output = page($session);

View file

@ -1925,9 +1925,15 @@ sub www_changeUrlConfirm {
$old->purgeRevision if defined $old;
}
}
if ($self->session->form->param("proceed") eq "manageAssets") {
return $self->www_manageAssets;
$self->session->http->setRedirect($self->getUrl('func=manageAssets'));
return 'redirect';
} else {
$self->session->http->setRedirect($self->getUrl());
return 'redirect';
}
return undef;
}