1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-06 11:39:14 +00:00

Merge remote-tracking branch 'origin' into hookhead

Conflicts:
	classes/feeds.php

fix for merging up to the origin
This commit is contained in:
justauser
2013-06-27 11:57:49 -04:00
10 changed files with 317 additions and 42 deletions

View File

@@ -363,12 +363,15 @@ class Feeds extends Handler_Protected {
$date_entered_fmt = T_sprintf("Imported at %s",
make_local_datetime($line["date_entered"], false));
if (get_pref('SHOW_CONTENT_PREVIEW') ) {
if(isset($line["modified_preview"]))
$content_preview = strip_tags($line["content_preview"]);
else
$content_preview = truncate_string(strip_tags($line["content_preview"]),
250);
# if (get_pref('SHOW_CONTENT_PREVIEW') ) {
# if(isset($line["modified_preview"]))
# $content_preview = strip_tags($line["content_preview"]);
# else
# $content_preview = truncate_string(strip_tags($line["content_preview"]),
# 250);
if (get_pref('SHOW_CONTENT_PREVIEW')) {
$content_preview = " — " . truncate_string(strip_tags($line["content_preview"]),
250);
}
$score = $line["score"];
@@ -462,7 +465,7 @@ class Feeds extends Handler_Protected {
if (get_pref('SHOW_CONTENT_PREVIEW')) {
if ($content_preview) {
$reply['content'] .= "<span class=\"contentPreview\"> - $content_preview</span>";
$reply['content'] .= "<span class=\"contentPreview\">$content_preview</span>";
}
}
@@ -581,7 +584,11 @@ class Feeds extends Handler_Protected {
$excerpt_hidden = "style=\"display : none\"";
$reply['content'] .= "<span $excerpt_hidden
<<<<<<< HEAD
id=\"CEXC-$id\" class=\"cdmExcerpt\"> -" . $content_preview . "</span>";
=======
id=\"CEXC-$id\" class=\"cdmExcerpt\">$content_preview</span>";
>>>>>>> origin
$reply['content'] .= "</span>";
if (!get_pref('VFEED_GROUP_BY_FEED')) {

View File

@@ -190,6 +190,7 @@ class Opml extends Handler_Protected {
}
$tmp_line["cat_filter"] = sql_bool_to_bool($tmp_line["cat_filter"]);
$tmp_line["inverse"] = sql_bool_to_bool($tmp_line["inverse"]);
unset($tmp_line["feed_id"]);
unset($tmp_line["cat_id"]);
@@ -363,9 +364,10 @@ class Opml extends Handler_Protected {
$cat_filter = bool_to_sql_bool($rule["cat_filter"]);
$reg_exp = $this->dbh->escape_string($rule["reg_exp"]);
$filter_type = (int)$rule["filter_type"];
$inverse = bool_to_sql_bool($rule["inverse"]);
$this->dbh->query("INSERT INTO ttrss_filters2_rules (feed_id,cat_id,filter_id,filter_type,reg_exp,cat_filter)
VALUES ($feed_id, $cat_id, $filter_id, $filter_type, '$reg_exp', $cat_filter)");
$this->dbh->query("INSERT INTO ttrss_filters2_rules (feed_id,cat_id,filter_id,filter_type,reg_exp,cat_filter,inverse)
VALUES ($feed_id, $cat_id, $filter_id, $filter_type, '$reg_exp', $cat_filter,$inverse)");
}
foreach ($filter["actions"] as $action) {

View File

@@ -792,31 +792,10 @@ class Pref_Feeds extends Handler_Protected {
print "<div class=\"dlgSec\">".__("Feed")."</div>";
print "<div class=\"dlgSecCont\">";
/* Title */
print "<input dojoType=\"dijit.form.ValidationTextBox\"
disabled=\"1\" style=\"font-size : 16px; width : 20em;\" required=\"1\"
name=\"title\" value=\"\">";
$this->batch_edit_cbox("title");
/* Feed URL */
print "<br/>";
print __('URL:') . " ";
print "<input dojoType=\"dijit.form.ValidationTextBox\" disabled=\"1\"
required=\"1\" regExp='^(http|https)://.*' style=\"width : 20em\"
name=\"feed_url\" value=\"\">";
$this->batch_edit_cbox("feed_url");
/* Category */
if (get_pref('ENABLE_FEED_CATS')) {
print "<br/>";
print __('Place in category:') . " ";
print_feed_cat_select("cat_id", false,
@@ -862,7 +841,7 @@ class Pref_Feeds extends Handler_Protected {
$this->batch_edit_cbox("auth_login");
print "<br/><input dojoType=\"dijit.form.TextBox\" type=\"password\" name=\"auth_pass\"
print "<hr/> <input dojoType=\"dijit.form.TextBox\" type=\"password\" name=\"auth_pass\"
placeHolder=\"".__("Password")."\" disabled=\"1\"
value=\"\">";

View File

@@ -590,14 +590,15 @@ class Pref_Filters extends Handler_Protected {
$enabled = checkbox_to_sql_bool($_REQUEST["enabled"]);
$match_any_rule = checkbox_to_sql_bool($_REQUEST["match_any_rule"]);
$title = $this->dbh->escape_string($_REQUEST["title"]);
$inverse = checkbox_to_sql_bool($_REQUEST["inverse"]);
$this->dbh->query("BEGIN");
/* create base filter */
$result = $this->dbh->query("INSERT INTO ttrss_filters2
(owner_uid, match_any_rule, enabled, title) VALUES
(".$_SESSION["uid"].",$match_any_rule,$enabled, '$title')");
(owner_uid, match_any_rule, enabled, title, inverse) VALUES
(".$_SESSION["uid"].",$match_any_rule,$enabled, '$title', $inverse)");
$result = $this->dbh->query("SELECT MAX(id) AS id FROM ttrss_filters2
WHERE owner_uid = ".$_SESSION["uid"]);