And some more inserts
This commit is contained in:
parent
6180d62ebc
commit
c6b04aa922
2 changed files with 6 additions and 21 deletions
|
@ -1475,10 +1475,7 @@ class Diaspora {
|
|||
|
||||
// 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);
|
||||
|
@ -1783,10 +1780,7 @@ class Diaspora {
|
|||
|
||||
// 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);
|
||||
|
@ -3728,10 +3722,7 @@ class Diaspora {
|
|||
* 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;
|
||||
|
@ -3763,10 +3754,7 @@ class Diaspora {
|
|||
* 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;
|
||||
|
|
|
@ -82,11 +82,8 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){
|
|||
} 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);
|
||||
|
|
Loading…
Reference in a new issue