diff -r 9d29f7e101d6 -r 8079b0288e8e includes/pageprocess.php --- a/includes/pageprocess.php Sun Aug 12 14:56:52 2007 -0400 +++ b/includes/pageprocess.php Tue Aug 14 15:13:40 2007 -0400 @@ -212,7 +212,7 @@ return false; } } - else if ( $this->namespace == 'User' ) + else if ( $this->namespace == 'User' && strpos($this->page_id, '/') === false ) { $this->_handle_userpage(); } @@ -371,6 +371,8 @@ global $db, $session, $paths, $template, $plugins; // Common objects $text = $this->fetch_text(); + $text = preg_replace('/([\s]*)__NOBREADCRUMBS__([\s]*)/', '', $text); + $text = preg_replace('/([\s]*)__NOTOC__([\s]*)/', '', $text); $redir_enabled = false; if ( preg_match('/^#redirect \[\[([^\]]+?)\]\]/i', $text, $match ) ) @@ -418,6 +420,7 @@ $template->tpl_strings['PAGE_NAME'] = htmlspecialchars( $this->title ); $this->header(); + $this->do_breadcrumbs(); if ( $_errormsg ) { @@ -631,6 +634,8 @@ )); $target_username = preg_replace('/^' . preg_quote($paths->nslist['User']) . '/', '', $target_username); + $target_username = explode('/', $target_username); + $target_username = $target_username[0]; if ( ( $page_name == str_replace('_', ' ', $this->page_id) || $page_name == $paths->nslist['User'] . str_replace('_', ' ', $this->page_id) ) || !$this->page_exists ) { @@ -1044,8 +1049,11 @@ { global $db, $session, $paths, $template, $plugins; // Common objects + header('HTTP/1.1 404 Not Found'); + $this->header(); - header('HTTP/1.1 404 Not Found'); + $this->do_breadcrumbs(); + if ( $userpage ) { echo '
Additional admin options: detag page
'; + } echo 'HTTP Error: 404 Not Found
'; @@ -1085,6 +1097,58 @@ } /** + * Echoes out breadcrumb data, if appropriate. + * @access private + */ + + function do_breadcrumbs() + { + global $db, $session, $paths, $template, $plugins; // Common objects + if ( strpos($this->text_cache, '__NOBREADCRUMBS__') !== false ) + return false; + $breadcrumb_data = explode('/', $this->page_id); + if ( count($breadcrumb_data) > 1 ) + { + echo ' + + + '; + } + } + + /** * PHP 4 constructor. * @see PageProcessor::__construct() */