diff --git a/actions-sms.php b/actions-sms.php index 757771f..8377498 100644 --- a/actions-sms.php +++ b/actions-sms.php @@ -650,7 +650,7 @@ function note($number,$bikeNum,$message) function last($number,$bike) { - + //@see \BikeShare\Repository\BikeRepository::findItemLastUsage global $db, $smsSender, $user; $userId = $user->findUserIdByNumber($number); $bikeNum = intval($bike); diff --git a/actions-web.php b/actions-web.php index d59ba28..ea32f60 100644 --- a/actions-web.php +++ b/actions-web.php @@ -122,76 +122,6 @@ function removenote($userId, $bikeNum) response(_('Note for bike') . ' ' . $bikeNum . ' ' . _('deleted') . '.'); } -function last($userId, $bike = 0) -{ - global $db; - $bikeNum = intval($bike); - if ($bikeNum) { - - $result = $db->query("SELECT note FROM notes WHERE bikeNum='$bikeNum' AND deleted IS NULL ORDER BY time DESC"); - $note = ''; - while ($row = $result->fetch_assoc()) { - $note .= $row['note'] . '; '; - } - $note = substr($note, 0, strlen($note) - 2); // remove last two chars - comma and space - if ($note) { - $note = _('Bike note:') . ' ' . $note; - } - - $historyInfo = '
{{ 'Note'|trans }}:
+{{ 'Rented by'|trans }}: {{ 'at'|trans }}:
+