}
}
-define('USERSNET_FRIEND', 1);
-define('USERSNET_SKILL', 1);
-define('USERSNET_TRUST', 2);
+define('USERSNET_DEF_FRIEND', 2);
+define('USERSNET_DEF_SKILL', 2);
+define('USERSNET_DEF_TRUST', 2);
+
class UsersNetItem {
var $owner;
var $target;
var $from_db;
- function UsersNetItem($owner, $target, $friend, $skill, $trust, $from_db)
+ function UsersNetItem($owner, $target, $friend, $skill, $trust,
+ $widefriend, $narrowfriend, $from_db)
{
$this->owner = $owner;
$this->target = $target;
$this->friend = $friend;
$this->skill = $skill;
$this->trust = $trust;
+ $this->widefriend = $widefriend;
+ $this->narrowfriend = $narrowfriend;
$this->from_db = $from_db;
}
- static function UsersNetItemFromRecord($rec)
+ static function UsersNetItemFromRecord($rec, $widefriend, $narrowfriend)
{
$ret = new UsersNetItem($rec->owner, $rec->target, $rec->friend,
- $rec->skill, $rec->trust, TRUE);
+ $rec->skill, $rec->trust,
+ $widefriend, $narrowfriend, TRUE);
return ($ret);
}
- static function UsersNetItemDefaults($owner, $target)
+ static function UsersNetItemDefaults($owner, $target, $widefriend, $narrowfriend)
{
- $ret = new UsersNetItem($owner, $target, USERSNET_FRIEND,
- USERSNET_SKILL, USERSNET_TRUST, FALSE);
+ $ret = new UsersNetItem($owner, $target, USERSNET_DEF_FRIEND,
+ USERSNET_DEF_SKILL, USERSNET_DEF_TRUST,
+ $widefriend, $narrowfriend, FALSE);
return ($ret);
}