X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Fcontact.php;h=c56102389c997839848861a5af966faf192320b6;hb=4cd13bda037940724f018b8bfc62413156c52b75;hp=a5bceee8f906d0ff57c5aaab45c8f389042799dd;hpb=1f7a83666984030585efbd902006bd797da66ebc;p=readifood.git diff --git a/lib/contact.php b/lib/contact.php index a5bceee..c561023 100644 --- a/lib/contact.php +++ b/lib/contact.php @@ -50,11 +50,13 @@ $role = $contact->getRole(); $role_string = get_contact_role_string($contact); if ($role_string) echo " $role_string"; - if ($role & $GLOBALS['ROLE_DONOR']) printf(" Donations", urlencode($contact->getDisplayname()), $contact->getId()); - if ($role & $GLOBALS['ROLE_REQUESTER']) printf(" Referred", urlencode($contact->getDisplayname()), $contact->getId()); + $d = urlencode($contact->getDisplayname()); + $i = $contact->getId(); + if ($role & $GLOBALS['ROLE_DONOR']) echo " " . get_small_link("Donations", "/donation/from/contact/%s/%d", $d, $i); + if ($role & $GLOBALS['ROLE_REQUESTER']) echo " " . get_small_link("Referred", "/order/from/referrer/%s/%d", $d, $i); if ($role & $GLOBALS['ROLE_BENEFICIARY']) { - printf(" Orders", urlencode($contact->getDisplayname()), $contact->getId()); - if (get_contact_area($contact)) printf(" Place", urlencode($contact->getDisplayname()), $contact->getId()); + echo " " . get_small_link("Orders", "/order/to/beneficiary/%s/%d", $d, $contact->getId()); + if (get_contact_area($contact)) echo " " . get_small_link("Place", "/order/place/for/beneficiary/%s/%d", $d, $i); } if (check_admin(1)) { echo " " . $contact->getDeleteLink();