Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
652fb347
Commit
652fb347
authored
Jan 19, 2004
by
Dries Buytaert
Browse files
- Removed instances of the 'throttle_enable' variable.
parent
37148276
Changes
5
Hide whitespace changes
Inline
Side-by-side
includes/module.inc
View file @
652fb347
...
...
@@ -59,7 +59,7 @@ function module_list($refresh = 0, $bootstrap = 0) {
** loaded based on server load. We have to directly access the
** throttle variables as the throttle.module may not be loaded yet.
*/
$throttle
=
(
variable_get
(
"throttle_enable"
,
0
)
&&
$module
->
throttle
&&
(
variable_get
(
"throttle_level"
,
0
)
>
=
5
)
);
$throttle
=
(
$module
->
throttle
&&
variable_get
(
"throttle_level"
,
0
)
>
4
);
if
(
$bootstrap
&&
!
$throttle
)
{
$list
[
$module
->
name
]
=
array
(
"name"
=>
$module
->
name
,
"bootstrap"
=>
$module
->
bootstrap
,
"filename"
=>
$module
->
filename
);
}
...
...
modules/block.module
View file @
652fb347
...
...
@@ -168,7 +168,7 @@ function block_admin_display() {
$delete
=
""
;
}
$rows
[]
=
array
(
$block
[
"info"
],
array
(
"data"
=>
form_checkbox
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][status"
,
1
,
$block
[
"status"
]),
"align"
=>
"center"
),
array
(
"data"
=>
form_checkbox
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][custom"
,
1
,
$block
[
"custom"
]),
"align"
=>
"center"
),
array
(
"data"
=>
form_checkbox
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][throttle"
,
1
,
$block
[
"throttle"
],
NULL
,
variable_ge
t
(
"
throttle
_enable"
,
0
)
?
NULL
:
array
(
"disabled"
=>
"disabled"
)),
"align"
=>
"center"
),
form_weight
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][weight"
,
$block
[
"weight"
]),
form_radios
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][region"
,
$block
[
"region"
],
array
(
t
(
"left"
),
t
(
"right"
))),
form_textfield
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][path"
,
$block
[
"path"
],
10
,
255
),
$rows
[]
=
array
(
$block
[
"info"
],
array
(
"data"
=>
form_checkbox
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][status"
,
1
,
$block
[
"status"
]),
"align"
=>
"center"
),
array
(
"data"
=>
form_checkbox
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][custom"
,
1
,
$block
[
"custom"
]),
"align"
=>
"center"
),
array
(
"data"
=>
form_checkbox
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][throttle"
,
1
,
$block
[
"throttle"
],
NULL
,
module_exis
t
(
'
throttle
'
)
?
NULL
:
array
(
"disabled"
=>
"disabled"
)),
"align"
=>
"center"
),
form_weight
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][weight"
,
$block
[
"weight"
]),
form_radios
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][region"
,
$block
[
"region"
],
array
(
t
(
"left"
),
t
(
"right"
))),
form_textfield
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][path"
,
$block
[
"path"
],
10
,
255
),
$edit
,
$delete
);
}
...
...
@@ -382,7 +382,7 @@ function block_list($region) {
** Check the current throttle status and see if block should be displayed
** based on server load.
*/
if
(
!
(
$block
[
'throttle'
]
&&
(
module_invoke
(
"throttle"
,
"status"
)
>
=
5
)))
{
if
(
!
(
$block
[
'throttle'
]
&&
(
module_invoke
(
"throttle"
,
"status"
)
>
4
)))
{
$block
=
array_merge
(
$block
,
module_invoke
(
$block
[
'module'
],
'block'
,
'view'
,
$block
[
'delta'
]));
}
if
(
isset
(
$block
[
'content'
])
&&
$block
[
'content'
])
{
...
...
modules/block/block.module
View file @
652fb347
...
...
@@ -168,7 +168,7 @@ function block_admin_display() {
$delete
=
""
;
}
$rows
[]
=
array
(
$block
[
"info"
],
array
(
"data"
=>
form_checkbox
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][status"
,
1
,
$block
[
"status"
]),
"align"
=>
"center"
),
array
(
"data"
=>
form_checkbox
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][custom"
,
1
,
$block
[
"custom"
]),
"align"
=>
"center"
),
array
(
"data"
=>
form_checkbox
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][throttle"
,
1
,
$block
[
"throttle"
],
NULL
,
variable_ge
t
(
"
throttle
_enable"
,
0
)
?
NULL
:
array
(
"disabled"
=>
"disabled"
)),
"align"
=>
"center"
),
form_weight
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][weight"
,
$block
[
"weight"
]),
form_radios
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][region"
,
$block
[
"region"
],
array
(
t
(
"left"
),
t
(
"right"
))),
form_textfield
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][path"
,
$block
[
"path"
],
10
,
255
),
$rows
[]
=
array
(
$block
[
"info"
],
array
(
"data"
=>
form_checkbox
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][status"
,
1
,
$block
[
"status"
]),
"align"
=>
"center"
),
array
(
"data"
=>
form_checkbox
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][custom"
,
1
,
$block
[
"custom"
]),
"align"
=>
"center"
),
array
(
"data"
=>
form_checkbox
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][throttle"
,
1
,
$block
[
"throttle"
],
NULL
,
module_exis
t
(
'
throttle
'
)
?
NULL
:
array
(
"disabled"
=>
"disabled"
)),
"align"
=>
"center"
),
form_weight
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][weight"
,
$block
[
"weight"
]),
form_radios
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][region"
,
$block
[
"region"
],
array
(
t
(
"left"
),
t
(
"right"
))),
form_textfield
(
NULL
,
$block
[
"module"
]
.
"]["
.
$block
[
"delta"
]
.
"][path"
,
$block
[
"path"
],
10
,
255
),
$edit
,
$delete
);
}
...
...
@@ -382,7 +382,7 @@ function block_list($region) {
** Check the current throttle status and see if block should be displayed
** based on server load.
*/
if
(
!
(
$block
[
'throttle'
]
&&
(
module_invoke
(
"throttle"
,
"status"
)
>
=
5
)))
{
if
(
!
(
$block
[
'throttle'
]
&&
(
module_invoke
(
"throttle"
,
"status"
)
>
4
)))
{
$block
=
array_merge
(
$block
,
module_invoke
(
$block
[
'module'
],
'block'
,
'view'
,
$block
[
'delta'
]));
}
if
(
isset
(
$block
[
'content'
])
&&
$block
[
'content'
])
{
...
...
modules/system.module
View file @
652fb347
...
...
@@ -289,7 +289,7 @@ function system_listing($type) {
$row
=
array
(
$info
->
name
,
$info
->
description
,
array
(
"data"
=>
(
in_array
(
$filename
,
$required
)
?
form_hidden
(
"status][
$filename
"
,
1
)
.
t
(
"required"
)
:
form_checkbox
(
""
,
"status][
$filename
"
,
1
,
$file
->
status
)),
"align"
=>
"center"
));
if
(
$type
==
"module"
)
{
$row
[]
=
array
(
"data"
=>
(
in_array
(
$filename
,
$throttle_required
)
?
form_hidden
(
"throttle][
$filename
"
,
0
)
.
t
(
"required"
)
:
form_checkbox
(
NULL
,
"throttle][
$filename
"
,
1
,
$file
->
throttle
,
NULL
,
variable_ge
t
(
"
throttle
_enable"
,
0
)
?
NULL
:
array
(
"disabled"
=>
"disabled"
))),
"align"
=>
"center"
);
$row
[]
=
array
(
"data"
=>
(
in_array
(
$filename
,
$throttle_required
)
?
form_hidden
(
"throttle][
$filename
"
,
0
)
.
t
(
"required"
)
:
form_checkbox
(
NULL
,
"throttle][
$filename
"
,
1
,
$file
->
throttle
,
NULL
,
module_exis
t
(
'
throttle
'
)
?
NULL
:
array
(
"disabled"
=>
"disabled"
))),
"align"
=>
"center"
);
}
else
if
(
$type
==
"theme"
)
{
$row
[]
=
array
(
"data"
=>
form_radio
(
""
,
"theme_default"
,
$info
->
name
,
(
variable_get
(
"theme_default"
,
0
)
==
$info
->
name
)
?
1
:
0
),
"align"
=>
"center"
);
...
...
modules/system/system.module
View file @
652fb347
...
...
@@ -289,7 +289,7 @@ function system_listing($type) {
$row
=
array
(
$info
->
name
,
$info
->
description
,
array
(
"data"
=>
(
in_array
(
$filename
,
$required
)
?
form_hidden
(
"status][
$filename
"
,
1
)
.
t
(
"required"
)
:
form_checkbox
(
""
,
"status][
$filename
"
,
1
,
$file
->
status
)),
"align"
=>
"center"
));
if
(
$type
==
"module"
)
{
$row
[]
=
array
(
"data"
=>
(
in_array
(
$filename
,
$throttle_required
)
?
form_hidden
(
"throttle][
$filename
"
,
0
)
.
t
(
"required"
)
:
form_checkbox
(
NULL
,
"throttle][
$filename
"
,
1
,
$file
->
throttle
,
NULL
,
variable_ge
t
(
"
throttle
_enable"
,
0
)
?
NULL
:
array
(
"disabled"
=>
"disabled"
))),
"align"
=>
"center"
);
$row
[]
=
array
(
"data"
=>
(
in_array
(
$filename
,
$throttle_required
)
?
form_hidden
(
"throttle][
$filename
"
,
0
)
.
t
(
"required"
)
:
form_checkbox
(
NULL
,
"throttle][
$filename
"
,
1
,
$file
->
throttle
,
NULL
,
module_exis
t
(
'
throttle
'
)
?
NULL
:
array
(
"disabled"
=>
"disabled"
))),
"align"
=>
"center"
);
}
else
if
(
$type
==
"theme"
)
{
$row
[]
=
array
(
"data"
=>
form_radio
(
""
,
"theme_default"
,
$info
->
name
,
(
variable_get
(
"theme_default"
,
0
)
==
$info
->
name
)
?
1
:
0
),
"align"
=>
"center"
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment