";
- }
- }
-
- if ($subop == "globalPurge") {
-
- print "";
- global_purge_old_posts($link, true);
- print "";
-
- }
-
+ handle_rpc_request($link);
}
if ($op == "feeds") {
@@ -2093,10 +1888,9 @@
if (!get_pref($link, 'ENABLE_FEED_CATS')) {
print "
|
- Title |
- Feed |
- Update Interval |
- Purge Interval |
";
+ Title |
+ Feed |
+ Updated | ";
}
$lnum = 0;
@@ -2111,14 +1905,18 @@
$edit_title = htmlspecialchars(db_unescape_string($line["title"]));
$edit_link = htmlspecialchars(db_unescape_string($line["feed_url"]));
$edit_cat = htmlspecialchars(db_unescape_string($line["category"]));
-
-// if ($line["update_interval"] == "0") $line["update_interval"] = "Default";
-// if ($line["update_interval"] == "-1") $line["update_interval"] = "Disabled";
-// if ($line["purge_interval"] == "0") $line["purge_interval"] = "Default";
-// if ($line["purge_interval"] < 0) $line["purge_interval"] = "Disabled";
if (!$edit_cat) $edit_cat = "Uncategorized";
+ $last_updated = $line["last_updated"];
+
+ if (get_pref($link, 'HEADLINES_SMART_DATE')) {
+ $last_updated = smart_date_time(strtotime($last_updated));
+ } else {
+ $short_date = get_pref($link, 'SHORT_DATE_FORMAT');
+ $last_updated = date($short_date, strtotime($last_updated));
+ }
+
if (get_pref($link, 'ENABLE_FEED_CATS') && $cur_cat_id != $cat_id) {
$lnum = 0;
@@ -2126,10 +1924,9 @@
print "
|
- Title |
- Feed |
- Update Interval |
- Purge Interval |
";
+ Title |
+ Feed |
+ Updated | ";
$cur_cat_id = $cat_id;
}
@@ -2171,12 +1968,15 @@
$edit_cat . "";
} */
- print "" .
+/* print " | " .
$update_intervals[$line["update_interval"]] . " | ";
print "" .
- $purge_intervals[$line["purge_interval"]] . " | ";
-
+ $purge_intervals[$line["purge_interval"]] . ""; */
+
+ print "" .
+ "$last_updated | ";
+
print "";
++$lnum;
@@ -2230,15 +2030,6 @@
onclick=\"javascript:categorizeSelectedFeeds()\" value=\"Set category\">";
}
-
- if (get_pref($link, 'ENABLE_PREFS_CATCHUP_UNCATCHUP')) {
- print "
-
- ";
- }
print "
All feeds: Filter expression
Feed |
Match |
- Action |
- Description | ";
-
+ Action | ";
+
$lnum = 0;
while ($line = db_fetch_assoc($result)) {
@@ -2551,14 +2338,11 @@
print "";
$line["regexp"] = htmlspecialchars($line["reg_exp"]);
- $line["description"] = htmlspecialchars($line["description"]);
if (!$line["feed_title"]) $line["feed_title"] = "All feeds";
if (!$edit_filter_id || $subop != "edit") {
- if (!$line["description"]) $line["description"] = "[No description]";
-
print " | ";
@@ -2573,9 +2357,6 @@
print "" .
$line["action_description"] . " | ";
-
- print "" .
- $line["description"] . " | ";
} else if ($filter_id != $edit_filter_id) {
@@ -2588,7 +2369,6 @@
print "".$line["feed_title"]." | ";
print "".$line["filter_type_descr"]." | ";
print "".$line["action_description"]." | ";
- print "".$line["description"]." | ";
} else {
@@ -2642,10 +2422,6 @@
print "";
-
- print " | ";
-
print "";
}
diff --git a/prefs.js b/prefs.js
index e41f70ae5..a0348f926 100644
--- a/prefs.js
+++ b/prefs.js
@@ -239,7 +239,7 @@ function addLabel() {
var sqlexp = document.getElementById("ladd_expr");
if (sqlexp.value.length == 0) {
- notify("Missing SQL expression.");
+ alert("Can't add label: missing SQL expression.");
} else {
notify("Adding label...");
@@ -267,7 +267,7 @@ function addFilter() {
var action = document.getElementById("fadd_action");
if (regexp.value.length == 0) {
- notify("Missing filter expression.");
+ alert("Can't add filter: missing filter expression.");
} else {
notify("Adding filter...");
@@ -297,7 +297,7 @@ function addFeed() {
var link = document.getElementById("fadd_link");
if (link.value.length == 0) {
- notify("Missing feed URL.");
+ alert("Can't add feed: missing feed URL.");
} else {
notify("Adding feed...");
@@ -322,7 +322,7 @@ function addFeedCat() {
var cat = document.getElementById("fadd_cat");
if (cat.value.length == 0) {
- notify("Missing feed category.");
+ alert("Can't add category: no name specified.");
} else {
notify("Adding feed category...");
@@ -346,7 +346,7 @@ function addUser() {
var sqlexp = document.getElementById("uadd_box");
if (sqlexp.value.length == 0) {
- notify("Missing user login.");
+ alert("Can't add user: no login specified.");
} else {
notify("Adding user...");
@@ -476,7 +476,7 @@ function getSelectedFeedCats() {
}
-function readSelectedFeeds(read) {
+/*function readSelectedFeeds(read) {
if (!xmlhttp_ready(xmlhttp)) {
printLockingError();
@@ -502,10 +502,10 @@ function readSelectedFeeds(read) {
} else {
- notify("Please select some feeds first.");
+ alert("No feeds are selected.");
}
-}
+} */
function removeSelectedLabels() {
@@ -529,7 +529,7 @@ function removeSelectedLabels() {
xmlhttp.send(null);
}
} else {
- notify("Please select some labels first.");
+ alert("No labels are selected.");
}
}
@@ -556,7 +556,7 @@ function removeSelectedUsers() {
}
} else {
- notify("Please select some labels first.");
+ alert("No users are selected.");
}
}
@@ -582,7 +582,7 @@ function removeSelectedFilters() {
xmlhttp.send(null);
}
} else {
- notify("Please select some filters first.");
+ alert("No filters are selected.");
}
}
@@ -612,7 +612,7 @@ function removeSelectedFeeds() {
} else {
- notify("Please select some feeds first.");
+ alert("No feeds are selected.");
}
@@ -642,7 +642,7 @@ function removeSelectedFeedCats() {
} else {
- notify("Please select some feeds first.");
+ alert("No categories are selected.");
}
@@ -944,7 +944,6 @@ function filterEditSave() {
}
var regexp = document.getElementById("iedit_regexp").value;
- var descr = document.getElementById("iedit_descr").value;
var match = document.getElementById("iedit_match");
var v_match = match[match.selectedIndex].text;
@@ -955,19 +954,16 @@ function filterEditSave() {
var action = document.getElementById("iedit_filter_action");
var action_id = action[action.selectedIndex].id;
-// notify("Saving filter " + filter + ": " + regexp + ", " + descr + ", " + match);
-
if (regexp.length == 0) {
- notify("Filter expression cannot be blank.");
+ alert("Can't save filter: match expression is blank.");
return;
}
active_filter = false;
xmlhttp.open("GET", "backend.php?op=pref-filters&subop=editSave&id=" +
- filter + "&r=" + param_escape(regexp) + "&d=" + param_escape(descr) +
- "&m=" + param_escape(v_match) + "&fid=" + param_escape(feed_id) +
- "&aid=" + param_escape(action_id), true);
+ filter + "&r=" + param_escape(regexp) + "&m=" + param_escape(v_match) +
+ "&fid=" + param_escape(feed_id) + "&aid=" + param_escape(action_id), true);
notify("Saving filter...");
@@ -980,12 +976,12 @@ function editSelectedLabel() {
var rows = getSelectedLabels();
if (rows.length == 0) {
- notify("No labels are selected.");
+ alert("No labels are selected.");
return;
}
if (rows.length > 1) {
- notify("Please select one label.");
+ alert("Please select only one label.");
return;
}
@@ -999,12 +995,12 @@ function editSelectedUser() {
var rows = getSelectedUsers();
if (rows.length == 0) {
- notify("No users are selected.");
+ alert("No users are selected.");
return;
}
if (rows.length > 1) {
- notify("Please select one user.");
+ alert("Please select only one user.");
return;
}
@@ -1017,12 +1013,12 @@ function resetSelectedUserPass() {
var rows = getSelectedUsers();
if (rows.length == 0) {
- notify("No users are selected.");
+ alert("No users are selected.");
return;
}
if (rows.length > 1) {
- notify("Please select one user.");
+ alert("Please select only one user.");
return;
}
@@ -1050,12 +1046,12 @@ function selectedUserDetails() {
var rows = getSelectedUsers();
if (rows.length == 0) {
- notify("No users are selected.");
+ alert("No users are selected.");
return;
}
if (rows.length > 1) {
- notify("Please select one user.");
+ alert("Please select only one user.");
return;
}
@@ -1079,14 +1075,14 @@ function selectedFeedDetails() {
var rows = getSelectedFeeds();
if (rows.length == 0) {
- notify("No feeds are selected.");
+ alert("No feeds are selected.");
return;
}
-// if (rows.length > 1) {
-// notify("Please select one feed.");
-// return;
-// }
+ if (rows.length > 1) {
+ notify("Please select only one feed.");
+ return;
+ }
// var id = rows[0];
@@ -1103,12 +1099,12 @@ function editSelectedFilter() {
var rows = getSelectedFilters();
if (rows.length == 0) {
- notify("No filters are selected.");
+ alert("No filters are selected.");
return;
}
if (rows.length > 1) {
- notify("Please select one filter.");
+ alert("Please select only one filter.");
return;
}
@@ -1142,12 +1138,12 @@ function editSelectedFeedCat() {
var rows = getSelectedFeedCats();
if (rows.length == 0) {
- notify("No categories are selected.");
+ alert("No categories are selected.");
return;
}
if (rows.length > 1) {
- notify("Please select one category.");
+ alert("Please select only one category.");
return;
}
@@ -1221,7 +1217,7 @@ function validateOpmlImport() {
var opml_file = document.getElementById("opml_file");
if (opml_file.value.length == 0) {
- notify("Please select OPML file to upload.");
+ alert("No OPML file to upload.");
return false;
} else {
return true;
@@ -1384,7 +1380,7 @@ function categorizeSelectedFeeds() {
} else {
- notify("Please select some feeds first.");
+ alert("No feeds are selected.");
}
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index cb616f333..8abc59b53 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -140,7 +140,6 @@ create table ttrss_filters (id integer not null primary key auto_increment,
feed_id integer default null,
filter_type integer not null,
reg_exp varchar(250) not null,
- description varchar(250) not null default '',
action_id integer not null default 1,
index (filter_type),
foreign key (filter_type) references ttrss_filter_types(id) ON DELETE CASCADE,
@@ -205,7 +204,6 @@ create table ttrss_prefs (pref_name varchar(250) not null primary key,
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_FEED_ICONS', 1, 'true', 'Enable icons in feedlist',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('PURGE_OLD_DAYS', 3, '60', 'Purge old posts after this number of days (0 - disables)',1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('UPDATE_POST_ON_CHECKSUM_CHANGE', 1, 'true', 'Update post on checksum change',1);
-insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_PREFS_CATCHUP_UNCATCHUP', 1, 'false', 'Enable catchup/uncatchup buttons in feed editor',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('ENABLE_LABELS', 1, 'false', 'Enable labels',3,
'Experimental support for virtual feeds based on user crafted SQL queries. This feature is highly experimental and at this point not user friendly. Use with caution.');
@@ -216,9 +214,6 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DEFAULT_ARTICLE_LIMIT', 3, '0', 'Default article limit',2,
'Default limit for articles to display, any custom number you like (0 - disables).');
-insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DISPLAY_FEEDLIST_ACTIONS', 1, 'false', 'Display feedlist actions',2,
- 'Display separate dropbox for feedlist actions, if disabled these actions are available in global actions menu.');
-
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('ALLOW_DUPLICATE_POSTS', 1, 'true', 'Allow duplicate posts',1,
'This option is useful when you are reading several planet-type aggregators with partially colliding userbase.
When disabled, it forces same posts from different feeds to appear only once.');
diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index c9dfe0205..c8020fd0a 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -134,7 +134,6 @@ create table ttrss_filters (id serial not null primary key,
feed_id integer references ttrss_feeds(id) on delete cascade default null,
filter_type integer not null references ttrss_filter_types(id),
reg_exp varchar(250) not null,
- description varchar(250) not null default '',
action_id integer not null default 1 references ttrss_filter_actions(id) on delete cascade);
create table ttrss_labels (id serial not null primary key,
@@ -185,7 +184,6 @@ create table ttrss_prefs (pref_name varchar(250) not null primary key,
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_FEED_ICONS', 1, 'true', 'Enable icons in feedlist',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('PURGE_OLD_DAYS', 3, '60', 'Purge old posts after this number of days (0 - disables)',1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('UPDATE_POST_ON_CHECKSUM_CHANGE', 1, 'true', 'Update post on checksum change',1);
-insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_PREFS_CATCHUP_UNCATCHUP', 1, 'false', 'Enable catchup/uncatchup buttons in feed editor',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('ENABLE_LABELS', 1, 'false', 'Enable labels',3,
'Experimental support for virtual feeds based on user crafted SQL queries. This feature is highly experimental and at this point not user friendly. Use with caution.');
@@ -195,9 +193,6 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('USE_COMPACT_STYLESHEET', 1, 'false', 'Use compact stylesheet by default',2);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DEFAULT_ARTICLE_LIMIT', 3, '0', 'Default article limit',2,
'Default limit for articles to display, any custom number you like (0 - disables).');
-
-insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DISPLAY_FEEDLIST_ACTIONS', 1, 'false', 'Display feedlist actions',2,
- 'Display separate dropbox for feedlist actions, if disabled these actions are available in global actions menu.');
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('ALLOW_DUPLICATE_POSTS', 1, 'true', 'Allow duplicate posts',1,
'This option is useful when you are reading several planet-type aggregators with partially colliding userbase.
diff --git a/schema/upgrade-1.1.4-1.1.5-mysql.sql b/schema/upgrade-1.1.4-1.1.5-mysql.sql
index 9fec820f6..bee135989 100644
--- a/schema/upgrade-1.1.4-1.1.5-mysql.sql
+++ b/schema/upgrade-1.1.4-1.1.5-mysql.sql
@@ -5,7 +5,15 @@ update ttrss_feeds set rtl_content = false;
alter table ttrss_feeds change rtl_content rtl_content bool not null;
alter table ttrss_feeds alter column rtl_content set default false;
+delete from ttrss_user_prefs where pref_name = 'DISPLAY_FEEDLIST_ACTIONS';
+delete from ttrss_prefs where pref_name = 'DISPLAY_FEEDLIST_ACTIONS';
+
+delete from ttrss_user_prefs where pref_name = 'ENABLE_PREFS_CATCHUP_UNCATCHUP';
+delete from ttrss_prefs where pref_name = 'ENABLE_PREFS_CATCHUP_UNCATCHUP';
+
alter table ttrss_sessions drop column ip_address;
+alter table ttrss_filters drop column description;
+
update ttrss_version set schema_version = 7;
diff --git a/schema/upgrade-1.1.4-1.1.5-pgsql.sql b/schema/upgrade-1.1.4-1.1.5-pgsql.sql
index 405daf620..51437e4fa 100644
--- a/schema/upgrade-1.1.4-1.1.5-pgsql.sql
+++ b/schema/upgrade-1.1.4-1.1.5-pgsql.sql
@@ -9,6 +9,14 @@ alter table ttrss_feeds alter column rtl_content set default false;
alter table ttrss_sessions drop column ip_address;
+delete from ttrss_user_prefs where pref_name = 'DISPLAY_FEEDLIST_ACTIONS';
+delete from ttrss_prefs where pref_name = 'DISPLAY_FEEDLIST_ACTIONS';
+
+delete from ttrss_user_prefs where pref_name = 'ENABLE_PREFS_CATCHUP_UNCATCHUP';
+delete from ttrss_prefs where pref_name = 'ENABLE_PREFS_CATCHUP_UNCATCHUP';
+
+alter table ttrss_filters drop column description;
+
update ttrss_version set schema_version = 7;
commit;
diff --git a/tt-rss.js b/tt-rss.js
index 7958291f9..4c02a515f 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -653,30 +653,6 @@ function qfdDelete(feed_id) {
}
-function allFeedsMenuChange() {
- var chooser = document.getElementById("allFeedsChooser");
-
- var opname = chooser[chooser.selectedIndex].text;
-
- chooser.selectedIndex = 0;
-
- if (opname == "Update") {
- scheduleFeedUpdate(true);
- return;
- }
-
- if (opname == "Mark as read") {
- catchupAllFeeds();
- return;
- }
-
- if (opname == "Show only unread") {
- toggleDispRead();
- return;
- }
-
-}
-
function updateFeedTitle(t) {
active_title_text = t;
updateTitle();
diff --git a/tt-rss.php b/tt-rss.php
index 68ab5268c..1184abc7d 100644
--- a/tt-rss.php
+++ b/tt-rss.php
@@ -127,34 +127,11 @@ window.onload = init;
-
- if (get_pref($link, 'DISPLAY_FEEDLIST_ACTIONS')) { ?>
-
-
-
-
-
-
-
-
-
- } else { ?>
- } ?>
-
|