X-Git-Url: http://mop.ddnsfree.com/gitweb/?p=brisk.git;a=blobdiff_plain;f=web%2FObj%2Fdbase_pgsql.phh;h=e3e1551af925da4c52ad156819283ff7dee57e07;hp=77c215f83940975a122a5dddf0df4c46388a7545;hb=a77cf3db1fbace39c49b030b9e144a316f007373;hpb=152b9a21a2a057869ed1f459ad375c9cb3396ea5 diff --git a/web/Obj/dbase_pgsql.phh b/web/Obj/dbase_pgsql.phh index 77c215f..e3e1551 100644 --- a/web/Obj/dbase_pgsql.phh +++ b/web/Obj/dbase_pgsql.phh @@ -855,6 +855,28 @@ INSERT INTO %smails (code, ucode, type, tstamp, subj, body_txt, body_htm, hash) return (TRUE); } + function usernet_bycode($owner, $target) + { + GLOBAL $G_dbpfx; + $ret = FALSE; + + $net_sql = sprintf("SELECT * FROM %susers_net WHERE owner = %d AND target = %d;", + $G_dbpfx, $owner, $target); + if (($net_pg = $this->query($net_sql)) == FALSE) { + return FALSE; + } + if (pg_numrows($net_pg) != 1) + return FALSE; + + $net_obj = pg_fetch_object($net_pg, 0); + + return (UserNetItem::UserNetItemFromRecord($net_obj)); + } + + function usernet_default($owner, $target) + { + return (UserNetItem::UserNetItemDefaults($owner, $target)); + } } // End class BriskDB