Minahito
minah****@users*****
2006年 3月 8日 (水) 16:50:45 JST
Index: xoops2jp/html/modules/user/class/avatar_user_link.php diff -u /dev/null xoops2jp/html/modules/user/class/avatar_user_link.php:1.1.2.1 --- /dev/null Wed Mar 8 16:50:45 2006 +++ xoops2jp/html/modules/user/class/avatar_user_link.php Wed Mar 8 16:50:45 2006 @@ -0,0 +1,38 @@ +<?php + +class UserAvatar_user_linkObject extends XoopsSimpleObject +{ + function UserAvatar_user_linkObject() + { + $this->initVar('avatar_id', XOBJ_DTYPE_INT, '0', true); + $this->initVar('user_id', XOBJ_DTYPE_INT, '0', true); + } +} + +class UserAvatar_user_linkHandler extends XoopsObjectGenericHandler +{ + var $mTable = "avatar_user_link"; + var $mPrimary = ""; + var $mClass = "UserAvatar_user_linkObject"; + + function &get($id) + { + $ret = null; + return $ret; + } + + function _update(&$obj) + { + return $this->_insert($obj); + } + + function delete(&$obj, $force=false) + { + $id = $this->db->quoteString($obj->get('avatar_id')); + $sql = "DELETE FROM " . $this->mTable . " WHERE avatar_id=" . $obj->get('avatar_id') . " AND user_id=" . $obj->get('user_id'); + + return $force ? $this->db->queryF($sql) : $this->db->query($sql); + } +} + +?>