spelling, small cleanups

This commit is contained in:
Gilles Crettenand
2015-06-02 23:14:54 +02:00
parent b587047d17
commit 4f865d1186
8 changed files with 36 additions and 38 deletions

View File

@@ -5,7 +5,7 @@ use BSR\Lib\Configuration;
use BSR\Lib\Search\BookSearch;
/**
* User is mapped on the Useraccounts table. Contains user information : id, login, firstName, lastName, displayName.
* User is mapped on the UserAccounts table. Contains user information : id, login, firstName, lastName, displayName.
*
* @property int id
* @property string $login
@@ -72,11 +72,11 @@ class User extends DbMapping
[TelephoneMobile] AS mobilePhone,
[TelephonePrivate] AS privatePhone,
[Telephone] AS officePhone,
[UserAccountId] AS id,
REPLACE(UseraccountNr, ' ', '') AS login
[UserAccountID] AS id,
REPLACE(UserAccountNr, ' ', '') AS login
FROM [UserAccounts] AS u
LEFT JOIN [Addresses] AS a ON a.[AddressID] = u.[ActualAddressID]
WHERE REPLACE(UseraccountNr, ' ', '') = '%s' AND disabled = 1 %s;",
WHERE REPLACE(UserAccountNr, ' ', '') = '%s' AND disabled = 1 %s;",
$login, $cond);
$results = Connection::execute($sql, $raiseError);
@@ -91,7 +91,7 @@ class User extends DbMapping
FROM %s AS c
INNER JOIN Items AS i ON i.ItemId = c.ItemId
WHERE
c.UseraccountId = %s
c.UserAccountID = %s
ORDER BY %s", $table, $this->id, $sort);
$result = Connection::execute($sql);
@@ -161,7 +161,7 @@ class User extends DbMapping
INNER JOIN Notices AS n ON n.NoticeID = w.NoticeID
WHERE
LTRIM(RTRIM(n.NoticeNr)) = '%s'
AND w.UseraccountId = %s;", $noticeNr, $this->id);
AND w.UserAccountID = %s;", $noticeNr, $this->id);
$result = Connection::execute($sql);
return $result->current() !== false;