}
$fsth = $this->pdo->prepare("SELECT id, title, last_error,
- ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated
+ ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated, update_interval
FROM ttrss_feeds
WHERE cat_id = :cat AND
owner_uid = :uid AND
$feed['icon'] = Feeds::getFeedIcon($feed_line['id']);
$feed['param'] = make_local_datetime(
$feed_line['last_updated'], true);
+ $feed['updates_disabled'] = (int)($feed_line['update_interval'] < 0);
array_push($items, $feed);
}
$cat['child_unread'] = 0;
$fsth = $this->pdo->prepare("SELECT id, title,last_error,
- ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated
+ ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated, update_interval
FROM ttrss_feeds
WHERE cat_id IS NULL AND
owner_uid = :uid AND
$feed_line['last_updated'], true);
$feed['unread'] = 0;
$feed['type'] = 'feed';
+ $feed['updates_disabled'] = (int)($feed_line['update_interval'] < 0);
array_push($cat['items'], $feed);
}
} else {
$fsth = $this->pdo->prepare("SELECT id, title, last_error,
- ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated
+ ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated, update_interval
FROM ttrss_feeds
WHERE owner_uid = :uid AND
(:search = '' OR (LOWER(title) LIKE :search OR LOWER(feed_url) LIKE :search))
$feed_line['last_updated'], true);
$feed['unread'] = 0;
$feed['type'] = 'feed';
+ $feed['updates_disabled'] = (int)($feed_line['update_interval'] < 0);
array_push($root['items'], $feed);
}
}
function savefeedorder() {
- $data = json_decode(clean($_POST['payload']), true);
+ $data = json_decode($_POST['payload'], true);
#file_put_contents("/tmp/saveorder.json", clean($_POST['payload']));
#$data = json_decode(file_get_contents("/tmp/saveorder.json"), true);
'dojoType="dijit.form.Select"');
}
+ /* Site URL */
+
+ $site_url = htmlspecialchars($row["site_url"]);
+
+ print "<hr/>";
+
+ print __('Site URL:') . " ";
+ print "<input dojoType=\"dijit.form.ValidationTextBox\" required=\"1\"
+ placeHolder=\"".__("Site URL")."\"
+ regExp='^(http|https)://.*' style=\"width : 15em\"
+ name=\"site_url\" value=\"$site_url\">";
+
/* FTS Stemming Language */
if (DB_TYPE == "pgsql") {
autocomplete=\"new-password\"
name=\"auth_login\" value=\"$auth_login\"><hr/>";
-
print "<input dojoType=\"dijit.form.TextBox\" type=\"password\" name=\"auth_pass\"
autocomplete=\"new-password\"
placeHolder=\"".__("Password")."\"
<input type=\"hidden\" name=\"method\" value=\"uploadicon\">
<button class=\"\" dojoType=\"dijit.form.Button\" onclick=\"return uploadFeedIcon();\"
type=\"submit\">".__('Replace')."</button>
- <button class=\"danger\" dojoType=\"dijit.form.Button\" onclick=\"return removeFeedIcon($feed_id);\"
+ <button class=\"btn-danger\" dojoType=\"dijit.form.Button\" onclick=\"return removeFeedIcon($feed_id);\"
type=\"submit\">".__('Remove')."</button>
</form>";
print "<div class='dlgButtons'>
<div style=\"float : left\">
- <button class=\"danger\" dojoType=\"dijit.form.Button\" onclick='return unsubscribeFeed($feed_id, \"$title\")'>".
+ <button class=\"btn-danger\" dojoType=\"dijit.form.Button\" onclick='return unsubscribeFeed($feed_id, \"$title\")'>".
__('Unsubscribe')."</button>";
print "</div>";
$feed_title = trim(clean($_POST["title"]));
$feed_url = trim(clean($_POST["feed_url"]));
+ $site_url = trim(clean($_POST["site_url"]));
$upd_intl = (int) clean($_POST["update_interval"]);
$purge_intl = (int) clean($_POST["purge_interval"]);
$feed_id = (int) clean($_POST["id"]); /* editSave */
$auth_pass = '';
}
- $sth = $this->pdo->prepare("SELECT feed_url FROM ttrss_feeds WHERE id = ?");
+ /* $sth = $this->pdo->prepare("SELECT feed_url FROM ttrss_feeds WHERE id = ?");
$sth->execute([$feed_id]);
- $row = $sth->fetch();
- $orig_feed_url = $row["feed_url"];
+ $row = $sth->fetch();$orig_feed_url = $row["feed_url"];
- $reset_basic_info = $orig_feed_url != $feed_url;
+ $reset_basic_info = $orig_feed_url != $feed_url; */
$sth = $this->pdo->prepare("UPDATE ttrss_feeds SET
cat_id = :cat_id,
title = :title,
feed_url = :feed_url,
+ site_url = :site_url,
update_interval = :upd_intl,
purge_interval = :purge_intl,
auth_login = :auth_login,
$sth->execute([":title" => $feed_title,
":cat_id" => $cat_id ? $cat_id : null,
":feed_url" => $feed_url,
+ ":site_url" => $site_url,
":upd_intl" => $upd_intl,
":purge_intl" => $purge_intl,
":auth_login" => $auth_login,
":id" => $feed_id,
":uid" => $_SESSION['uid']]);
- if ($reset_basic_info) {
+/* if ($reset_basic_info) {
RSSUtils::set_basic_feed_info($feed_id);
- }
+ } */
PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_SAVE_FEED,
"hook_prefs_save_feed", $feed_id);
<img src='images/indicator_tiny.gif'>".
__("Loading, please wait...")."</div>";
+ $auto_expand = $feed_search != "" ? "true" : "false";
+
print "<div dojoType=\"fox.PrefFeedStore\" jsId=\"feedStore\"
url=\"backend.php?op=pref-feeds&method=getfeedtree\">
</div>
<div dojoType=\"fox.PrefFeedTree\" id=\"feedTree\"
dndController=\"dijit.tree.dndSource\"
betweenThreshold=\"5\"
- autoExpand='true'
+ autoExpand='$auto_expand'
model=\"feedModel\" openOnClick=\"false\">
<script type=\"dojo/method\" event=\"onClick\" args=\"item\">
var id = String(item.id);
print "<div class='dlgButtons'>";
print "<div style='float : left'>";
- print "<button class=\"danger\" dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('inactiveFeedsDlg').removeSelected()\">"
+ print "<button class=\"btn-danger\" dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('inactiveFeedsDlg').removeSelected()\">"
.__('Unsubscribe from selected feeds')."</button> ";
print "</div>";
print "<div class='dlgButtons'>";
print "<div style='float : left'>";
- print "<button class=\"danger\" dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('errorFeedsDlg').removeSelected()\">"
+ print "<button class=\"btn-danger\" dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('errorFeedsDlg').removeSelected()\">"
.__('Unsubscribe from selected feeds')."</button> ";
print "</div>";