Now there are fewer than 300 updates left ...

This commit is contained in:
Michael 2017-08-10 05:07:23 +00:00
parent bd8efb7f92
commit eb7cbb9ada
2 changed files with 13 additions and 31 deletions

View file

@ -928,11 +928,9 @@ class Diaspora {
* Normally this should have handled by getting a request - but this could get lost * Normally this should have handled by getting a request - but this could get lost
*/ */
if ($contact["rel"] == CONTACT_IS_FOLLOWER && in_array($importer["page-flags"], array(PAGE_FREELOVE))) { if ($contact["rel"] == CONTACT_IS_FOLLOWER && in_array($importer["page-flags"], array(PAGE_FREELOVE))) {
q("UPDATE `contact` SET `rel` = %d, `writable` = 1 WHERE `id` = %d AND `uid` = %d", dba::update('contact', array('rel' => CONTACT_IS_FRIEND, 'writable' => true),
intval(CONTACT_IS_FRIEND), array('id' => $contact["id"], 'uid' => $contact["uid"]));
intval($contact["id"]),
intval($importer["uid"])
);
$contact["rel"] = CONTACT_IS_FRIEND; $contact["rel"] = CONTACT_IS_FRIEND;
logger("defining user ".$contact["nick"]." as friend"); logger("defining user ".$contact["nick"]." as friend");
} }
@ -1557,10 +1555,7 @@ class Diaspora {
dba::unlock(); dba::unlock();
q("UPDATE `conv` SET `updated` = '%s' WHERE `id` = %d", dba::update('conv', array('updated' => datetime_convert()), array('id' => $conversation["id"]));
dbesc(datetime_convert()),
intval($conversation["id"])
);
notification(array( notification(array(
"type" => NOTIFY_MAIL, "type" => NOTIFY_MAIL,
@ -1865,11 +1860,7 @@ class Diaspora {
dba::unlock(); dba::unlock();
q("UPDATE `conv` SET `updated` = '%s' WHERE `id` = %d", dba::update('conv', array('updated' => datetime_convert()), array('id' => $conversation["id"]));
dbesc(datetime_convert()),
intval($conversation["id"])
);
return true; return true;
} }
@ -2013,11 +2004,8 @@ class Diaspora {
$a = get_app(); $a = get_app();
if ($contact["rel"] == CONTACT_IS_FOLLOWER && in_array($importer["page-flags"], array(PAGE_FREELOVE))) { if ($contact["rel"] == CONTACT_IS_FOLLOWER && in_array($importer["page-flags"], array(PAGE_FREELOVE))) {
q("UPDATE `contact` SET `rel` = %d, `writable` = 1 WHERE `id` = %d AND `uid` = %d", dba::update('contact', array('rel' => CONTACT_IS_FRIEND, 'writable' => true),
intval(CONTACT_IS_FRIEND), array('id' => $contact["id"], 'uid' => $importer["uid"]));
intval($contact["id"]),
intval($importer["uid"])
);
} }
// send notification // send notification
@ -2468,11 +2456,10 @@ class Diaspora {
} }
// Currently we don't have a central deletion function that we could use in this case. The function "item_drop" doesn't work for that case // Currently we don't have a central deletion function that we could use in this case. The function "item_drop" doesn't work for that case
q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', `body` = '' , `title` = '' WHERE `id` = %d", dba::update('item', array('deleted' => true, 'title' => '', 'body' => '',
dbesc(datetime_convert()), 'edited' => datetime_convert(), 'changed' => datetime_convert()),
dbesc(datetime_convert()), array('id' => $r[0]["id"]));
intval($r[0]["id"])
);
delete_thread($r[0]["id"], $r[0]["parent-uri"]); delete_thread($r[0]["id"], $r[0]["parent-uri"]);
logger("Deleted target ".$target_guid." (".$r[0]["id"].") from user ".$importer["uid"]." parent: ".$p[0]["id"], LOGGER_DEBUG); logger("Deleted target ".$target_guid." (".$r[0]["id"].") from user ".$importer["uid"]." parent: ".$p[0]["id"], LOGGER_DEBUG);

View file

@ -56,9 +56,7 @@ function install_plugin($plugin) {
// This way the system won't fall over dead during the update. // This way the system won't fall over dead during the update.
if (file_exists('addon/' . $plugin . '/.hidden')) { if (file_exists('addon/' . $plugin . '/.hidden')) {
q("UPDATE `addon` SET `hidden` = 1 WHERE `name` = '%s'", dba::update('addon', array('hidden' => true), array('name' => $plugin));
dbesc($plugin)
);
} }
return true; return true;
} }
@ -106,10 +104,7 @@ function reload_plugins() {
$func = $pl . '_install'; $func = $pl . '_install';
$func(); $func();
} }
q("UPDATE `addon` SET `timestamp` = %d WHERE `id` = %d", dba::update('addon', array('timestamp' => $t), array('id' => $i['id']));
intval($t),
intval($i['id'])
);
} }
} }
} }