$filter_id = db_escape_string($_GET["id"]);
$result = db_query($link, "UPDATE ttrss_filters SET
- regexp = '$regexp',
+ reg_exp = '$regexp',
description = '$descr',
filter_type = (SELECT id FROM ttrss_filter_types WHERE
description = '$match')
if (!WEB_DEMO_MODE) {
- $regexp = db_escape_string($_GET["regexp"]);
+ $regexp = db_escape_string($_GET["reg_exp"]);
$match = db_escape_string($_GET["match"]);
$result = db_query($link,
- "INSERT INTO ttrss_filters (regexp,filter_type) VALUES
+ "INSERT INTO ttrss_filters (reg_exp,filter_type) VALUES
('$regexp', (SELECT id FROM ttrss_filter_types WHERE
description = '$match'))");
}
</table>";
$result = db_query($link, "SELECT
- id,regexp,description,
+ id,reg_exp,description,
(SELECT name FROM ttrss_filter_types WHERE
id = filter_type) as filter_type_name,
(SELECT description FROM ttrss_filter_types
WHERE id = filter_type) as filter_type_descr
FROM
- ttrss_filters ORDER by regexp");
+ ttrss_filters ORDER by reg_exp");
print "<p><table width=\"100%\" class=\"prefFilterList\" id=\"prefFilterList\">";
print "<tr class=\"$class\" id=\"FILRR-$filter_id\">";
- $line["regexp"] = htmlspecialchars($line["regexp"]);
+ $line["regexp"] = htmlspecialchars($line["reg_exp"]);
$line["description"] = htmlspecialchars($line["description"]);
if (!$edit_filter_id || $subop != "edit") {
type=\"checkbox\" id=\"FICHK-".$line["id"]."\"></td>";
print "<td><a href=\"javascript:editFilter($filter_id);\">" .
- $line["regexp"] . "</td>";
+ $line["reg_exp"] . "</td>";
print "<td><a href=\"javascript:editFilter($filter_id);\">" .
$line["description"] . "</td>";
print "<td><input disabled=\"true\" type=\"checkbox\"
id=\"FICHK-".$line["id"]."\"></td>";
- print "<td>".$line["regexp"]."</td>";
+ print "<td>".$line["reg_exp"]."</td>";
print "<td>".$line["description"]."</td>";
print "<td>".$line["filter_type_descr"]."</td>";
print "<td><input disabled=\"true\" type=\"checkbox\"></td>";
- print "<td><input id=\"iedit_regexp\" value=\"".$line["regexp"].
+ print "<td><input id=\"iedit_regexp\" value=\"".$line["reg_exp"].
"\"></td>";
print "<td><input id=\"iedit_descr\" value=\"".$line["description"].
print "</div>";
}
- pg_close($link);
+ db_close($link);
?>
$filters = array();
- $result = db_query($link, "SELECT regexp,
+ $result = db_query($link, "SELECT reg_exp,
(SELECT name FROM ttrss_filter_types
WHERE id = filter_type) as name
FROM ttrss_filters");
while ($line = db_fetch_assoc($result)) {
if (!$filters[$line["name"]]) $filters[$line["name"]] = array();
- array_push($filters[$line["name"]], $line["regexp"]);
+ array_push($filters[$line["name"]], $line["reg_exp"]);
}
foreach ($rss->items as $item) {
create table ttrss_filters (id serial primary key,
filter_type integer not null references ttrss_filter_types(id),
- regexp varchar(250) not null,
+ reg_exp varchar(250) not null,
description varchar(250) not null default '');
title varchar(200) not null unique,
feed_url varchar(250) unique not null,
icon_url varchar(250) not null default '',
- last_updated timestamp default null);
-
-alter table ttrss_feeds ENGINE=InnoDB;
+ last_updated timestamp default null) TYPE=InnoDB;
insert into ttrss_feeds (title,feed_url) values ('Footnotes', 'http://gnomedesktop.org/node/feed');
insert into ttrss_feeds (title,feed_url) values ('Freedesktop.org', 'http://planet.freedesktop.org/rss20.xml');
'http://syndication.technocrat.net/rss');
create table ttrss_entries (id integer not null primary key auto_increment,
- feed_id int id not null,
+ feed_id integer not null,
updated timestamp not null,
title varchar(250) not null,
guid varchar(250) not null unique,
content text not null,
content_hash varchar(250) not null,
last_read timestamp,
- marked boolean not null default 'false',
+ marked bool not null default 'false',
date_entered timestamp not null,
- no_orig_date boolean not null default 'false',
+ no_orig_date bool not null default 'false',
comments varchar(250) not null default '',
- unread boolean not null default true);
-
-alter table ttrss_entries ENGINE=InnoDB;
+ unread bool not null default 'true') TYPE=InnoDB;
drop table if exists ttrss_filters;
drop table if exists ttrss_filter_types;
create table ttrss_filter_types (id integer primary key,
name varchar(120) unique not null,
- description varchar(250) not null unique);
+ description varchar(250) not null unique) TYPE=InnoDB;
-alter table ttrss_filter_types ENGINE=InnoDB;
insert into ttrss_filter_types (id,name,description) values (1, 'title', 'Title');
insert into ttrss_filter_types (id,name,description) values (2, 'content', 'Content');
insert into ttrss_filter_types (id,name,description) values (3, 'both',
'Title or Content');
-create table ttrss_filters (id serial primary key,
+create table ttrss_filters (id integer primary key auto_increment,
filter_type integer not null,
- regexp varchar(250) not null,
- description varchar(250) not null default '');
+ reg_exp varchar(250) not null,
+ description varchar(250) not null default '') TYPE=InnoDB;
-alter table ttrss_filters ENGINE=InnoDB;