X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Finc%2Fsmarty%2Fnode_methodz%2Ffunction.get_node_commanders.php;h=437c4ccf4f2e09e0336bfa1e88b8c6765c48d62e;hb=ca9205d721ec662076a05441ab27f247b104318a;hp=a64e7b55b564f46e864b84d5c697b3bd19ca391b;hpb=51ff32267c4949bad6a8dddc502cbc01ed56edc8;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/inc/smarty/node_methodz/function.get_node_commanders.php b/wwwroot/inc/smarty/node_methodz/function.get_node_commanders.php index a64e7b5..437c4cc 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_node_commanders.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_node_commanders.php @@ -1,20 +1,17 @@ query("select node_permission,users.login from node_access left join users on node_access.user_id=users.user_id where node_id='$node_id' and node_permission!='' order by node_permission"); + + $commanders=nodes::getNodeCommanders($node_id); - while ($set->next()) { - $commanders[$set->getString('node_permission')].=$set->getString('login').";"; - } - - $smarty->assign('get_node_commanders',$commanders); - $smarty->assign('masters',$commanders['master']); - $smarty->assign('ops',$commanders['op']); - $smarty->assign('access',$commanders['access']); - $smarty->assign('bans',$commanders['ban']); - $smarty->assign('silence',$commanders['silence']); - $smarty->assign('execute',$commanders['execute']); + $smarty->assign('get_node_commanders',empty($commanders) ? "" : $commanders); + $smarty->assign('masters',empty($commanders['master']) ? "" : $commanders['master']); + $smarty->assign('ops',empty($commanders['op']) ? "" : $commanders['op']); + $smarty->assign('access',empty($commanders['access']) ? "" : $commanders['access']); + $smarty->assign('bans',empty($commanders['ban']) ? "" : $commanders['ban']); + $smarty->assign('silence',empty($commanders['silence']) ? "" : $commanders['silence']); + $smarty->assign('execute',empty($commanders['execute']) ? "" : $commanders['execute']); }