$r = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
intval($_SESSION['visitor_id'])
);
- if (count($r)) {
+ if (dbm::is_result($r)) {
$a->contact = $r[0];
}
}
intval($_SESSION['uid'])
);
- if (!count($r)) {
+ if (!dbm::is_result($r)) {
nuke_session();
goaway(z_root());
}
$openid = new LightOpenID;
$openid->identity = $openid_url;
$_SESSION['openid'] = $openid_url;
- $a = get_app();
- $openid->returnUrl = $a->get_baseurl(true).'/openid';
+ $openid->returnUrl = App::get_baseurl(true).'/openid';
goaway($openid->authUrl());
} catch (Exception $e) {
notice(t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.').'<br /><br >'.t('The error message was:').' '.$e->getMessage());
dbesc(trim($_POST['username'])),
dbesc($encrypted)
);
- if (count($r))
+ if (dbm::is_result($r))
$record = $r[0];
}