Update of /cvsroot/phpwsbb/phpwsbb/class
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22121/class
Modified Files:
Message.php
Log Message:
Using phpwsContacts first/last name in posted by
Index: Message.php
===================================================================
RCS file: /cvsroot/phpwsbb/phpwsbb/class/Message.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** Message.php 29 Mar 2004 04:06:47 -0000 1.46
--- Message.php 29 Mar 2004 04:21:31 -0000 1.47
***************
*** 113,121 ****
if ($GLOBALS['core']->moduleExists("phpwscontacts")) {
// Find contact owned by this username
! $sql = "select id from " . PHPWS_TBL_PREFIX . "mod_phpwscontacts_contacts where owner='" . $this->getOwner() . "'";
$results = $GLOBALS["core"]->getCol($sql);
! if ($results)
! $poster = "<a href=\"index.php?module=phpwscontacts&CONTACTS_MAN_OP=view&PHPWS_MAN_ITEMS[]=" . $results[0] . "\">$poster</a>";
}
}
--- 113,125 ----
if ($GLOBALS['core']->moduleExists("phpwscontacts")) {
+ require_once(PHPWS_SOURCE_DIR.'mod/phpwscontacts/class/Contact.php');
// Find contact owned by this username
! $sql = "select id from " . PHPWS_TBL_PREFIX . "mod_phpwscontacts_contacts where owner='" . $this->getOwner() . "' and mine=1";
$results = $GLOBALS["core"]->getCol($sql);
! if ($results) {
! //$poster = "<a href=\"index.php?module=phpwscontacts&CONTACTS_MAN_OP=view&PHPWS_MAN_ITEMS[]=" . $results[0] . "\">$poster</a>";
! $contact = new CONTACTS_Contact($results[0]);
! $poster = "<a href=\"index.php?module=phpwscontacts&CONTACTS_MAN_OP=view&PHPWS_MAN_ITEMS[]=" . $contact->getId() . "\">" . $contact->getListFirstName() . " " . $contact->getListLastName() . "</a>";
! }
}
}
|