- $app = \Friendica\BaseObject::getApp();
- $configCache = $app->getConfigCache();
- $configCacheSaver = new ConfigCacheSaver($app->getBasePath());
- $updateConfigEntry = function($cat, $key) use ($configCache, $configCacheSaver) {
- // check if the config file differs from the whole configuration (= The db contains other values)
- $fileConfig = $configCache->get($cat, $key);
- if ($fileConfig === '!<unset>!') {
- $fileConfig = null;
+ $queue = DBA::select('queue', ['id', 'cid', 'guid']);
+ while ($entry = DBA::fetch($queue)) {
+ $contact = DBA::selectFirst('contact', ['uid'], ['id' => $entry['cid']]);
+ if (!DBA::isResult($contact)) {
+ continue;
+ }
+
+ $item = Item::selectFirst(['id', 'gravity'], ['uid' => $contact['uid'], 'guid' => $entry['guid']]);
+ if (!DBA::isResult($item)) {
+ continue;