array_push($batch_owners, $tline["owner_uid"]);
$fstarted = microtime(true);
- RSSUtils::update_rss_feed($tline["id"], true, false);
+
+ try {
+ RSSUtils::update_rss_feed($tline["id"], true, false);
+ } catch (PDOException $e) {
+ Logger::get()->log_error(E_USER_NOTICE, $e->getMessage(), $e->getFile(), $e->getLine(), $e->getTraceAsString());
+ }
_debug_suppress(false);
_debug(sprintf(" %.4f (sec)", microtime(true) - $fstarted));
}
$esth = $pdo->prepare("SELECT id FROM ttrss_enclosures
- WHERE content_url = ? AND post_id = ?");
+ WHERE content_url = ? AND content_type = ? AND post_id = ?");
$usth = $pdo->prepare("INSERT INTO ttrss_enclosures
(content_url, content_type, title, duration, post_id, width, height) VALUES
$enc_width = intval($enc[4]);
$enc_height = intval($enc[5]);
- $esth->execute([$enc_url, $entry_ref_id]);
+ $esth->execute([$enc_url, $enc_type, $entry_ref_id]);
if (!$esth->fetch()) {
$usth->execute([$enc_url, $enc_type, (string)$enc_title, $enc_dur, $entry_ref_id, $enc_width, $enc_height]);
if ($file_content && strlen($file_content) > MIN_CACHE_FILE_SIZE) {
file_put_contents($local_filename, $file_content);
}
- } else {
+ } else if (is_writable($local_filename)) {
touch($local_filename);
}
}
if ($file_content && strlen($file_content) > MIN_CACHE_FILE_SIZE) {
file_put_contents($local_filename, $file_content);
}
- } else {
+ } else if (is_writable($local_filename)) {
touch($local_filename);
}
}