Browse files

MDL-25341 blogs import - unused vars and mktime() fix

  • Loading branch information...
1 parent b7c1da9 commit e5137f247e3c6c990dc701220e6c439b851743a1 @stronk7 stronk7 committed Dec 27, 2010
Showing with 2 additions and 3 deletions.
  1. +2 −3 blog/lib.php
View
5 blog/lib.php
@@ -203,15 +203,14 @@ function blog_sync_external_entries($externalblog) {
//used to decide whether to insert or update
//uses enty permalink plus creation date if available
$existingpostconditions = array('uniquehash' => $entry->get_permalink());
- $postid = null;//ID of the post if a matching permalink and creation timestamp are found in the DB
//our DB doesnt allow null creation or modified timestamps so check the external blog supplied one
$entrydate = $entry->get_date('U');
if (!empty($entrydate)) {
$existingpostconditions['created'] = $entrydate;
}
- //the post ID or false if post not found
+ //the post ID or false if post not found in DB
$postid = $DB->get_field('post', 'id', $existingpostconditions);
$timestamp = null;
@@ -266,7 +265,7 @@ function blog_sync_external_entries($externalblog) {
}
$DB->delete_records_list('post', 'id', $todelete);
- $DB->update_record('blog_external', array('id' => $externalblog->id, 'timefetched' => mktime()));
+ $DB->update_record('blog_external', array('id' => $externalblog->id, 'timefetched' => time()));
}
/**

0 comments on commit e5137f2

Please sign in to comment.