Rename selectOne to selectFirst

This commit is contained in:
Hypolite Petovan 2018-01-10 08:36:02 -05:00
parent c7a7658316
commit ae66bcaff3
51 changed files with 821 additions and 821 deletions

View file

@ -68,13 +68,13 @@ function noscrape_init(App $a) {
// We display the last activity (post or login), reduced to year and week number
$last_active = 0;
$condition = ['uid' => $a->profile['uid'], 'self' => true];
$contact = dba::selectOne('contact', ['last-item'], $condition);
$contact = dba::selectFirst('contact', ['last-item'], $condition);
if (DBM::is_result($contact)) {
$last_active = strtotime($contact['last-item']);
}
$condition = ['uid' => $a->profile['uid']];
$user = dba::selectOne('user', ['login_date'], $condition);
$user = dba::selectFirst('user', ['login_date'], $condition);
if (DBM::is_result($user)) {
if ($last_active < strtotime($user['login_date'])) {
$last_active = strtotime($user['login_date']);