Merge branch 'master' of github.com:gothfox/Tiny-Tiny-RSS
This commit is contained in:
commit
bd207093ee
|
@ -110,6 +110,8 @@ class Handler_Public extends Handler {
|
||||||
date(DATE_RFC822, strtotime($line["updated"])), true);
|
date(DATE_RFC822, strtotime($line["updated"])), true);
|
||||||
|
|
||||||
$tpl->setVariable('ARTICLE_AUTHOR', htmlspecialchars($line['author']), 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);
|
$tags = get_article_tags($line["id"], $owner_uid);
|
||||||
|
|
||||||
|
|
|
@ -3958,6 +3958,7 @@
|
||||||
$reg_qpart = "REGEXP";
|
$reg_qpart = "REGEXP";
|
||||||
|
|
||||||
foreach ($filter["rules"] AS $rule) {
|
foreach ($filter["rules"] AS $rule) {
|
||||||
|
$rule['reg_exp'] = str_replace('/', '\/', $rule["reg_exp"]);
|
||||||
$regexp_valid = preg_match('/' . $rule['reg_exp'] . '/',
|
$regexp_valid = preg_match('/' . $rule['reg_exp'] . '/',
|
||||||
$rule['reg_exp']) !== FALSE;
|
$rule['reg_exp']) !== FALSE;
|
||||||
|
|
||||||
|
|
|
@ -847,11 +847,16 @@ function hotkey_handler(e) {
|
||||||
|
|
||||||
var keycode = false;
|
var keycode = false;
|
||||||
var shift_key = false;
|
var shift_key = false;
|
||||||
|
var ctrl_key = false;
|
||||||
|
var alt_key = false;
|
||||||
|
var meta_key = false;
|
||||||
|
|
||||||
var cmdline = $('cmdline');
|
var cmdline = $('cmdline');
|
||||||
|
|
||||||
shift_key = e.shiftKey;
|
shift_key = e.shiftKey;
|
||||||
ctrl_key = e.ctrlKey;
|
ctrl_key = e.ctrlKey;
|
||||||
|
alt_key = e.altKey;
|
||||||
|
meta_key = e.metaKey;
|
||||||
|
|
||||||
if (window.event) {
|
if (window.event) {
|
||||||
keycode = window.event.keyCode;
|
keycode = window.event.keyCode;
|
||||||
|
@ -893,6 +898,8 @@ function hotkey_handler(e) {
|
||||||
// ensure ^*char notation
|
// ensure ^*char notation
|
||||||
if (shift_key) hotkey = "*" + hotkey;
|
if (shift_key) hotkey = "*" + hotkey;
|
||||||
if (ctrl_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 = hotkey_prefix ? hotkey_prefix + " " + hotkey : hotkey;
|
||||||
hotkey_prefix = false;
|
hotkey_prefix = false;
|
||||||
|
|
|
@ -114,6 +114,7 @@ class GoogleReaderImport extends Plugin {
|
||||||
$guid = db_escape_string(mb_substr($item['id'], 0, 250));
|
$guid = db_escape_string(mb_substr($item['id'], 0, 250));
|
||||||
$title = db_escape_string($item['title']);
|
$title = db_escape_string($item['title']);
|
||||||
$updated = date('Y-m-d h:i:s', $item['updated']);
|
$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 = '';
|
$link = '';
|
||||||
$content = '';
|
$content = '';
|
||||||
$author = db_escape_string($item['author']);
|
$author = db_escape_string($item['author']);
|
||||||
|
@ -165,7 +166,7 @@ class GoogleReaderImport extends Plugin {
|
||||||
|
|
||||||
$imported += (int) $this->create_article($owner_uid, $guid, $title,
|
$imported += (int) $this->create_article($owner_uid, $guid, $title,
|
||||||
$link, $updated, $content, $author, $sql_set_marked, $tags,
|
$link, $updated, $content, $author, $sql_set_marked, $tags,
|
||||||
$orig_feed_data);
|
$orig_feed_data, $last_marked);
|
||||||
|
|
||||||
if ($file && $processed % 25 == 0) {
|
if ($file && $processed % 25 == 0) {
|
||||||
_debug("processed $processed articles...");
|
_debug("processed $processed articles...");
|
||||||
|
@ -196,7 +197,7 @@ class GoogleReaderImport extends Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
// expects ESCAPED data
|
// 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);
|
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,
|
(ref_id, uuid, feed_id, orig_feed_id, owner_uid, marked, tag_cache, label_cache,
|
||||||
last_read, note, unread, last_marked)
|
last_read, note, unread, last_marked)
|
||||||
VALUES
|
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
|
$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");
|
WHERE owner_uid = $owner_uid AND ref_id = id AND ref_id = $ref_id");
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
<content type="html"><![CDATA[${ARTICLE_CONTENT}]]></content>
|
<content type="html"><![CDATA[${ARTICLE_CONTENT}]]></content>
|
||||||
<updated>${ARTICLE_UPDATED_ATOM}</updated>
|
<updated>${ARTICLE_UPDATED_ATOM}</updated>
|
||||||
<author><name>${ARTICLE_AUTHOR}</name></author>
|
<author><name>${ARTICLE_AUTHOR}</name></author>
|
||||||
|
<source><title>${ARTICLE_SOURCE_TITLE}</title></source>
|
||||||
<!-- $BeginBlock category -->
|
<!-- $BeginBlock category -->
|
||||||
<category term="${ARTICLE_CATEGORY}"/>
|
<category term="${ARTICLE_CATEGORY}"/>
|
||||||
<!-- $EndBlock category -->
|
<!-- $EndBlock category -->
|
||||||
|
|
Loading…
Reference in New Issue