allow generated feeds to use view_mode
This commit is contained in:
parent
db2443846c
commit
23d72f3999
|
@ -485,6 +485,7 @@
|
||||||
$search = db_escape_string($_REQUEST["q"]);
|
$search = db_escape_string($_REQUEST["q"]);
|
||||||
$match_on = db_escape_string($_REQUEST["m"]);
|
$match_on = db_escape_string($_REQUEST["m"]);
|
||||||
$search_mode = db_escape_string($_REQUEST["smode"]);
|
$search_mode = db_escape_string($_REQUEST["smode"]);
|
||||||
|
$view_mode = db_escape_string($_REQUEST["view_mode"]);
|
||||||
|
|
||||||
if (SINGLE_USER_MODE) {
|
if (SINGLE_USER_MODE) {
|
||||||
authenticate_user($link, "admin", null);
|
authenticate_user($link, "admin", null);
|
||||||
|
@ -494,11 +495,9 @@
|
||||||
authenticate_user($link, $user, $pass);
|
authenticate_user($link, $user, $pass);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_SESSION["uid"] ||
|
if ($_SESSION["uid"] || http_authenticate_user($link)) {
|
||||||
http_authenticate_user($link)) {
|
generate_syndicated_feed($link, 0, $feed, $is_cat, $limit,
|
||||||
|
$search, $search_mode, $match_on, $view_mode);
|
||||||
generate_syndicated_feed($link, 0, $feed, $is_cat, $limit,
|
|
||||||
$search, $search_mode, $match_on);
|
|
||||||
}
|
}
|
||||||
break; // rss
|
break; // rss
|
||||||
|
|
||||||
|
|
|
@ -3376,7 +3376,11 @@
|
||||||
if ($view_mode == "marked") {
|
if ($view_mode == "marked") {
|
||||||
$view_query_part = " marked = true AND ";
|
$view_query_part = " marked = true AND ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($view_mode == "published") {
|
||||||
|
$view_query_part = " published = true AND ";
|
||||||
|
}
|
||||||
|
|
||||||
if ($view_mode == "unread") {
|
if ($view_mode == "unread") {
|
||||||
$view_query_part = " unread = true AND ";
|
$view_query_part = " unread = true AND ";
|
||||||
}
|
}
|
||||||
|
@ -3639,7 +3643,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function generate_syndicated_feed($link, $owner_uid, $feed, $is_cat,
|
function generate_syndicated_feed($link, $owner_uid, $feed, $is_cat,
|
||||||
$limit, $search, $search_mode, $match_on) {
|
$limit, $search, $search_mode, $match_on, $view_mode = false) {
|
||||||
|
|
||||||
$note_style = "float : right; background-color : #fff7d5; border-width : 1px; ".
|
$note_style = "float : right; background-color : #fff7d5; border-width : 1px; ".
|
||||||
"padding : 5px; border-style : dashed; border-color : #e7d796;".
|
"padding : 5px; border-style : dashed; border-color : #e7d796;".
|
||||||
|
@ -3648,8 +3652,8 @@
|
||||||
if (!$limit) $limit = 30;
|
if (!$limit) $limit = 30;
|
||||||
|
|
||||||
$qfh_ret = queryFeedHeadlines($link, $feed,
|
$qfh_ret = queryFeedHeadlines($link, $feed,
|
||||||
$limit, false, $is_cat, $search, $search_mode, $match_on, "date_entered DESC", 0,
|
$limit, $view_mode, $is_cat, $search, $search_mode,
|
||||||
$owner_uid);
|
$match_on, "date_entered DESC", 0, $owner_uid);
|
||||||
|
|
||||||
$result = $qfh_ret[0];
|
$result = $qfh_ret[0];
|
||||||
$feed_title = htmlspecialchars($qfh_ret[1]);
|
$feed_title = htmlspecialchars($qfh_ret[1]);
|
||||||
|
@ -4141,7 +4145,7 @@
|
||||||
|
|
||||||
function print_headline_subtoolbar($link, $feed_site_url, $feed_title,
|
function print_headline_subtoolbar($link, $feed_site_url, $feed_title,
|
||||||
$feed_id, $is_cat, $search, $match_on,
|
$feed_id, $is_cat, $search, $match_on,
|
||||||
$search_mode) {
|
$search_mode, $view_mode) {
|
||||||
|
|
||||||
print "<div class=\"headlinesSubToolbar\">";
|
print "<div class=\"headlinesSubToolbar\">";
|
||||||
|
|
||||||
|
@ -4218,11 +4222,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
print "
|
print "
|
||||||
<a target=\"_blank\"
|
<a target=\"_blank\"
|
||||||
href=\"backend.php?op=rss&id=$feed_id&is_cat=$is_cat$search_q\">
|
title=\"".__("RSS feed for this buffer")."\"
|
||||||
<img class=\"noborder\"
|
href=\"backend.php?op=rss&id=$feed_id&is_cat=$is_cat&view-mode=$view_mode$search_q\">
|
||||||
alt=\"".__('Generated feed')."\" src=\"images/feed-icon-12x12.png\">
|
<img class=\"noborder\" src=\"images/feed-icon-12x12.png\"></a>";
|
||||||
</a>";
|
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
|
@ -5116,7 +5119,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
print_headline_subtoolbar($link, $feed_site_url, $feed_title,
|
print_headline_subtoolbar($link, $feed_site_url, $feed_title,
|
||||||
$feed, $cat_view, $search, $match_on, $search_mode);
|
$feed, $cat_view, $search, $match_on, $search_mode, $view_mode);
|
||||||
|
|
||||||
print "<div id=\"headlinesInnerContainer\" onscroll=\"headlines_scroll_handler()\">";
|
print "<div id=\"headlinesInnerContainer\" onscroll=\"headlines_scroll_handler()\">";
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,6 +216,7 @@
|
||||||
<option selected="selected" value="adaptive"><?php echo __('Adaptive') ?></option>
|
<option selected="selected" value="adaptive"><?php echo __('Adaptive') ?></option>
|
||||||
<option value="all_articles"><?php echo __('All Articles') ?></option>
|
<option value="all_articles"><?php echo __('All Articles') ?></option>
|
||||||
<option value="marked"><?php echo __('Starred') ?></option>
|
<option value="marked"><?php echo __('Starred') ?></option>
|
||||||
|
<option value="published"><?php echo __('Published') ?></option>
|
||||||
<option value="unread"><?php echo __('Unread') ?></option>
|
<option value="unread"><?php echo __('Unread') ?></option>
|
||||||
<!-- <option value="noscores"><?php echo __('Ignore Scoring') ?></option> -->
|
<!-- <option value="noscores"><?php echo __('Ignore Scoring') ?></option> -->
|
||||||
<option value="updated"><?php echo __('Updated') ?></option>
|
<option value="updated"><?php echo __('Updated') ?></option>
|
||||||
|
|
Loading…
Reference in New Issue