Commit f7e5f1a9 authored by Nemo Ma's avatar Nemo Ma Committed by GitHub

Merge pull request #150 from hikawiier/waaagh

fix
parents db2e3817 f5d3e6da
...@@ -61,8 +61,11 @@ function titles_get_desc($tkey,$mode=0) ...@@ -61,8 +61,11 @@ function titles_get_desc($tkey,$mode=0)
global $db,$gtablepre,$gamecfg; global $db,$gtablepre,$gamecfg;
include config("titles",$gamecfg); include config("titles",$gamecfg);
# 兼容旧显示方式
if($mode && !is_numeric($tkey)) $tkey = array_search($tkey,$titles_list);
$tkey = (int)$tkey; $tkey = (int)$tkey;
$n = $titles_list[$tkey]; $n = $titles_list[$tkey] ?: $tkey;
if(isset($title_desc[$tkey])) if(isset($title_desc[$tkey]))
{ {
......
...@@ -41,7 +41,14 @@ if($command == 'info') { ...@@ -41,7 +41,14 @@ if($command == 'info') {
else else
{ {
$wdata['iconImg'] = $wdata['gd'] == 'f' ? 'f_'.$wdata['icon'].'.gif' : 'm_'.$wdata['icon'].'.gif'; $wdata['iconImg'] = $wdata['gd'] == 'f' ? 'f_'.$wdata['icon'].'.gif' : 'm_'.$wdata['icon'].'.gif';
$wdata['nickinfo'] = !empty($wdata['nick']) ? titles_get_desc($wdata['nick']) : ''; if(!empty($wdata['nick']) && !is_numeric($wdata['nick']))
{
$wdata['nickinfo'] = titles_get_desc($wdata['nick'],1);
}
else
{
$wdata['nickinfo'] = !empty($wdata['nick']) || $wdata['nick'] == 0 ? titles_get_desc($wdata['nick']) : '';
}
} }
$winfo[$wdata['gid']] = $wdata; $winfo[$wdata['gid']] = $wdata;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment