blog MDL-20617 adding checking for deleted blog posts

This commit is contained in:
andyjdavis
2010-12-20 11:16:11 +08:00
parent afce96f07b
commit cc52e53dd1
+7
View File
@@ -163,6 +163,8 @@ function blog_sync_external_entries($externalblog) {
if (empty($rss->data)) {
return null;
}
$oldesttimestamp = null;
foreach ($rss->get_items() as $entry) {
// If filtertags are defined, use them to filter the entries by RSS category
@@ -220,6 +222,11 @@ function blog_sync_external_entries($externalblog) {
$newentry->created = $timestamp;
}
$newentry->lastmodified = $timestamp;
if (empty($oldesttimestamp) || $timestamp<$oldesttimestamp) {
//found an older post
$oldesttimestamp = $timestamp;
}
$textlib = textlib_get_instance();
if ($textlib->strlen($newentry->uniquehash) > 255) {