summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--functions.php20
-rw-r--r--modules/backend-rpc.php12
-rw-r--r--schema/ttrss_schema_mysql.sql12
-rw-r--r--schema/ttrss_schema_pgsql.sql10
-rw-r--r--tt-rss.css10
-rw-r--r--viewfeed.js2
6 files changed, 40 insertions, 26 deletions
diff --git a/functions.php b/functions.php
index 793fa5f40..2084e6326 100644
--- a/functions.php
+++ b/functions.php
@@ -1836,13 +1836,13 @@
function initialize_user($link, $uid) {
- db_query($link, "INSERT INTO ttrss_labels2 (owner_uid, caption)
+/* db_query($link, "INSERT INTO ttrss_labels2 (owner_uid, caption)
VALUES ('$uid', 'All Articles')");
db_query($link, "INSERT INTO ttrss_filters
(owner_uid, feed_id, filter_type, reg_exp, enabled,
action_id, action_param, filter_param)
- VALUES ('$uid', NULL, 1, '.', true, 7, 'All Articles', 'before')");
+ VALUES ('$uid', NULL, 1, '.', true, 7, 'All Articles', 'before')"); */
db_query($link, "insert into ttrss_feeds (owner_uid,title,feed_url)
values ('$uid', 'Tiny Tiny RSS: New Releases',
@@ -5001,6 +5001,15 @@
$id = $line["id"];
$feed_id = $line["feed_id"];
+ $labels = get_article_labels($link, $id);
+ $labels_str = "";
+
+ foreach ($labels as $l) {
+ $labels_str .= "<span
+ class='hlLabelRef'>".
+ $l[1]."</span>";
+ }
+
if (count($topmost_article_ids) < 5) {
array_push($topmost_article_ids, $id);
}
@@ -5162,6 +5171,8 @@
print "</a>";
+ print $labels_str;
+
# <a href=\"javascript:viewfeed($feed_id, '', false)\">".
# $line["feed_title"]."</a>
@@ -5267,6 +5278,8 @@
}
}
+ print $labels_str;
+
print "</span></div>";
if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW')) {
@@ -6014,7 +6027,8 @@
FROM ttrss_labels2, ttrss_user_labels2
WHERE id = label_id
AND article_id = '$id'
- AND owner_uid = ".$_SESSION["uid"]);
+ AND owner_uid = ".$_SESSION["uid"] . "
+ ORDER BY caption");
$rv = array();
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php
index 4b67e1b38..918f8ca90 100644
--- a/modules/backend-rpc.php
+++ b/modules/backend-rpc.php
@@ -457,17 +457,7 @@
}
}
- print "<rpc-reply><counters>";
-
- if ($label) {
- getGlobalCounters($link);
- getLabelCounters($link);
- if (get_pref($link, 'ENABLE_FEED_CATS')) {
- getCategoryCounters($link);
- }
- }
-
- print "</counters></rpc-reply>";
+ print "<rpc-reply>OK</rpc-reply>";
return;
}
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index 8ba72e8f4..11b2106e0 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -400,12 +400,12 @@ create table ttrss_labels2 (id integer not null primary key auto_increment,
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE
) TYPE=InnoDB;
-INSERT INTO ttrss_labels2 (owner_uid, caption) VALUES (1, 'All Articles');
-
-INSERT INTO ttrss_filters (owner_uid, feed_id, filter_type, reg_exp, enabled,
- action_id, action_param, filter_param)
- VALUES (1, NULL, 1, '.', true, 7, 'All Articles', 'before');
-
+--INSERT INTO ttrss_labels2 (owner_uid, caption) VALUES (1, 'All Articles');
+--
+--INSERT INTO ttrss_filters (owner_uid, feed_id, filter_type, reg_exp, enabled,
+-- action_id, action_param, filter_param)
+-- VALUES (1, NULL, 1, '.', true, 7, 'All Articles', 'before');
+--
create table ttrss_user_labels2 (label_id integer not null,
article_id integer not null,
foreign key (label_id) references ttrss_labels2(id) ON DELETE CASCADE,
diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index 6c7f9d98a..b2ea2a596 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -368,11 +368,11 @@ create table ttrss_labels2 (id serial not null primary key,
caption varchar(250) not null
);
-INSERT INTO ttrss_labels2 (owner_uid, caption) VALUES (1, 'All Articles');
-
-INSERT INTO ttrss_filters (owner_uid, feed_id, filter_type, reg_exp, enabled,
- action_id, action_param, filter_param)
- VALUES (1, NULL, 1, '.', true, 7, 'All Articles', 'before');
+--INSERT INTO ttrss_labels2 (owner_uid, caption) VALUES (1, 'All Articles');
+--
+--INSERT INTO ttrss_filters (owner_uid, feed_id, filter_type, reg_exp, enabled,
+-- action_id, action_param, filter_param)
+-- VALUES (1, NULL, 1, '.', true, 7, 'All Articles', 'before');
create table ttrss_user_labels2 (
label_id integer not null references ttrss_labels2(id) ON DELETE CASCADE,
diff --git a/tt-rss.css b/tt-rss.css
index 7cf2bcf5e..69516b8f1 100644
--- a/tt-rss.css
+++ b/tt-rss.css
@@ -866,6 +866,16 @@ table.headlinesList {
width : 100%;
}
+table.headlinesList span.hlLabelRef, div.cdmHeader span.hlLabelRef {
+ background-color : #fff7d5;
+ font-height : 8px;
+ color : #063064;
+ font-weight : normal;
+ margin : 0px 3px 0px 3px;
+ padding : 0px 4px 0px 4px;
+ white-space: nowrap;
+}
+
table.headlinesList td.hlFeedIcon {
width : 25px;
text-align : center;
diff --git a/viewfeed.js b/viewfeed.js
index 5251eeb5d..8ac79a870 100644
--- a/viewfeed.js
+++ b/viewfeed.js
@@ -907,7 +907,7 @@ function selectionAssignLabel(id) {
new Ajax.Request(query, {
onComplete: function(transport) {
- all_counters_callback2(transport);
+ viewCurrentFeed();
} });
}