// Formerly we stored the signed text, the signature and the author in different fields.
// We now store the raw data so that we are more flexible.
- q("INSERT INTO `sign` (`iid`,`signed_text`) VALUES (%d,'%s')",
- intval($message_id),
- dbesc(json_encode($data))
- );
+ dba::insert('sign', array('iid' => $message_id, 'signed_text' => json_encode($data)));
// notify others
proc_run(PRIORITY_HIGH, "include/notifier.php", "comment-import", $message_id);
// Formerly we stored the signed text, the signature and the author in different fields.
// We now store the raw data so that we are more flexible.
- q("INSERT INTO `sign` (`iid`,`signed_text`) VALUES (%d,'%s')",
- intval($message_id),
- dbesc(json_encode($data))
- );
+ dba::insert('sign', array('iid' => $message_id, 'signed_text' => json_encode($data)));
// notify others
proc_run(PRIORITY_HIGH, "include/notifier.php", "comment-import", $message_id);
* Now store the signature more flexible to dynamically support new fields.
* This will break Diaspora compatibility with Friendica versions prior to 3.5.
*/
- q("INSERT INTO `sign` (`iid`,`signed_text`) VALUES (%d,'%s')",
- intval($post_id),
- dbesc(json_encode($message))
- );
+ dba::insert('sign', array('iid' => $post_id, 'signed_text' => json_encode($message)));
logger('Stored diaspora like signature');
return true;
* Now store the signature more flexible to dynamically support new fields.
* This will break Diaspora compatibility with Friendica versions prior to 3.5.
*/
- q("INSERT INTO `sign` (`iid`, `signed_text`) VALUES (%d, '%s')",
- intval($message_id),
- dbesc(json_encode($message))
- );
+ dba::insert('sign', array('iid' => $message_id, 'signed_text' => json_encode($message)));
logger('Stored diaspora comment signature');
return true;
} else { //save in cache
$j = json_decode($txt);
if ($j->type != "error") {
- q("INSERT INTO `oembed` (`url`, `content`, `created`) VALUES ('%s', '%s', '%s')
- ON DUPLICATE KEY UPDATE `content` = '%s', `created` = '%s'",
- dbesc(normalise_link($embedurl)),
- dbesc($txt), dbesc(datetime_convert()),
- dbesc($txt), dbesc(datetime_convert()));
+ dba::insert('oembed', array('url' => normalise_link($embedurl),
+ 'content' => $txt, 'created' => datetime_convert()));
}
Cache::set($a->videowidth.$embedurl, $txt, CACHE_DAY);