# HG changeset patch # User Dan # Date 1187310949 14400 # Node ID 95c4d91bd954544d9ce017829f964448f701b4b1 # Parent aa8ffe41d1c40f9b5eea251528a1a10b6047dcf7 Redirections to the main page use the redirect() function now diff -r aa8ffe41d1c4 -r 95c4d91bd954 includes/pageprocess.php --- a/includes/pageprocess.php Tue Aug 14 20:48:29 2007 -0400 +++ b/includes/pageprocess.php Thu Aug 16 20:35:49 2007 -0400 @@ -1084,13 +1084,13 @@ { $r = $db->fetchrow(); echo '
This page was deleted on ' . $r['date_string'] . '. The stated reason was:
' . $r['edit_summary'] . '
You can probably roll back the deletion.
'; + if ( $session->user_level >= USER_LEVEL_ADMIN ) + { + echo 'Additional admin options: detag page
'; + } } $db->free_result(); } - if ( $session->user_level >= USER_LEVEL_ADMIN ) - { - echo 'Additional admin options: detag page
'; - } echo 'HTTP Error: 404 Not Found
'; diff -r aa8ffe41d1c4 -r 95c4d91bd954 includes/paths.php --- a/includes/paths.php Tue Aug 14 20:48:29 2007 -0400 +++ b/includes/paths.php Thu Aug 16 20:35:49 2007 -0400 @@ -384,14 +384,13 @@ { if( is_string(getConfig('main_page')) ) { - header('Location: '.makeUrl(getConfig('main_page'))); - die('If you aren\'t redirected, click here.'); + $main_page = makeUrl(getConfig('main_page')); } else { - header('Location: '.makeUrl($this->pages[0]['urlname'])); - die('If you aren\'t redirected, click here.'); + $main_page = makeUrl($this->pages[0]['urlname']); } + redirect($main_page, 'Redirecting...', 'Invalid request, redirecting to main page', 0); exit; } diff -r aa8ffe41d1c4 -r 95c4d91bd954 plugins/SpecialUserFuncs.php --- a/plugins/SpecialUserFuncs.php Tue Aug 14 20:48:29 2007 -0400 +++ b/plugins/SpecialUserFuncs.php Thu Aug 16 20:35:49 2007 -0400 @@ -124,6 +124,8 @@ { $level = USER_LEVEL_MEMBER; } + if ( $level <= USER_LEVEL_MEMBER && $session->user_logged_in ) + $paths->main_page(); $template->header(); echo '