Rename DBA::is_result to DBA::isResult

This commit is contained in:
Hypolite Petovan 2018-07-21 08:46:04 -04:00 committed by Hypolite Petovan
parent 0ec44f3e8a
commit ecea7425f8
152 changed files with 765 additions and 765 deletions

View file

@ -34,7 +34,7 @@ function profiles_init(App $a) {
intval($a->argv[2]),
intval(local_user())
);
if (! DBA::is_result($r)) {
if (! DBA::isResult($r)) {
notice(L10n::t('Profile not found.') . EOL);
goaway('profiles');
return; // NOTREACHED
@ -53,7 +53,7 @@ function profiles_init(App $a) {
intval($a->argv[2]),
intval(local_user())
);
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
info(L10n::t('Profile deleted.').EOL);
}
@ -68,7 +68,7 @@ function profiles_init(App $a) {
$r0 = q("SELECT `id` FROM `profile` WHERE `uid` = %d",
intval(local_user()));
$num_profiles = (DBA::is_result($r0) ? count($r0) : 0);
$num_profiles = (DBA::isResult($r0) ? count($r0) : 0);
$name = L10n::t('Profile-') . ($num_profiles + 1);
@ -90,7 +90,7 @@ function profiles_init(App $a) {
);
info(L10n::t('New profile created.') . EOL);
if (DBA::is_result($r3) && count($r3) == 1) {
if (DBA::isResult($r3) && count($r3) == 1) {
goaway('profiles/' . $r3[0]['id']);
}
@ -104,14 +104,14 @@ function profiles_init(App $a) {
$r0 = q("SELECT `id` FROM `profile` WHERE `uid` = %d",
intval(local_user()));
$num_profiles = (DBA::is_result($r0) ? count($r0) : 0);
$num_profiles = (DBA::isResult($r0) ? count($r0) : 0);
$name = L10n::t('Profile-') . ($num_profiles + 1);
$r1 = q("SELECT * FROM `profile` WHERE `uid` = %d AND `id` = %d LIMIT 1",
intval(local_user()),
intval($a->argv[2])
);
if(! DBA::is_result($r1)) {
if(! DBA::isResult($r1)) {
notice(L10n::t('Profile unavailable to clone.') . EOL);
killme();
return;
@ -129,7 +129,7 @@ function profiles_init(App $a) {
dbesc($name)
);
info(L10n::t('New profile created.') . EOL);
if ((DBA::is_result($r3)) && (count($r3) == 1)) {
if ((DBA::isResult($r3)) && (count($r3) == 1)) {
goaway('profiles/'.$r3[0]['id']);
}
@ -144,7 +144,7 @@ function profiles_init(App $a) {
intval($a->argv[1]),
intval(local_user())
);
if (! DBA::is_result($r)) {
if (! DBA::isResult($r)) {
notice(L10n::t('Profile not found.') . EOL);
killme();
return;
@ -191,7 +191,7 @@ function profiles_post(App $a) {
intval($a->argv[1]),
intval(local_user())
);
if (! DBA::is_result($orig)) {
if (! DBA::isResult($orig)) {
notice(L10n::t('Profile not found.') . EOL);
return;
}
@ -286,13 +286,13 @@ function profiles_post(App $a) {
dbesc($newname),
intval(local_user())
);
if (! DBA::is_result($r)) {
if (! DBA::isResult($r)) {
$r = q("SELECT * FROM `contact` WHERE `nick` = '%s' AND `uid` = %d LIMIT 1",
dbesc($lookup),
intval(local_user())
);
}
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
$prf = $r[0]['url'];
$newname = $r[0]['name'];
}
@ -478,7 +478,7 @@ function profiles_post(App $a) {
intval(local_user())
);
/// @TODO decide to use dbm::is_result() here and check $r
/// @TODO decide to use DBA::isResult() here and check $r
if ($r) {
info(L10n::t('Profile updated.') . EOL);
}
@ -521,7 +521,7 @@ function profiles_content(App $a) {
intval($a->argv[1]),
intval(local_user())
);
if (! DBA::is_result($r)) {
if (! DBA::isResult($r)) {
notice(L10n::t('Profile not found.') . EOL);
return;
}
@ -653,7 +653,7 @@ function profiles_content(App $a) {
$r = q("SELECT * FROM `profile` WHERE `uid` = %d AND `is-default`=1",
local_user()
);
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
//Go to the default profile.
goaway('profiles/' . $r[0]['id']);
}
@ -662,7 +662,7 @@ function profiles_content(App $a) {
$r = q("SELECT * FROM `profile` WHERE `uid` = %d",
local_user());
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
$tpl = get_markup_template('profile_entry.tpl');