/** * Get the label for a page from it's title * @param string $title * @param bool $amp Whether or not to escape ampersand characters */ static function GetLabel($title = false) { global $gp_titles, $gp_index, $langmessage; $return = false; if (isset($gp_index[$title])) { $id = $gp_index[$title]; $info =& $gp_titles[$id]; if (isset($info['label'])) { $return = $info['label']; } elseif (isset($info['lang_index'])) { $return = $langmessage[$info['lang_index']]; } } if ($return === false) { $return = gpFiles::CleanLabel($title); } return $return; }