aboutsummaryrefslogtreecommitdiff
path: root/plugins/googlereaderimport
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2013-04-04 13:21:11 +0400
committerAndrew Dolgov <fox@fakecake.org>2013-04-04 13:21:11 +0400
commite6cdbaec9fcc6a5245edbc3af358e64839646ff6 (patch)
treede68b42ab244e8098f8093331a1d5ccef638110c /plugins/googlereaderimport
parent5929a0c1e4a544718cd942afe27f9c832f87a2c0 (diff)
parent810205625b8afb7e08b2829723426f021e0a5c1b (diff)
Merge branch 'master' of github.com:gothfox/Tiny-Tiny-RSS
Diffstat (limited to 'plugins/googlereaderimport')
-rw-r--r--plugins/googlereaderimport/init.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/googlereaderimport/init.php b/plugins/googlereaderimport/init.php
index da5e9adb1..8f14bdaa7 100644
--- a/plugins/googlereaderimport/init.php
+++ b/plugins/googlereaderimport/init.php
@@ -125,14 +125,14 @@ class GoogleReaderImport extends Plugin {
if (strpos($item['origin']['streamId'], 'feed/') === 0) {
$orig_feed_data['feed_url'] = db_escape_string($this->link,
- preg_replace("/^feed\//",
- "", $item['origin']['streamId']));
+ mb_substr(preg_replace("/^feed\//",
+ "", $item['origin']['streamId']), 0, 200));
$orig_feed_data['title'] = db_escape_string($this->link,
- $item['origin']['title']);
+ mb_substr($item['origin']['title'], 0, 200));
$orig_feed_data['site_url'] = db_escape_string($this->link,
- $item['origin']['htmlUrl']);
+ mb_substr($item['origin']['htmlUrl'], 0, 200));
}
}
@@ -225,7 +225,7 @@ class GoogleReaderImport extends Plugin {
}
}
- if ($feed_id) {
+ if ($feed_id && $feed_id != 'NULL') {
// locate archived entry to file entries in, we don't want to file them in actual feeds because of purging
// maybe file marked in real feeds because eh
@@ -254,6 +254,8 @@ class GoogleReaderImport extends Plugin {
db_query($this->link, "DELETE FROM ttrss_feeds WHERE id = $feed_id");
}
+ if (!$orig_feed_id) $orig_feed_id = 'NULL';
+
$result = db_query($this->link, "SELECT id FROM ttrss_entries, ttrss_user_entries WHERE
guid = '$guid' AND ref_id = id AND owner_uid = '$owner_uid' LIMIT 1");