summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/handler/public.php2
-rw-r--r--include/functions.php1
-rw-r--r--js/tt-rss.js7
-rw-r--r--plugins/googlereaderimport/init.php7
-rw-r--r--templates/generated_feed.txt1
5 files changed, 15 insertions, 3 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php
index f05beafd2..205853eae 100644
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -110,6 +110,8 @@ class Handler_Public extends Handler {
date(DATE_RFC822, strtotime($line["updated"])), true);
$tpl->setVariable('ARTICLE_AUTHOR', htmlspecialchars($line['author']), true);
+
+ $tpl->setVariable('ARTICLE_SOURCE_TITLE', htmlspecialchars($line['feed_title']), true);
$tags = get_article_tags($line["id"], $owner_uid);
diff --git a/include/functions.php b/include/functions.php
index 355eec2cd..0eceed623 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -3958,6 +3958,7 @@
$reg_qpart = "REGEXP";
foreach ($filter["rules"] AS $rule) {
+ $rule['reg_exp'] = str_replace('/', '\/', $rule["reg_exp"]);
$regexp_valid = preg_match('/' . $rule['reg_exp'] . '/',
$rule['reg_exp']) !== FALSE;
diff --git a/js/tt-rss.js b/js/tt-rss.js
index a1d7d6411..46e282351 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -847,11 +847,16 @@ function hotkey_handler(e) {
var keycode = false;
var shift_key = false;
+ var ctrl_key = false;
+ var alt_key = false;
+ var meta_key = false;
var cmdline = $('cmdline');
shift_key = e.shiftKey;
ctrl_key = e.ctrlKey;
+ alt_key = e.altKey;
+ meta_key = e.metaKey;
if (window.event) {
keycode = window.event.keyCode;
@@ -893,6 +898,8 @@ function hotkey_handler(e) {
// ensure ^*char notation
if (shift_key) hotkey = "*" + hotkey;
if (ctrl_key) hotkey = "^" + hotkey;
+ if (alt_key) hotkey = "+" + hotkey;
+ if (meta_key) hotkey = "%" + hotkey;
hotkey = hotkey_prefix ? hotkey_prefix + " " + hotkey : hotkey;
hotkey_prefix = false;
diff --git a/plugins/googlereaderimport/init.php b/plugins/googlereaderimport/init.php
index 2e22161b9..dcb335a0d 100644
--- a/plugins/googlereaderimport/init.php
+++ b/plugins/googlereaderimport/init.php
@@ -114,6 +114,7 @@ class GoogleReaderImport extends Plugin {
$guid = db_escape_string(mb_substr($item['id'], 0, 250));
$title = db_escape_string($item['title']);
$updated = date('Y-m-d h:i:s', $item['updated']);
+ $last_marked = date('Y-m-d h:i:s', mb_substr($item['crawlTimeMsec'], 0, 10));
$link = '';
$content = '';
$author = db_escape_string($item['author']);
@@ -165,7 +166,7 @@ class GoogleReaderImport extends Plugin {
$imported += (int) $this->create_article($owner_uid, $guid, $title,
$link, $updated, $content, $author, $sql_set_marked, $tags,
- $orig_feed_data);
+ $orig_feed_data, $last_marked);
if ($file && $processed % 25 == 0) {
_debug("processed $processed articles...");
@@ -196,7 +197,7 @@ class GoogleReaderImport extends Plugin {
}
// expects ESCAPED data
- private function create_article($owner_uid, $guid, $title, $link, $updated, $content, $author, $marked, $tags, $orig_feed_data) {
+ private function create_article($owner_uid, $guid, $title, $link, $updated, $content, $author, $marked, $tags, $orig_feed_data, $last_marked) {
if (!$guid) $guid = sha1($link);
@@ -299,7 +300,7 @@ class GoogleReaderImport extends Plugin {
(ref_id, uuid, feed_id, orig_feed_id, owner_uid, marked, tag_cache, label_cache,
last_read, note, unread, last_marked)
VALUES
- ('$ref_id', '', NULL, $orig_feed_id, $owner_uid, $marked, '', '', NOW(), '', false, NOW())");
+ ('$ref_id', '', NULL, $orig_feed_id, $owner_uid, $marked, '', '', '$last_marked', '', false, '$last_marked')");
$result = db_query("SELECT int_id FROM ttrss_user_entries, ttrss_entries
WHERE owner_uid = $owner_uid AND ref_id = id AND ref_id = $ref_id");
diff --git a/templates/generated_feed.txt b/templates/generated_feed.txt
index 6bfa50b1b..6a673e866 100644
--- a/templates/generated_feed.txt
+++ b/templates/generated_feed.txt
@@ -20,6 +20,7 @@
<content type="html"><![CDATA[${ARTICLE_CONTENT}]]></content>
<updated>${ARTICLE_UPDATED_ATOM}</updated>
<author><name>${ARTICLE_AUTHOR}</name></author>
+ <source><title>${ARTICLE_SOURCE_TITLE}</title></source>
<!-- $BeginBlock category -->
<category term="${ARTICLE_CATEGORY}"/>
<!-- $EndBlock category -->