From: <ok...@us...> - 2003-01-07 16:10:05
|
Update of /cvsroot/xoops/xoops2/kernel/member/object In directory sc8-pr-cvs1:/tmp/cvs-serv1907/kernel/member/object Modified Files: user.php Log Message: code optimization Index: user.php =================================================================== RCS file: /cvsroot/xoops/xoops2/kernel/member/object/user.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** user.php 6 Jan 2003 08:49:18 -0000 1.5 --- user.php 7 Jan 2003 16:09:56 -0000 1.6 *************** *** 90,94 **** function getUnameFromId($userid) { - global $xoopsConfig; $userid = intval($userid); if ($userid > 0) { --- 90,93 ---- *************** *** 98,102 **** return $ts->htmlSpecialChars($user->getVar('uname')); } else { ! return $xoopsConfig['anonymous']; } } --- 97,101 ---- return $ts->htmlSpecialChars($user->getVar('uname')); } else { ! return $GLOBALS['xoopsConfig']['anonymous']; } } *************** *** 121,129 **** function isAdmin($module_id = 0) { ! if (!isset($this->_isAdmin)) { ! $moduleperm_handler =& xoops_gethandler('permission', 'moduleperm'); ! $this->_isAdmin = (!$moduleperm_handler->checkRight($module_id, $this->getGroups(), 'A')) ? false : true; ! } ! return $this->_isAdmin; } function rank() --- 120,126 ---- function isAdmin($module_id = 0) { ! $moduleperm_handler =& xoops_gethandler('permission', 'moduleperm'); ! $ret = (!$moduleperm_handler->checkRight($module_id, $this->getGroups(), 'A')) ? false : true; ! return $ret; } function rank() |