includes/functions.php
changeset 320 112debff64bd
parent 317 f8356d9c3481
child 322 5f1cd51bf1be
equal deleted inserted replaced
319:8be996c3740d 320:112debff64bd
   258 function get_page_title_ns($page_id, $namespace)
   258 function get_page_title_ns($page_id, $namespace)
   259 {
   259 {
   260   global $db, $session, $paths, $template, $plugins; // Common objects
   260   global $db, $session, $paths, $template, $plugins; // Common objects
   261 
   261 
   262   $page_id_key = $paths->nslist[ $namespace ] . $page_id;
   262   $page_id_key = $paths->nslist[ $namespace ] . $page_id;
   263   $page_data = $paths->pages[$page_id_key];
   263   if ( isset($paths->pages[$page_id_key]) )
       
   264   {
       
   265     $page_data = $paths->pages[$page_id_key];
       
   266   }
       
   267   else
       
   268   {
       
   269     $page_data = array();
       
   270   }
   264   $title = ( isset($page_data['name']) ) ? $page_data['name'] : $paths->nslist[$namespace] . str_replace('_', ' ', dirtify_page_id( $page_id ) );
   271   $title = ( isset($page_data['name']) ) ? $page_data['name'] : $paths->nslist[$namespace] . str_replace('_', ' ', dirtify_page_id( $page_id ) );
   265   return $title;
   272   return $title;
   266 }
   273 }
   267 
   274 
   268 /**
   275 /**