Some proposed alternative code:
These functions added to inc/pageutils.php
/**
* Returns the current namespace
*
* @author Nathan Fritz <
fritzn@crown.edu>
*/
function curNS($id) {
return noNS(getNS($id));
}
/**
* Returns the ID without the namespace or current namespace for 'start' pages
*
* @author Nathan Fritz <
fritzn@crown.edu>
*/
function noNSorNS($id) {
global $conf;
$p = noNS($id);
if ($p == $conf['start']) {
$p = curNS($id);
}
return $p;
Then, in common.php change the $name = noNS($ID) call in the breadcrumbs function to $name = noNSorNS($ID)
Just a thought. It keeps the changes out of the template file and in the common libraries. Also it adds useful functions to pull just the current NS and one to pull either the pagename or NS for start pages.