Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
9836201e
Commit
9836201e
authored
Mar 23, 2003
by
Dries
Browse files
- Bugfix. Reported by Gunnar
parent
3b840abe
Changes
3
Hide whitespace changes
Inline
Side-by-side
modules/aggregator.module
View file @
9836201e
...
...
@@ -49,7 +49,8 @@ function import_link($type) {
}
function
import_cron
()
{
$result
=
db_query
(
"SELECT * FROM feed WHERE timestamp + refresh < "
.
time
());
// $result = db_query("SELECT * FROM feed WHERE timestamp + refresh < ". time());
$result
=
db_query
(
"SELECT * FROM feed"
);
while
(
$feed
=
db_fetch_array
(
$result
))
{
import_refresh
(
$feed
);
}
...
...
@@ -215,9 +216,12 @@ function import_element_data($parser, $data) {
}
}
function
import_refresh
(
$feed
)
{
// unset the global variables before we use them:
unset
(
$GLOBALS
[
"channel"
],
$GLOBALS
[
"element"
],
$GLOBALS
[
"item"
],
$GLOBALS
[
"items"
],
$GLOBALS
[
"tag"
]);
// after we unset the variables, we can global them again:
global
$items
,
$channel
;
/*
...
...
@@ -239,9 +243,6 @@ function import_refresh($feed) {
}
fclose
(
$fp
);
// unset the global variables:
unset
(
$GLOBALS
[
"channel"
],
$GLOBAL
[
"element"
],
$GLOBALS
[
"item"
],
$GLOBAL
[
"items"
]);
// parse the data:
$xml_parser
=
xml_parser_create
();
xml_set_element_handler
(
$xml_parser
,
"import_element_start"
,
"import_element_end"
);
...
...
modules/aggregator/aggregator.module
View file @
9836201e
...
...
@@ -49,7 +49,8 @@ function import_link($type) {
}
function
import_cron
()
{
$result
=
db_query
(
"SELECT * FROM feed WHERE timestamp + refresh < "
.
time
());
// $result = db_query("SELECT * FROM feed WHERE timestamp + refresh < ". time());
$result
=
db_query
(
"SELECT * FROM feed"
);
while
(
$feed
=
db_fetch_array
(
$result
))
{
import_refresh
(
$feed
);
}
...
...
@@ -215,9 +216,12 @@ function import_element_data($parser, $data) {
}
}
function
import_refresh
(
$feed
)
{
// unset the global variables before we use them:
unset
(
$GLOBALS
[
"channel"
],
$GLOBALS
[
"element"
],
$GLOBALS
[
"item"
],
$GLOBALS
[
"items"
],
$GLOBALS
[
"tag"
]);
// after we unset the variables, we can global them again:
global
$items
,
$channel
;
/*
...
...
@@ -239,9 +243,6 @@ function import_refresh($feed) {
}
fclose
(
$fp
);
// unset the global variables:
unset
(
$GLOBALS
[
"channel"
],
$GLOBAL
[
"element"
],
$GLOBALS
[
"item"
],
$GLOBAL
[
"items"
]);
// parse the data:
$xml_parser
=
xml_parser_create
();
xml_set_element_handler
(
$xml_parser
,
"import_element_start"
,
"import_element_end"
);
...
...
modules/import.module
View file @
9836201e
...
...
@@ -49,7 +49,8 @@ function import_link($type) {
}
function
import_cron
()
{
$result
=
db_query
(
"SELECT * FROM feed WHERE timestamp + refresh < "
.
time
());
// $result = db_query("SELECT * FROM feed WHERE timestamp + refresh < ". time());
$result
=
db_query
(
"SELECT * FROM feed"
);
while
(
$feed
=
db_fetch_array
(
$result
))
{
import_refresh
(
$feed
);
}
...
...
@@ -215,9 +216,12 @@ function import_element_data($parser, $data) {
}
}
function
import_refresh
(
$feed
)
{
// unset the global variables before we use them:
unset
(
$GLOBALS
[
"channel"
],
$GLOBALS
[
"element"
],
$GLOBALS
[
"item"
],
$GLOBALS
[
"items"
],
$GLOBALS
[
"tag"
]);
// after we unset the variables, we can global them again:
global
$items
,
$channel
;
/*
...
...
@@ -239,9 +243,6 @@ function import_refresh($feed) {
}
fclose
(
$fp
);
// unset the global variables:
unset
(
$GLOBALS
[
"channel"
],
$GLOBAL
[
"element"
],
$GLOBALS
[
"item"
],
$GLOBAL
[
"items"
]);
// parse the data:
$xml_parser
=
xml_parser_create
();
xml_set_element_handler
(
$xml_parser
,
"import_element_start"
,
"import_element_end"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment