Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
d657c7f0
Commit
d657c7f0
authored
14 years ago
by
Alex Barth
Browse files
Options
Downloads
Patches
Plain Diff
#759302 rjb, smartinm, et. al: Fix user warning: Duplicate entry.
parent
26c64d9f
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.txt
+1
-0
1 addition, 0 deletions
CHANGELOG.txt
includes/FeedsImporter.inc
+4
-4
4 additions, 4 deletions
includes/FeedsImporter.inc
includes/FeedsScheduler.inc
+4
-2
4 additions, 2 deletions
includes/FeedsScheduler.inc
includes/FeedsSource.inc
+4
-4
4 additions, 4 deletions
includes/FeedsSource.inc
with
13 additions
and
10 deletions
CHANGELOG.txt
+
1
−
0
View file @
d657c7f0
...
...
@@ -3,6 +3,7 @@
Feeds 6.x 1.0 XXXXXXXXXXXXXXXXXXXX
----------------------------------
- #759302 rjb, smartinm, et. al: Fix user warning: Duplicate entry.
- #819876 alex_b: Fix field 'url' and 'guid' don't have default values.
- #623444 mongolito404, pvhee, pdrake, servantleader, alex_b et. al.: Mapper for
link module.
...
...
This diff is collapsed.
Click to expand it.
includes/FeedsImporter.inc
+
4
−
4
View file @
d657c7f0
...
...
@@ -134,10 +134,10 @@ class FeedsImporter extends FeedsConfigurable {
$save
=
new
stdClass
();
$save
->
id
=
$this
->
id
;
$save
->
config
=
$this
->
getConfig
();
// Make sure a source record is present at all time, try to update first,
// then insert.
drupal_write_record
(
'feeds_importer'
,
$save
,
'id'
);
if
(
!
db_affected_rows
())
{
if
(
db_result
(
db_query_range
(
"SELECT 1 FROM
{
feeds_importer
}
WHERE id = '%s'"
,
$this
->
id
,
0
,
1
)))
{
drupal_write_record
(
'feeds_importer'
,
$save
,
'id'
);
}
else
{
drupal_write_record
(
'feeds_importer'
,
$save
);
}
// Clear menu cache, changes to importer can change menu items.
...
...
This diff is collapsed.
Click to expand it.
includes/FeedsScheduler.inc
+
4
−
2
View file @
d657c7f0
...
...
@@ -137,8 +137,10 @@ class FeedsScheduler implements FeedsSchedulerInterface {
'last_executed_time'
=>
0
,
'scheduled'
=>
0
,
// Means NOT scheduled at the moment.
);
drupal_write_record
(
'feeds_schedule'
,
$save
,
array
(
'id'
,
'callback'
,
'feed_nid'
));
if
(
!
db_affected_rows
())
{
if
(
db_result
(
db_query_range
(
"SELECT 1 FROM
{
feeds_schedule
}
WHERE id = '%s' AND callback = '%s' AND feed_nid = %d"
,
$importer_id
,
$callback
,
$feed_nid
,
0
,
1
)))
{
drupal_write_record
(
'feeds_schedule'
,
$save
,
array
(
'id'
,
'callback'
,
'feed_nid'
));
}
else
{
drupal_write_record
(
'feeds_schedule'
,
$save
);
}
}
...
...
This diff is collapsed.
Click to expand it.
includes/FeedsSource.inc
+
4
−
4
View file @
d657c7f0
...
...
@@ -197,10 +197,10 @@ class FeedsSource extends FeedsConfigurable {
'source'
=>
$source
,
'batch'
=>
isset
(
$this
->
batch
)
?
$this
->
batch
:
FALSE
,
);
// Make sure a source record is present at all time, try to update first,
// then insert.
drupal_write_record
(
'feeds_source'
,
$object
,
array
(
'id'
,
'feed_nid'
));
if
(
!
db_affected_rows
())
{
if
(
db_result
(
db_query_range
(
"SELECT 1 FROM
{
feeds_source
}
WHERE id = '%s' AND feed_nid = %d"
,
$this
->
id
,
$this
->
feed_nid
,
0
,
1
)))
{
drupal_write_record
(
'feeds_source'
,
$object
,
array
(
'id'
,
'feed_nid'
));
}
else
{
drupal_write_record
(
'feeds_source'
,
$object
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment