Skip to content
Snippets Groups Projects
Commit 31172585 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Various aggregator module improvements.  Modified patch by drumm.
parent d4e1b4a7
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -29,6 +29,75 @@ CREATE TABLE accesslog ( ...@@ -29,6 +29,75 @@ CREATE TABLE accesslog (
KEY accesslog_timestamp (timestamp) KEY accesslog_timestamp (timestamp)
) TYPE=MyISAM; ) TYPE=MyISAM;
--
-- Table structure for table 'aggregator_category'
--
CREATE TABLE aggregator_category (
cid int(10) NOT NULL auto_increment,
title varchar(255) NOT NULL default '',
description longtext NOT NULL,
block tinyint(2) NOT NULL default '0',
PRIMARY KEY (cid),
UNIQUE KEY title (title)
) TYPE=MyISAM;
--
-- Table structure for table 'aggregator_category_feed'
--
CREATE TABLE aggregator_category_feed (
fid int(10) NOT NULL default '0',
cid int(10) NOT NULL default '0',
PRIMARY KEY (fid,cid)
) TYPE=MyISAM;
--
-- Table structure for table 'aggregator_category_item'
--
CREATE TABLE aggregator_category_item (
iid int(10) NOT NULL default '0',
cid int(10) NOT NULL default '0',
PRIMARY KEY (iid,cid)
) TYPE=MyISAM;
--
-- Table structure for table 'aggregator_feed'
--
CREATE TABLE aggregator_feed (
fid int(10) NOT NULL auto_increment,
title varchar(255) NOT NULL default '',
url varchar(255) NOT NULL default '',
refresh int(10) NOT NULL default '0',
checked int(10) NOT NULL default '0',
link varchar(255) NOT NULL default '',
description longtext NOT NULL,
image longtext NOT NULL,
etag varchar(255) NOT NULL default '',
modified int(10) NOT NULL default '0',
block tinyint(2) NOT NULL default '0',
PRIMARY KEY (fid),
UNIQUE KEY link (url),
UNIQUE KEY title (title)
) TYPE=MyISAM;
--
-- Table structure for table 'aggregator_item'
--
CREATE TABLE aggregator_item (
iid int(10) NOT NULL auto_increment,
fid int(10) NOT NULL default '0',
title varchar(255) NOT NULL default '',
link varchar(255) NOT NULL default '',
author varchar(255) NOT NULL default '',
description longtext NOT NULL,
timestamp int(11) default NULL,
PRIMARY KEY (iid)
) TYPE=MyISAM;
-- --
-- Table structure for table 'authmap' -- Table structure for table 'authmap'
-- --
...@@ -86,18 +155,6 @@ CREATE TABLE boxes ( ...@@ -86,18 +155,6 @@ CREATE TABLE boxes (
UNIQUE KEY info (info) UNIQUE KEY info (info)
) TYPE=MyISAM; ) TYPE=MyISAM;
--
-- Table structure for table 'bundle'
--
CREATE TABLE bundle (
bid int(10) NOT NULL auto_increment,
title varchar(255) NOT NULL default '',
attributes varchar(255) NOT NULL default '',
PRIMARY KEY (bid),
UNIQUE KEY title (title)
) TYPE=MyISAM;
-- --
-- Table structure for table 'cache' -- Table structure for table 'cache'
-- --
...@@ -146,27 +203,6 @@ CREATE TABLE directory ( ...@@ -146,27 +203,6 @@ CREATE TABLE directory (
PRIMARY KEY (link) PRIMARY KEY (link)
) TYPE=MyISAM; ) TYPE=MyISAM;
--
-- Table structure for table 'feed'
--
CREATE TABLE feed (
fid int(10) NOT NULL auto_increment,
title varchar(255) NOT NULL default '',
url varchar(255) NOT NULL default '',
refresh int(10) NOT NULL default '0',
checked int(10) NOT NULL default '0',
attributes varchar(255) NOT NULL default '',
link varchar(255) NOT NULL default '',
description longtext NOT NULL,
image longtext NOT NULL default '',
etag varchar(255) NOT NULL default '',
modified int(10) NOT NULL default '0',
PRIMARY KEY (fid),
UNIQUE KEY link (url),
UNIQUE KEY title (title)
) TYPE=MyISAM;
-- --
-- Table structure for table 'filters' -- Table structure for table 'filters'
-- --
...@@ -200,22 +236,6 @@ CREATE TABLE history ( ...@@ -200,22 +236,6 @@ CREATE TABLE history (
PRIMARY KEY (uid,nid) PRIMARY KEY (uid,nid)
) TYPE=MyISAM; ) TYPE=MyISAM;
--
-- Table structure for table 'item'
--
CREATE TABLE item (
iid int(10) NOT NULL auto_increment,
fid int(10) NOT NULL default '0',
title varchar(255) NOT NULL default '',
link varchar(255) NOT NULL default '',
author varchar(255) NOT NULL default '',
description longtext NOT NULL,
timestamp int(11) default NULL,
attributes varchar(255) NOT NULL default '',
PRIMARY KEY (iid)
) TYPE=MyISAM;
-- --
-- Table structure for table 'locales' -- Table structure for table 'locales'
-- --
......
...@@ -55,7 +55,8 @@ ...@@ -55,7 +55,8 @@
"2004-02-20" => "update_81", "2004-02-20" => "update_81",
"2004-02-27" => "update_82", "2004-02-27" => "update_82",
"2004-04-15" => "update_83", "2004-04-15" => "update_83",
"2004-04-21" => "update_84" "2004-04-21" => "update_84",
"2004-04-27" => "update_85"
); );
function update_32() { function update_32() {
...@@ -934,6 +935,42 @@ function update_84() { ...@@ -934,6 +935,42 @@ function update_84() {
return $ret; return $ret;
} }
function update_85() {
$ret = array();
if ($GLOBALS['db_type'] == 'mysql') {
$ret[] = update_sql("ALTER TABLE {bundle} RENAME TO {aggregator_category}");
$ret[] = update_sql("ALTER TABLE {aggregator_category} DROP attributes");
$ret[] = update_sql("ALTER TABLE {aggregator_category} CHANGE bid cid int(10) NOT NULL auto_increment");
$ret[] = update_sql("ALTER TABLE {aggregator_category} ADD description longtext NOT NULL");
$ret[] = update_sql("UPDATE {sequences} SET name = '{aggregator_category}_cid' WHERE name = '{bundle}_bid'");
$ret[] = update_sql("ALTER TABLE {feed} RENAME TO {aggregator_feed}");
$ret[] = update_sql("ALTER TABLE {aggregator_feed} DROP attributes");
$ret[] = update_sql("ALTER TABLE {aggregator_feed} ADD block tinyint(2) NOT NULL");
$ret[] = update_sql("ALTER TABLE {aggregator_category} ADD block tinyint(2) NOT NULL");
$ret[] = update_sql("UPDATE {sequences} SET name = '{aggregator_feed}_fid' WHERE name = '{feed}_fid'");
$ret[] = update_sql("ALTER TABLE {item} RENAME TO {aggregator_item}");
$ret[] = update_sql("ALTER TABLE {aggregator_item} DROP attributes");
$max = db_result(db_query_range("SELECT iid FROM {aggregator_item} ORDER BY iid DESC", 1, 1));
if ($max) {
$ret[] = update_sql("INSERT INTO {sequences} (name, id) VALUES ('{aggregator_item}_iid', $max)");
}
$ret[] = update_sql("CREATE TABLE {aggregator_category_feed} (
fid int(10) NOT NULL,
cid int(10) NOT NULL,
PRIMARY KEY (fid, cid)
)");
$ret[] = update_sql("CREATE TABLE {aggregator_category_item} (
iid int(10) NOT NULL,
cid int(10) NOT NULL,
PRIMARY KEY (iid, cid)
)");
}
else {
/* Needs PostgreSQL equivalent */
}
return $ret;
}
function update_sql($sql) { function update_sql($sql) {
$edit = $_POST["edit"]; $edit = $_POST["edit"];
$result = db_query($sql); $result = db_query($sql);
......
...@@ -145,7 +145,7 @@ td.menu-disabled { ...@@ -145,7 +145,7 @@ td.menu-disabled {
color: #f00; color: #f00;
} }
.more-link { .more-link {
text-align: right; float: right;
} }
.node-form .form-text { .node-form .form-text {
display: block; display: block;
...@@ -199,6 +199,9 @@ td.menu-disabled { ...@@ -199,6 +199,9 @@ td.menu-disabled {
#aggregator .news-item .date { #aggregator .news-item .date {
float: left; float: left;
} }
#aggregator .news-item {
clear: both;
}
#aggregator .news-item .body { #aggregator .news-item .body {
margin-top: 1em; margin-top: 1em;
margin-left: 4em; margin-left: 4em;
...@@ -206,6 +209,25 @@ td.menu-disabled { ...@@ -206,6 +209,25 @@ td.menu-disabled {
#aggregator .news-item .body .feed { #aggregator .news-item .body .feed {
font-size: 0.9em; font-size: 0.9em;
} }
#aggregator .news-item .title {
float: left;
}
#aggregator .news-item .description {
clear: both;
}
#aggregator td {
vertical-align: bottom;
}
#aggregator td.categorize-item {
white-space: nowrap;
}
#aggregator .categorize-item .news-item .body {
margin-top: 0;
}
#aggregator .categorize-item h3 {
margin-bottom: 1em;
margin-top: 0;
}
.book { .book {
margin: 1em 0 1em 0; margin: 1em 0 1em 0;
} }
...@@ -354,4 +376,4 @@ td.watchdog-httpd { ...@@ -354,4 +376,4 @@ td.watchdog-httpd {
td.watchdog-error { td.watchdog-error {
background: #e44; background: #e44;
border: 1px solid #c22; border: 1px solid #c22;
} }
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -20,7 +20,7 @@ tr.dark td, tr.light td { ...@@ -20,7 +20,7 @@ tr.dark td, tr.light td {
padding: 0.3em; padding: 0.3em;
} }
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
margin: 0; margin: 0.5;
} }
h1 { h1 {
font-size: 1.3em; font-size: 1.3em;
...@@ -192,6 +192,25 @@ table { ...@@ -192,6 +192,25 @@ table {
.links a { .links a {
font-weight: bold; font-weight: bold;
} }
.tabs {
color: #999;
margin: 0.5em 0;
padding: 0.5em 1em;
border-bottom: 1px solid black;
}
.tabs a {
border: 1px solid black;
background: #f0f0f0;
font-weight: bold;
margin-right: 1em;
padding: 0.5em 1em;
}
.tabs a.active {
border-bottom: 1px solid white;
background: #fff;
}
.block, .box { .block, .box {
padding: 0 0 1.5em 0; padding: 0 0 1.5em 0;
} }
...@@ -257,12 +276,13 @@ table { ...@@ -257,12 +276,13 @@ table {
padding: 1em; padding: 1em;
margin: 1em 0 1em 0; margin: 1em 0 1em 0;
} }
#aggregator .news-item .source { #aggregator .news-item .source, #aggregator .news-item .categories, #aggregator .source, #aggregator .age {
color: #999; color: #999;
font-style: italic; font-style: italic;
font-size: 0.9em; font-size: 0.9em;
} }
#aggregator .title { #aggregator .title {
margin-bottom: 0.5em;
font-size: 1em; font-size: 1em;
} }
#aggregator h3 { #aggregator h3 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment