Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix for more accurate timestamp - WARNING: WILL CAUSE DUPLICATES of s…

…ome posts for the first import after updating

git-svn-id: http://sweetcron.googlecode.com/svn/trunk@118 51b50d7d-0b4b-0410-974b-f188aa86c7d9
  • Loading branch information...
commit 893d90e2637d1a03ca0f4d4d2559a185d796ab00 1 parent 0859569
yongfook authored
2  system/application/libraries/sweetcron.php
@@ -80,7 +80,7 @@ function add_new_items($items, $feed)
80 80
81 81 //build out clean item
82 82 $new->item_status = 'publish';
83   - $new->item_date = strtotime($item->get_date());
  83 + $new->item_date = strtotime($item->get_date('D M j G:i:s Y'));
84 84 $new->item_title = $this->CI->input->xss_clean(trim(strip_tags($item->get_title())));
85 85 $new->item_permalink = $item->get_permalink();
86 86 $new->item_content = $this->CI->input->xss_clean(trim(strip_tags($item->get_content())));
8 system/application/models/item_model.php
@@ -64,7 +64,7 @@ function _process($items, $return_single = FALSE)
64 64 $new_item->item_content = auto_link($items[$key]->item_content);
65 65
66 66 $new_item->item_content = markdown($new_item->item_content);
67   - $new_item->item_title = $this->_autolink($items[$key]->item_title);
  67 + $new_item->item_title = auto_link($items[$key]->item_title);
68 68 $new_item->item_original_permalink = $items[$key]->item_permalink;
69 69 $new_item->item_permalink = $this->config->item('base_url').'items/view/'.$new_item->ID;
70 70 $new_item->item_status = $items[$key]->item_status;
@@ -111,12 +111,6 @@ function _process($items, $return_single = FALSE)
111 111 }
112 112 }
113 113
114   - function _autolink($text)
115   - {
116   - //now deprecated in favour of url_helper's auto_link function
117   - return preg_replace('/(?<!\S)((http(s?):\/\/)|(www\.))+([\w.\/&=?\-~%;]+)\b/i', '<a href="http$3://$4$5" rel="external">http$3://$4$5</a>', $text);
118   - }
119   -
120 114 function get_public_item_by_id($item_id)
121 115 {
122 116 $item = $this->db->join('feeds', 'feeds.feed_id = items.item_feed_id', 'left outer')->get_where('items', array('ID' => $item_id, 'item_status' => 'publish'))->result();

0 comments on commit 893d90e

Please sign in to comment.
Something went wrong with that request. Please try again.