? 218004-34-reroll_0.patch
? 218004-35.patch
? d7
? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: modules/aggregator/aggregator.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.admin.inc,v
retrieving revision 1.51
diff -u -p -r1.51 aggregator.admin.inc
--- modules/aggregator/aggregator.admin.inc 23 Apr 2010 05:24:48 -0000 1.51
+++ modules/aggregator/aggregator.admin.inc 23 Apr 2010 06:35:15 -0000
@@ -74,7 +74,7 @@ function aggregator_form_feed($form, &$f
$form['url'] = array('#type' => 'textfield',
'#title' => t('URL'),
'#default_value' => isset($feed->url) ? $feed->url : '',
- '#maxlength' => 255,
+ '#maxlength' => NULL,
'#description' => t('The fully-qualified URL of the feed.'),
'#required' => TRUE,
);
Index: modules/aggregator/aggregator.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.install,v
retrieving revision 1.29
diff -u -p -r1.29 aggregator.install
--- modules/aggregator/aggregator.install 26 Feb 2010 00:11:58 -0000 1.29
+++ modules/aggregator/aggregator.install 23 Apr 2010 06:35:15 -0000
@@ -125,10 +125,8 @@ function aggregator_schema() {
'description' => 'Title of the feed.',
),
'url' => array(
- 'type' => 'varchar',
- 'length' => 255,
+ 'type' => 'text',
'not null' => TRUE,
- 'default' => '',
'description' => 'URL to the feed.',
),
'refresh' => array(
@@ -150,10 +148,8 @@ function aggregator_schema() {
'description' => 'Time when this feed was queued for refresh, 0 if not queued.',
),
'link' => array(
- 'type' => 'varchar',
- 'length' => 255,
+ 'type' => 'text',
'not null' => TRUE,
- 'default' => '',
'description' => 'The parent website of the feed; comes from the element in the feed.',
),
'description' => array(
@@ -197,8 +193,10 @@ function aggregator_schema() {
)
),
'primary key' => array('fid'),
+ 'indexes' => array(
+ 'url' => array(array('url', 255)),
+ ),
'unique keys' => array(
- 'url' => array('url'),
'title' => array('title'),
),
'indexes' => array(
@@ -228,10 +226,8 @@ function aggregator_schema() {
'description' => 'Title of the feed item.',
),
'link' => array(
- 'type' => 'varchar',
- 'length' => 255,
+ 'type' => 'text',
'not null' => TRUE,
- 'default' => '',
'description' => 'Link to the feed item.',
),
'author' => array(
@@ -253,9 +249,8 @@ function aggregator_schema() {
'description' => 'Posted date of the feed item, as a Unix timestamp.',
),
'guid' => array(
- 'type' => 'varchar',
- 'length' => 255,
- 'not null' => FALSE,
+ 'type' => 'text',
+ 'not null' => TRUE,
'description' => 'Unique identifier for the feed item.',
)
),
@@ -272,6 +267,11 @@ function aggregator_schema() {
}
/**
+ * @defgroup updates-6.x-to-7.x System updates from 6.x to 7.x
+ * @{
+ */
+
+/**
* Add hash column to aggregator_feed table.
*/
function aggregator_update_7000() {
@@ -297,3 +297,20 @@ function aggregator_update_7002() {
));
db_add_index('aggregator_feed', 'queued', array('queued'));
}
+
+/**
+ * Allow longer URLs and add indexes on aggregator_item columns guid and link.
+ */
+function aggregator_update_7003() {
+ db_drop_unique_key('aggregator_feed', 'url');
+ db_change_field('aggregator_feed', 'url', 'url', array('type' => 'text', 'not null' => TRUE, 'description' => 'URL to the feed.'));
+ db_change_field('aggregator_feed', 'link', 'link', array('type' => 'text', 'not null' => TRUE, 'description' => 'The parent website of the feed; comes from the element in the feed.'));
+ db_change_field('aggregator_item', 'link', 'link', array('type' => 'text', 'not null' => TRUE, 'description' => 'Link to the feed item.'));
+ db_change_field('aggregator_item', 'guid', 'guid', array('type' => 'text', 'not null' => TRUE, 'description' => 'Unique identifier for the feed item.'));
+ db_add_index('aggregator_feed', 'url', array(array('url', 255)));
+}
+
+/**
+ * @} End of "defgroup updates-6.x-to-7.x"
+ * The next series of updates should start at 8000.
+ */
Index: modules/aggregator/aggregator.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v
retrieving revision 1.438
diff -u -p -r1.438 aggregator.module
--- modules/aggregator/aggregator.module 13 Apr 2010 15:23:02 -0000 1.438
+++ modules/aggregator/aggregator.module 23 Apr 2010 06:35:15 -0000
@@ -319,7 +319,7 @@ function aggregator_permission() {
* Queues news feeds for updates once their refresh interval has elapsed.
*/
function aggregator_cron() {
- $result = db_query('SELECT * FROM {aggregator_feed} WHERE queued = 0 AND checked + refresh < :time AND refresh != :never', array(
+ $result = db_query('SELECT * FROM {aggregator_feed} WHERE queued = 0 AND checked + refresh < :time AND refresh <> :never', array(
':time' => REQUEST_TIME,
':never' => AGGREGATOR_CLEAR_NEVER
));
@@ -507,6 +507,7 @@ function aggregator_save_feed($edit) {
'url' => $edit['url'],
'refresh' => $edit['refresh'],
'block' => $edit['block'],
+ 'link' => '',
))
->execute();
}
@@ -538,6 +539,7 @@ function aggregator_save_feed($edit) {
'block' => $edit['block'],
'description' => '',
'image' => '',
+ 'link' => '',
))
->execute();
@@ -570,15 +572,13 @@ function aggregator_remove($feed) {
// Call hook_aggregator_remove() on all modules.
module_invoke_all('aggregator_remove', $feed);
// Reset feed.
- db_merge('aggregator_feed')
- ->key(array('fid' => $feed->fid))
+ db_update('aggregator_feed')
+ ->condition('fid', $feed->fid)
->fields(array(
'checked' => 0,
'hash' => '',
'etag' => '',
'modified' => 0,
- 'description' => $feed->description,
- 'image' => $feed->image,
))
->execute();
}
Index: modules/aggregator/aggregator.parser.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.parser.inc,v
retrieving revision 1.8
diff -u -p -r1.8 aggregator.parser.inc
--- modules/aggregator/aggregator.parser.inc 30 Jan 2010 07:59:24 -0000 1.8
+++ modules/aggregator/aggregator.parser.inc 23 Apr 2010 06:35:15 -0000
@@ -118,14 +118,18 @@ function aggregator_parse_feed(&$data, $
$item['title'] = '';
}
- // Resolve the items link.
+ // Resolve the item's link.
if (!empty($item['link'])) {
$item['link'] = $item['link'];
}
else {
$item['link'] = $feed->link;
}
- $item['guid'] = isset($item['guid']) ? $item['guid'] : '';
+
+ // Resolve the item's GUID.
+ if (!isset($item['guid'])) {
+ $item['guid'] = '';
+ }
// Atom feeds have a content and/or summary tag instead of a description tag.
if (!empty($item['content:encoded'])) {