Replace select(limit => 1) by selectFirst() in Model\Term and include/enotify

- Add new array declaration syntax
- Add braces
This commit is contained in:
Hypolite Petovan 2018-01-10 13:04:00 -05:00
parent 483d1a1bcb
commit 1fda0ae4ae
2 changed files with 20 additions and 9 deletions

View file

@ -50,8 +50,8 @@ function notification($params)
}
if ($params['type'] != SYSTEM_EMAIL) {
$user = dba::select('user', array('nickname', 'page-flags'),
array('uid' => $params['uid']), array('limit' => 1));
$user = dba::selectFirst('user', ['nickname', 'page-flags'],
['uid' => $params['uid']]);
// There is no need to create notifications for forum accounts
if (!DBM::is_result($user) || in_array($user["page-flags"], array(PAGE_COMMUNITY, PAGE_PRVGROUP))) {