Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
d2c08ebd
Commit
d2c08ebd
authored
Jan 13, 2011
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#1016458
by Jody Lynn: code style cleanup of aggregator.module.
parent
0f9cda30
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/aggregator/aggregator.module
+13
-12
13 additions, 12 deletions
modules/aggregator/aggregator.module
with
13 additions
and
12 deletions
modules/aggregator/aggregator.module
+
13
−
12
View file @
d2c08ebd
...
...
@@ -195,7 +195,6 @@ function aggregator_menu() {
'title arguments'
=>
array
(
2
),
'page callback'
=>
'aggregator_page_category'
,
'page arguments'
=>
array
(
2
),
'access callback'
=>
'user_access'
,
'access arguments'
=>
array
(
'access news feeds'
),
'file'
=>
'aggregator.pages.inc'
,
);
...
...
@@ -268,7 +267,7 @@ function aggregator_menu() {
}
/**
*
Menu
callback.
*
Title
callback
for aggregatory category pages
.
*
* @return
* An aggregator category title.
...
...
@@ -281,7 +280,8 @@ function _aggregator_category_title($category) {
* Find out whether there are any aggregator categories.
*
* @return
* TRUE if there is at least one category and the user has access to them, FALSE otherwise.
* TRUE if there is at least one category and the user has access to them, FALSE
* otherwise.
*/
function
_aggregator_has_categories
()
{
return
user_access
(
'access news feeds'
)
&&
db_query
(
'SELECT COUNT(*) FROM {aggregator_category}'
)
->
fetchField
();
...
...
@@ -307,7 +307,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
));
...
...
@@ -344,16 +344,16 @@ function aggregator_cron_queue_info() {
* Implements hook_block_info().
*/
function
aggregator_block_info
()
{
$block
=
array
();
$block
s
=
array
();
$result
=
db_query
(
'SELECT cid, title FROM {aggregator_category} ORDER BY title'
);
foreach
(
$result
as
$category
)
{
$block
[
'category-'
.
$category
->
cid
][
'info'
]
=
t
(
'!title category latest items'
,
array
(
'!title'
=>
$category
->
title
));
$block
s
[
'category-'
.
$category
->
cid
][
'info'
]
=
t
(
'!title category latest items'
,
array
(
'!title'
=>
$category
->
title
));
}
$result
=
db_query
(
'SELECT fid, title FROM {aggregator_feed} WHERE block <> 0 ORDER BY fid'
);
foreach
(
$result
as
$feed
)
{
$block
[
'feed-'
.
$feed
->
fid
][
'info'
]
=
t
(
'!title feed latest items'
,
array
(
'!title'
=>
$feed
->
title
));
$block
s
[
'feed-'
.
$feed
->
fid
][
'info'
]
=
t
(
'!title feed latest items'
,
array
(
'!title'
=>
$feed
->
title
));
}
return
$block
;
return
$block
s
;
}
/**
...
...
@@ -367,7 +367,7 @@ function aggregator_block_configure($delta = '') {
'#type'
=>
'select'
,
'#title'
=>
t
(
'Number of news items in block'
),
'#default_value'
=>
$value
,
'#options'
=>
drupal_map_assoc
(
array
(
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
))
'#options'
=>
drupal_map_assoc
(
range
(
2
,
20
))
,
);
return
$form
;
}
...
...
@@ -720,7 +720,8 @@ function aggregator_filter_xss($value) {
/**
* Check and sanitize aggregator configuration.
*
* Goes through all fetchers, parsers and processors and checks whether they are available.
* Goes through all fetchers, parsers and processors and checks whether they are
* available.
* If one is missing resets to standard configuration.
*
* @return
...
...
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