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
commit ecea7425f8
152 changed files with 765 additions and 765 deletions

View file

@ -48,7 +48,7 @@ function photos_init(App $a) {
dbesc($nick)
);
if (!DBA::is_result($user)) {
if (!DBA::isResult($user)) {
return;
}
@ -169,7 +169,7 @@ function photos_post(App $a)
intval($page_owner_uid)
);
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
$can_post = true;
$visitor = $contact_id;
}
@ -201,7 +201,7 @@ function photos_post(App $a)
dbesc($album),
intval($page_owner_uid)
);
if (!DBA::is_result($r)) {
if (!DBA::isResult($r)) {
notice(L10n::t('Album not found.') . EOL);
goaway($_SESSION['photo_return']);
return; // NOTREACHED
@ -270,7 +270,7 @@ function photos_post(App $a)
dbesc($album)
);
}
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
foreach ($r as $rr) {
$res[] = "'" . dbesc($rr['rid']) . "'" ;
}
@ -336,7 +336,7 @@ function photos_post(App $a)
);
}
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
q("DELETE FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s'",
intval($page_owner_uid),
dbesc($r[0]['resource-id'])
@ -378,7 +378,7 @@ function photos_post(App $a)
intval($page_owner_uid)
);
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
$image = new Image($r[0]['data'], $r[0]['type']);
if ($image->isValid()) {
@ -431,7 +431,7 @@ function photos_post(App $a)
dbesc($resource_id),
intval($page_owner_uid)
);
if (DBA::is_result($p)) {
if (DBA::isResult($p)) {
$ext = $phototypes[$p[0]['type']];
$r = q("UPDATE `photo` SET `desc` = '%s', `album` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' WHERE `resource-id` = '%s' AND `uid` = %d",
dbesc($desc),
@ -495,7 +495,7 @@ function photos_post(App $a)
if ($item_id) {
$item = Item::selectFirst(['tag', 'inform'], ['id' => $item_id, 'uid' => $page_owner_uid]);
}
if (DBA::is_result($item)) {
if (DBA::isResult($item)) {
$old_tag = $item['tag'];
$old_inform = $item['inform'];
}
@ -558,7 +558,7 @@ function photos_post(App $a)
intval($page_owner_uid)
);
if (!DBA::is_result($r)) {
if (!DBA::isResult($r)) {
//select someone by attag or nick and the name passed in
$r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1",
dbesc($name),
@ -568,7 +568,7 @@ function photos_post(App $a)
}
}
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
$newname = $r[0]['name'];
$profile = $r[0]['url'];
$notify = 'cid:' . $r[0]['id'];
@ -711,7 +711,7 @@ function photos_post(App $a)
intval($page_owner_uid)
);
if (!DBA::is_result($r) || ($album == L10n::t('Profile Photos'))) {
if (!DBA::isResult($r) || ($album == L10n::t('Profile Photos'))) {
$visible = 1;
} else {
$visible = 0;
@ -984,7 +984,7 @@ function photos_content(App $a)
intval($contact_id),
intval($owner_uid)
);
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
$can_post = true;
$contact = $r[0];
$remote_contact = true;
@ -1013,7 +1013,7 @@ function photos_content(App $a)
intval($contact_id),
intval($owner_uid)
);
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
$contact = $r[0];
$remote_contact = true;
}
@ -1113,7 +1113,7 @@ function photos_content(App $a)
intval($owner_uid),
dbesc($album)
);
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
$a->set_pager_total(count($r));
$a->set_pager_itemspage(20);
}
@ -1169,7 +1169,7 @@ function photos_content(App $a)
$photos = [];
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
// "Twist" is only used for the duepunto theme with style "slackr"
$twist = false;
foreach ($r as $rr) {
@ -1219,13 +1219,13 @@ function photos_content(App $a)
dbesc($datum)
);
if (!DBA::is_result($ph)) {
if (!DBA::isResult($ph)) {
$ph = q("SELECT `id` FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s'
LIMIT 1",
intval($owner_uid),
dbesc($datum)
);
if (DBA::is_result($ph)) {
if (DBA::isResult($ph)) {
notice(L10n::t('Permission denied. Access to this item may be restricted.'));
} else {
notice(L10n::t('Photo not available') . EOL);
@ -1256,7 +1256,7 @@ function photos_content(App $a)
intval($owner_uid)
);
if (DBA::is_result($prvnxt)) {
if (DBA::isResult($prvnxt)) {
foreach ($prvnxt as $z => $entry) {
if ($entry['resource-id'] == $ph[0]['resource-id']) {
$prv = $z - 1;
@ -1353,7 +1353,7 @@ function photos_content(App $a)
$map = null;
$link_item = [];
if (DBA::is_result($linked_items)) {
if (DBA::isResult($linked_items)) {
// This is a workaround to not being forced to rewrite the while $sql_extra handling
$link_item = Item::selectFirst([], ['id' => $linked_items[0]['id']]);
@ -1449,7 +1449,7 @@ function photos_content(App $a)
]);
}
if (!DBA::is_result($items)) {
if (!DBA::isResult($items)) {
if (($can_post || can_write_wall($owner_uid))) {
$comments .= replace_macros($cmnt_tpl, [
'$return_path' => '',
@ -1476,7 +1476,7 @@ function photos_content(App $a)
];
// display comments
if (DBA::is_result($items)) {
if (DBA::isResult($items)) {
foreach ($items as $item) {
builtin_activity_puller($item, $conv_responses);
}
@ -1619,7 +1619,7 @@ function photos_content(App $a)
dbesc(L10n::t('Contact Photos'))
);
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
$a->set_pager_total(count($r));
$a->set_pager_itemspage(20);
}
@ -1637,7 +1637,7 @@ function photos_content(App $a)
);
$photos = [];
if (DBA::is_result($r)) {
if (DBA::isResult($r)) {
// "Twist" is only used for the duepunto theme with style "slackr"
$twist = false;
foreach ($r as $rr) {