MDL-9647 simplify dealing with headers/footers in admin sections; some more cleanup

fixed continue button in error() on admin page when link present
This commit is contained in:
skodak 2007-04-30 17:28:28 +00:00
parent 635773c604
commit bb4b3ea4f8
2 changed files with 7 additions and 22 deletions

View file

@ -43,11 +43,7 @@
echo '</td></tr></table>'; echo '</td></tr></table>';
if ($course->id == SITEID) { print_footer($course);
admin_externalpage_print_footer();
} else {
print_footer($course);
}
} }
function html_header($course, $wdir, $formfield=""){ function html_header($course, $wdir, $formfield=""){

View file

@ -4745,7 +4745,7 @@ function error ($message, $link='') {
upgrade_log_finish(); upgrade_log_finish();
} }
if (!$link) { if (empty($link) and !defined('ADMIN_EXT_HEADER_PRINTED')) {
if ( !empty($SESSION->fromurl) ) { if ( !empty($SESSION->fromurl) ) {
$link = $SESSION->fromurl; $link = $SESSION->fromurl;
unset($SESSION->fromurl); unset($SESSION->fromurl);
@ -4754,12 +4754,12 @@ function error ($message, $link='') {
} }
} }
if (defined('ADMIN_EXT_HEADER_PRINTED')) { if (!empty($link)) {
admin_externalpage_print_footer();
} else {
print_continue($link); print_continue($link);
print_footer();
} }
print_footer();
for ($i=0;$i<512;$i++) { // Padding to help IE work with 404 for ($i=0;$i<512;$i++) { // Padding to help IE work with 404
echo ' '; echo ' ';
} }
@ -4992,12 +4992,6 @@ function notice ($message, $link='', $course=NULL) {
print_box($message, 'generalbox', 'notice'); print_box($message, 'generalbox', 'notice');
print_continue($link); print_continue($link);
// xhtml strict fix, need to make sure it's the right footer
if (defined('ADMIN_EXT_HEADER_PRINTED')) {
admin_externalpage_print_footer();
exit;
}
if (empty($course)) { if (empty($course)) {
print_footer($SITE); print_footer($SITE);
} else { } else {
@ -5141,12 +5135,7 @@ function redirect($url, $message='', $delay=-1) {
<?php <?php
} }
// fix for MDL-8517, admin pages redirections causes bad xhtml print_footer('none');
if (defined('ADMIN_EXT_HEADER_PRINTED')) {
admin_externalpage_print_footer();
} else {
print_footer('none');
}
die; die;
} }