dbesc($sort)
);
- if (!dbm::is_result($r)) {
- /// @TODO Some logging?
- killme();
- }
-
- // Will check further below if this actually returned results.
- // We will provide an empty feed if that is the case.
+ /*
+ * Will check further below if this actually returned results.
+ * We will provide an empty feed if that is the case.
+ */
$items = $r;
$root = self::add_header($doc, $owner, $author, $alternatelink, true);
- // This hook can't work anymore
+ /// @TODO This hook can't work anymore
// call_hooks('atom_feed', $atom);
- if (!count($items) OR $onlyheader) {
+ if (!dbm::is_result($items) OR $onlyheader) {
$atom = trim($doc->saveXML());
call_hooks('atom_feed_end', $atom);
intval($owner["uid"]),
dbesc(normalise_link($mention)));
- if (!dbm::is_result($r)) {
- /// @TODO Maybe some logging?
- killme();
- }
-
- if ($r[0]["forum"] OR $r[0]["prv"]) {
+ if (dbm::is_result($r) AND ($r[0]["forum"] OR $r[0]["prv"])) {
xml::add_element($doc, $entry, "link", "", array("rel" => "mentioned",
"ostatus:object-type" => ACTIVITY_OBJ_GROUP,
"href" => $mention));
$idtosend = '1:' . $orig_id;
}
- $rino = get_config('system','rino_encrypt');
+ $rino = get_config('system', 'rino_encrypt');
$rino = intval($rino);
// use RINO1 if mcrypt isn't installed and RINO2 was selected
if ($dfrn_version >= 2.1) {
- if (($contact['duplex'] && strlen($contact['pubkey'])) {
- || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))
- || ($contact['rel'] == CONTACT_IS_SHARING && strlen($contact['pubkey'])))
-
+ if (($contact['duplex'] && strlen($contact['pubkey']))
+ || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))
+ || ($contact['rel'] == CONTACT_IS_SHARING && strlen($contact['pubkey']))) {
openssl_public_encrypt($key,$postvars['key'],$contact['pubkey']);
} else {
openssl_private_encrypt($key,$postvars['key'],$contact['prvkey']);
intval($importer["importer_uid"]));
if (!dbm::is_result($r)) {
- /*
- * @TODO maybe one day:
logger("Query failed to execute, no result returned in " . __FUNCTION__);
- killme();
- */
return false;
}
update_contact_avatar($relocate["avatar"], $importer["importer_uid"], $importer["id"], true);
- /// @TODO decide to use dbm::is_result() here
if ($x === false) {
return false;
}
$n, dbesc($f[0]),
intval($importer["importer_uid"]));
- /// @TODO decide to use dbm::is_result() here
if ($x === false) {
return false;
}
// do not accept (ignore) an earlier edit than one we currently have.
if (datetime_convert("UTC","UTC",$item["edited"]) < $current["edited"]) {
- return(false);
+ return false;
}
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s', `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d",
*/
/// @TODO Maybe merge these if() blocks into one?
- if ($is_a_remote_action && $community) {
- if ((!$r[0]["forum_mode"]) && (!$r[0]["wall"])) {
- $is_a_remote_action = false;
- logger("not a community action");
- }
+ if ($is_a_remote_action && $community && (!$r[0]["forum_mode"]) && (!$r[0]["wall"])) {
+ $is_a_remote_action = false;
+ logger("not a community action");
}
if ($is_a_remote_action) {
);
if (!dbm::is_result($r)) {
- /*
- * @TODO maybe one day:
logger("Query failed to execute, no result returned in " . __FUNCTION__);
- killme();
- */
return false;
}