Minahito
minah****@users*****
2006年 8月 26日 (土) 13:58:18 JST
Index: xoops2jp/html/modules/user/actions/UserInfoAction.class.php diff -u xoops2jp/html/modules/user/actions/UserInfoAction.class.php:1.1.2.5 xoops2jp/html/modules/user/actions/UserInfoAction.class.php:1.1.2.6 --- xoops2jp/html/modules/user/actions/UserInfoAction.class.php:1.1.2.5 Thu Jul 27 18:43:26 2006 +++ xoops2jp/html/modules/user/actions/UserInfoAction.class.php Sat Aug 26 13:58:17 2006 @@ -1,7 +1,7 @@ <?php /** * @package user - * @version $Id: UserInfoAction.class.php,v 1.1.2.5 2006/07/27 09:43:26 minahito Exp $ + * @version $Id: UserInfoAction.class.php,v 1.1.2.6 2006/08/26 04:58:17 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -21,7 +21,14 @@ var $mObject = null; var $mRankObject = null; var $mSearchResults = null; + + var $mSelfDelete = false; + function prepare(&$controller, &$xoopsUser, $moduleConfig) + { + $this->mSelfDelete = $moduleConfig['self_delete']; + } + function isSecure() { return false; @@ -50,7 +57,7 @@ $this->mSearchResults = $client->call('GetItems', $uid, $current_uid); } - + return USER_FRAME_VIEW_SUCCESS; } @@ -77,6 +84,17 @@ // $user_ownpage = (is_object($xoopsUser) && $xoopsUser->get('uid') == $this->mObject->get('uid')); $render->setAttribute("user_ownpage", $user_ownpage); + + // + // About 'SELF DELETE' + // + $render->setAttribute('self_delete', $this->mSelfDelete); + if ($user_ownpage && $this->mSelfDelete) { + $render->setAttribute('enableSelfDelete', true); + } + else { + $render->setAttribute('enableSelfDelete', false); + } } function executeViewError(&$controller, &$xoopsUser, &$render)