diff --git a/backend.php b/backend.php index 3fa369397..72535113b 100644 --- a/backend.php +++ b/backend.php @@ -211,10 +211,12 @@ } else if ($mode == "zoom") { array_push($articles, format_article($link, $id, false, true, true)); } else if ($mode == "raw") { - if ($_REQUEST['html']) header("Content-Type: text/html"); + if ($_REQUEST['html']) { + header("Content-Type: text/html"); + print ''; + } $article = format_article($link, $id, false); - print $article['id'] . "\n\n"; print $article['content']; return; } else { diff --git a/rss.xsl b/feed.xsl similarity index 50% rename from rss.xsl rename to feed.xsl index 8d2e9423b..13a1d7ec0 100644 --- a/rss.xsl +++ b/feed.xsl @@ -1,12 +1,14 @@ - + - + - <xsl:value-of select="rss/channel/title"/> + <xsl:value-of select="atom:title"/> @@ -21,24 +23,18 @@ feed icon -

+

-

This is an RSS feed exported from +

This feed has been exported from Tiny Tiny RSS. - You must install a news aggregator to subscribe to it. - This feed contains the following items:

+ You need a news reader software to subscribe to it. + It contains the following items:

- - - -

- - + +

- +
diff --git a/functions.php b/functions.php index a3e3e8f97..e1c60e15f 100644 --- a/functions.php +++ b/functions.php @@ -2360,15 +2360,18 @@ return "even"; } + // Session caching removed due to causing wrong redirects to upgrade + // script when get_schema_version() is called on an obsolete session + // created on a previous schema version. function get_schema_version($link, $nocache = false) { - if (!$_SESSION["schema_version"] || $nocache) { +// if (!$_SESSION["schema_version"] || $nocache) { $result = db_query($link, "SELECT schema_version FROM ttrss_version"); $version = db_fetch_result($result, 0, "schema_version"); $_SESSION["schema_version"] = $version; return $version; - } else { - return $_SESSION["schema_version"]; - } +// } else { +// return $_SESSION["schema_version"]; +// } } function sanity_check($link) { @@ -3677,7 +3680,8 @@ require_once "lib/MiniTemplator.class.php"; - $note_style = "float : right; background-color : #fff7d5; border-width : 1px; ". + $note_style = "background-color : #fff7d5; + border-width : 1px; ". "padding : 5px; border-style : dashed; border-color : #e7d796;". "margin-bottom : 1em; color : #9a8c59;"; @@ -3729,7 +3733,7 @@ $content = sanitize_rss($link, $line["content_preview"], false, $owner_uid); if ($line['note']) { - $content = "
" . $line['note'] . "
" . + $content = "
Article note: " . $line['note'] . "
" . $content; } @@ -4847,17 +4851,17 @@ $rv['content'] .= ""; - $rv['content'] .= ""; - $rv['content'] .= "
"; if ($line['note']) { $rv['content'] .= format_article_note($id, $line['note']); } $rv['content'] .= "
"; + $rv['content'] .= ""; + $rv['content'] .= "
"; $article_content = sanitize_rss($link, $line["content"], false, false, @@ -6367,8 +6371,9 @@ function format_article_note($id, $note) { - $str = "
$note
"; + $str = "
+
". + __('(edit note)')."
$note
"; return $str; } diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 0630d8821..1adfb23b1 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -818,14 +818,15 @@ if ($subop == "setNote") { $id = db_escape_string($_REQUEST["id"]); - $note = strip_tags(db_escape_string($_REQUEST["note"])); + $note = trim(strip_tags(db_escape_string($_REQUEST["note"]))); db_query($link, "UPDATE ttrss_user_entries SET note = '$note' WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]); $formatted_note = format_article_note($id, $note); - print json_encode(array("note" => $formatted_note)); + print json_encode(array("note" => $formatted_note, + "raw_length" => mb_strlen($note))); return; } diff --git a/templates/generated_feed.txt b/templates/generated_feed.txt index 9631d4cf8..38c15cf01 100644 --- a/templates/generated_feed.txt +++ b/templates/generated_feed.txt @@ -1,4 +1,5 @@ + ${FEED_TITLE} diff --git a/tt-rss.css b/tt-rss.css index c16159234..4c4de2de2 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -76,17 +76,17 @@ div.postReply img.tagsPic { div.articleNote { background-color : #fff7d5; - border-width : 1px; padding : 5px; - border-style : dashed; + border-style : none none dashed none; border-color : #e7d796; - font-size : 11px; - margin-left : 5px; - margin-top : 5px; - float : right; + border-width : 1px; + background-color : #fff7d5; color : #9a8c59; - max-width : 150px; - text-align : justify; +} + +div.articleNote div.noteEdit { + float : right; + cursor : pointer; } div.postReply span.author { @@ -1172,10 +1172,6 @@ div.dlgButtons { clear : both; } -span.prefsLabelEntry { - padding : 2px; -} - span.labelColorIndicator { height : 14px; width : 14px; @@ -1216,37 +1212,6 @@ div.labelColorIndicator { margin-right : 10px; } -div.colorPicker div.colorPickerEntry:hover { - border : 1px solid #88b0f0; -} - -div.colorPicker div.ccPrompt:hover { - color : black; -} - -div.colorPicker div.colorPickerEntry { - height : 15px; - width : 15px; - line-height : 13px; - font-height : 9px; - text-align : center; - border : 1px solid black; - margin : 5px 5px 0px 0px; - float : left; -} - -div.colorPicker { - border : 1px solid #cccccc; - background : #f0f0f0; - width : 110px; - padding : 0px 0px 5px 5px; - position : absolute; - left : auto; - top : auto; - z-index : 3; - color : #909090; -} - optgroup { color : #4684ff; font-style : normal; @@ -1499,12 +1464,6 @@ div#pref-tabs .dijitContentPane h3 { font-weight : bold; } -/* div#feedTree { - font-size : 11px; - font-family : "Lucida Grande", "Segoe UI", Tahoma, Arial, sans-serif; -} */ - - #pref-filter-wrap, #pref-filter-header, #pref-filter-content, #pref-label-wrap, #pref-label-header, #pref-label-content, #pref-user-wrap, #pref-user-header, #pref-user-content { diff --git a/viewfeed.js b/viewfeed.js index 79697d77b..a5ca881c6 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -2211,7 +2211,9 @@ function editArticleNote(id) { if (elem) { Element.hide(elem); elem.innerHTML = reply.note; - new Effect.Appear(elem); + + if (reply.raw_length != 0) + new Effect.Appear(elem); } }});