From b0b9828b27e140f88fb0b7867388376b329959cc Mon Sep 17 00:00:00 2001 From: Iain Patterson <me@iain.cx> Date: Tue, 9 Apr 2013 15:30:17 -0400 Subject: [PATCH] Requester => Referrer. The preferred terminology for someone requesting an order is Referrer rather than Requester. --- lib/constants.php | 2 +- lib/contact.php | 4 ++-- lib/order.php | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/constants.php b/lib/constants.php index 06a7c9e..375fe47 100644 --- a/lib/constants.php +++ b/lib/constants.php @@ -4,7 +4,7 @@ $week = array("Sun", "Mon", "Tues", "Wed", "Thu", "Fri", "Sat"); /* Contact roles. */ - $roles = array("Staff", "Driver", "Requester", "Beneficiary", "Donor"); + $roles = array("Staff", "Driver", "Referrer", "Beneficiary", "Donor"); $ROLE_STAFF = 1 << 0; $ROLE_DRIVER = 1 << 1; $ROLE_REQUESTER = 1 << 2; diff --git a/lib/contact.php b/lib/contact.php index 170d342..ccfcd48 100644 --- a/lib/contact.php +++ b/lib/contact.php @@ -50,7 +50,7 @@ $role_string = get_contact_role_string($contact); if ($role_string) echo " $role_string"; if ($role & $GLOBALS['ROLE_DONOR']) printf(" <a class=\"small\" href=\"/donation/from/contact/%s/%d\">Donations</a>", urlencode($contact->getDisplayname()), $contact->getId()); - if ($role & $GLOBALS['ROLE_REQUESTER']) printf(" <a class=\"small\" href=\"/order/from/requester/%s/%d\">Requested</a>", urlencode($contact->getDisplayname()), $contact->getId()); + if ($role & $GLOBALS['ROLE_REQUESTER']) printf(" <a class=\"small\" href=\"/order/from/referrer/%s/%d\">Referred</a>", urlencode($contact->getDisplayname()), $contact->getId()); if ($role & $GLOBALS['ROLE_BENEFICIARY']) printf(" <a class=\"small\" href=\"/order/to/beneficiary/%s/%d\">Orders</a>", urlencode($contact->getDisplayname()), $contact->getId()); if (check_admin(1)) { echo " " . $contact->getDeleteLink(); @@ -433,7 +433,7 @@ $role_string = get_contact_role_string($contact); if ($role_string) echo " $role_string"; if ($role & $GLOBALS['ROLE_DONOR']) printf(" <a class=\"small\" href=\"/donation/from/contact/%s/%d\">Donations</a>", urlencode($contact->getDisplayname()), $contact->getId()); - if ($role & $GLOBALS['ROLE_REQUESTER']) printf(" <a class=\"small\" href=\"/order/from/requester/%s/%d\">Requested</a>", urlencode($contact->getDisplayname()), $contact->getId()); + if ($role & $GLOBALS['ROLE_REQUESTER']) printf(" <a class=\"small\" href=\"/order/from/referrer/%s/%d\">Referred</a>", urlencode($contact->getDisplayname()), $contact->getId()); if ($role & $GLOBALS['ROLE_BENEFICIARY']) printf(" <a class=\"small\" href=\"/order/to/beneficiary/%s/%d\">Orders</a>", urlencode($contact->getDisplayname()), $contact->getId()); if (check_admin(1)) { echo " " . $contact->getDeleteLink(); diff --git a/lib/order.php b/lib/order.php index 8b1bbcd..40b645d 100644 --- a/lib/order.php +++ b/lib/order.php @@ -101,7 +101,7 @@ if (isset($contact_id)) $contact = get_contact_by_id($contact_id); else if ($contact_name) $contact = get_contact_by_name($contact_name); if ($contact) { - echo "<p>Orders from requester " . $contact->getLink() . ":"; + echo "<p>Orders from referrer " . $contact->getLink() . ":"; return show_orders($offset, $per_page, $contact->getId(), null, $state_mask); } else echo "<p>No such contact!</p>\n"; @@ -247,9 +247,9 @@ echo " <td>"; show_date_form("date", $order->getDate()); echo "</td>\n"; echo "</tr>\n"; - /* Requester. */ + /* Referrer. */ echo "<tr>\n"; - echo " <td>Requester</td>\n"; + echo " <td>Referrer</td>\n"; echo " <td><select name=\"requester_id\">\n"; option("requester_id", null, ""); $contacts = get_area_requesters(); @@ -378,7 +378,7 @@ $requester = get_contact_by_id($requester_id); if (! $requester) { - echo "<p>Invalid requester!</p>\n"; + echo "<p>Invalid referrer!</p>\n"; return false; } @@ -553,9 +553,9 @@ } } else if ($parameters[0] == "from") { - /* /order/from/requester/Iain+Patterson/4 */ + /* /order/from/referrer/Iain+Patterson/4 */ switch ($parameters[1]) { - case "requester": + case "referrer": $contact_id = $parameters[3]; $q = new ContactQuery; $contact = $q->findOneById($contact_id); -- 2.20.1