+
+ /**
+ * Unarchive inboxes
+ *
+ * @param string $url inbox url
+ */
+ private static function unarchiveInbox($url)
+ {
+ if (empty($url)) {
+ return;
+ }
+
+ $now = DateTimeFormat::utcNow();
+
+ if (!DBA::exists('inbox-status', ['url' => $url])) {
+ $fields = ['archive' => false, 'success' => $now,
+ 'url' => $url, 'created' => $now];
+ DBA::insert('inbox-status', $fields);
+ } else {
+ $fields = ['archive' => false, 'success' => $now];
+ DBA::update('inbox-status', $fields, ['url' => $url]);
+ }
+ }