Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
222
Merge Requests
222
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
45acc5a4
Commit
45acc5a4
authored
Sep 24, 2010
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#921098
by munzirtaha: !is_null() should be replaced by isset() because it's faster.
parent
e0032eee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
includes/file.inc
includes/file.inc
+1
-1
modules/field/field.crud.inc
modules/field/field.crud.inc
+2
-2
modules/system/system.admin.inc
modules/system/system.admin.inc
+1
-1
No files found.
includes/file.inc
View file @
45acc5a4
...
...
@@ -1296,7 +1296,7 @@ function file_space_used($uid = NULL, $status = FILE_STATUS_PERMANENT) {
$query
=
db_select
(
'file_managed'
,
'f'
);
$query
->
condition
(
'f.status'
,
$status
);
$query
->
addExpression
(
'SUM(f.filesize)'
,
'filesize'
);
if
(
!
is_null
(
$uid
))
{
if
(
isset
(
$uid
))
{
$query
->
condition
(
'f.uid'
,
$uid
);
}
return
$query
->
execute
()
->
fetchField
();
...
...
modules/field/field.crud.inc
View file @
45acc5a4
...
...
@@ -762,7 +762,7 @@ function _field_write_instance($instance, $update = FALSE) {
// If no weight specified, make sure the field sinks at the bottom.
if
(
!
isset
(
$instance
[
'widget'
][
'weight'
]))
{
$max_weight
=
field_info_max_weight
(
$instance
[
'entity_type'
],
$instance
[
'bundle'
],
'form'
);
$instance
[
'widget'
][
'weight'
]
=
!
is_null
(
$max_weight
)
?
$max_weight
+
1
:
0
;
$instance
[
'widget'
][
'weight'
]
=
isset
(
$max_weight
)
?
$max_weight
+
1
:
0
;
}
// Check widget module.
$widget_type
=
field_info_widget_types
(
$instance
[
'widget'
][
'type'
]);
...
...
@@ -788,7 +788,7 @@ function _field_write_instance($instance, $update = FALSE) {
// If no weight specified, make sure the field sinks at the bottom.
if
(
!
isset
(
$display
[
'weight'
]))
{
$max_weight
=
field_info_max_weight
(
$instance
[
'entity_type'
],
$instance
[
'bundle'
],
$view_mode
);
$display
[
'weight'
]
=
!
is_null
(
$max_weight
)
?
$max_weight
+
1
:
0
;
$display
[
'weight'
]
=
isset
(
$max_weight
)
?
$max_weight
+
1
:
0
;
}
$instance
[
'display'
][
$view_mode
]
=
$display
;
}
...
...
modules/system/system.admin.inc
View file @
45acc5a4
...
...
@@ -639,7 +639,7 @@ function system_theme_settings($form, &$form_state, $key = '') {
}
// Restore the original current theme.
if
(
!
is_null
(
$default_theme
))
{
if
(
isset
(
$default_theme
))
{
$GLOBALS
[
'theme_key'
]
=
$default_theme
;
}
else
{
...
...
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