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
dca92900
Commit
dca92900
authored
Jul 24, 2010
by
Dries
Browse files
- Patch
#850152
by kiamlaluno: use 'elseif' in place of 'else if'.
parent
de9d0049
Changes
15
Hide whitespace changes
Inline
Side-by-side
includes/bootstrap.inc
View file @
dca92900
...
...
@@ -2181,7 +2181,7 @@ function _drupal_bootstrap_database() {
if
(
!
isset
(
$value
[
'prefix'
]))
{
$current_prefix
=
''
;
}
else
if
(
is_array
(
$value
[
'prefix'
]))
{
elseif
(
is_array
(
$value
[
'prefix'
]))
{
$current_prefix
=
$value
[
'prefix'
][
'default'
];
}
else
{
...
...
includes/common.inc
View file @
dca92900
...
...
@@ -5825,7 +5825,7 @@ function drupal_get_schema_unprocessed($module, $table = NULL) {
if
(
!
is_null
(
$table
)
&&
isset
(
$schema
[
$table
]))
{
return
$schema
[
$table
];
}
else
if
(
!
empty
(
$schema
))
{
elseif
(
!
empty
(
$schema
))
{
return
$schema
;
}
return
array
();
...
...
includes/database/database.inc
View file @
dca92900
...
...
@@ -1341,7 +1341,7 @@ final public static function parseConnectionInfo() {
'default'
=>
''
,
);
}
else
if
(
!
is_array
(
$database_info
[
$index
][
$target
][
'prefix'
]))
{
elseif
(
!
is_array
(
$database_info
[
$index
][
$target
][
'prefix'
]))
{
// Transform the flat form into an array form.
$database_info
[
$index
][
$target
][
'prefix'
]
=
array
(
'default'
=>
$database_info
[
$index
][
$target
][
'prefix'
],
...
...
includes/path.inc
View file @
dca92900
...
...
@@ -112,7 +112,7 @@ function drupal_lookup_path($action, $path = '', $path_language = NULL) {
return
FALSE
;
}
// For system paths which were not cached, query aliases individually.
else
if
(
!
isset
(
$cache
[
'no_aliases'
][
$path_language
][
$path
]))
{
elseif
(
!
isset
(
$cache
[
'no_aliases'
][
$path_language
][
$path
]))
{
// Get the most fitting result falling back with alias without language
$alias
=
db_query
(
"SELECT alias FROM
{
url_alias
}
WHERE source = :source AND language IN (:language, :language_none) ORDER BY language DESC, pid DESC"
,
array
(
':source'
=>
$path
,
...
...
includes/utility.inc
View file @
dca92900
...
...
@@ -31,10 +31,10 @@ function drupal_var_export($var, $prefix = '') {
$output
.
=
')'
;
}
}
else
if
(
is_bool
(
$var
))
{
elseif
(
is_bool
(
$var
))
{
$output
=
$var
?
'TRUE'
:
'FALSE'
;
}
else
if
(
is_string
(
$var
))
{
elseif
(
is_string
(
$var
))
{
$line_safe_var
=
str_replace
(
"
\n
"
,
'\n'
,
$var
);
if
(
strpos
(
$var
,
"
\n
"
)
!==
FALSE
||
strpos
(
$var
,
"'"
)
!==
FALSE
)
{
// If the string contains a line break or a single quote, use the
...
...
modules/blog/blog.module
View file @
dca92900
...
...
@@ -151,7 +151,7 @@ function blog_menu_local_tasks_alter(&$data, $router_item, $root_path) {
}
}
// Provide a helper action link to the author on the 'blog/%' page.
else
if
(
$root_path
==
'blog/%'
&&
$router_item
[
'page_arguments'
][
0
]
->
uid
==
$user
->
uid
)
{
elseif
(
$root_path
==
'blog/%'
&&
$router_item
[
'page_arguments'
][
0
]
->
uid
==
$user
->
uid
)
{
$data
[
'actions'
][
'output'
][
'blog'
]
=
array
(
'#theme'
=>
'menu_local_action'
,
);
...
...
modules/comment/comment.admin.inc
View file @
dca92900
...
...
@@ -168,7 +168,7 @@ function comment_admin_overview_submit($form, &$form_state) {
if
(
$operation
==
'unpublish'
)
{
$comment
->
status
=
COMMENT_NOT_PUBLISHED
;
}
else
if
(
$operation
==
'publish'
)
{
elseif
(
$operation
==
'publish'
)
{
$comment
->
status
=
COMMENT_PUBLISHED
;
}
comment_save
(
$comment
);
...
...
modules/contextual/contextual.module
View file @
dca92900
...
...
@@ -78,7 +78,7 @@ function contextual_preprocess(&$variables, $hook) {
$keys
=
array_keys
(
$hooks
[
$hook
][
'variables'
]);
$key
=
$keys
[
0
];
}
else
if
(
!
empty
(
$hooks
[
$hook
][
'render element'
]))
{
elseif
(
!
empty
(
$hooks
[
$hook
][
'render element'
]))
{
$key
=
$hooks
[
$hook
][
'render element'
];
}
if
(
!
empty
(
$key
)
&&
isset
(
$variables
[
$key
]))
{
...
...
modules/forum/forum.module
View file @
dca92900
...
...
@@ -761,7 +761,7 @@ function forum_forum_load($tid = NULL) {
}
}
// If $tid is 0, create an empty object to hold the child terms.
else
if
(
$tid
===
0
)
{
elseif
(
$tid
===
0
)
{
$forum_term
=
(
object
)
array
(
'tid'
=>
0
,
);
...
...
modules/overlay/overlay.module
View file @
dca92900
...
...
@@ -92,7 +92,7 @@ function overlay_init() {
unset
(
$_GET
[
'render'
]);
}
// Do not enable the overlay if we already are on an admin page.
else
if
(
!
path_is_admin
(
$current_path
))
{
elseif
(
!
path_is_admin
(
$current_path
))
{
// Otherwise add overlay parent code and our behavior.
overlay_set_mode
(
'parent'
);
}
...
...
modules/simpletest/simpletest.pages.inc
View file @
dca92900
...
...
@@ -344,7 +344,7 @@ function simpletest_result_form_submit($form, &$form_state) {
if
(
$form_state
[
'values'
][
'filter'
]
==
'all'
)
{
$classes
=
array_merge
(
$pass
,
$fail
);
}
else
if
(
$form_state
[
'values'
][
'filter'
]
==
'pass'
)
{
elseif
(
$form_state
[
'values'
][
'filter'
]
==
'pass'
)
{
$classes
=
$pass
;
}
else
{
...
...
modules/simpletest/tests/file_test.module
View file @
dca92900
...
...
@@ -113,7 +113,7 @@ function _file_test_form_submit(&$form, &$form_state) {
if
(
$form_state
[
'values'
][
'allow_all_extensions'
])
{
$validators
[
'file_validate_extensions'
]
=
array
();
}
else
if
(
!
empty
(
$form_state
[
'values'
][
'extensions'
]))
{
elseif
(
!
empty
(
$form_state
[
'values'
][
'extensions'
]))
{
$validators
[
'file_validate_extensions'
]
=
array
(
$form_state
[
'values'
][
'extensions'
]);
}
...
...
modules/simpletest/tests/system_test.module
View file @
dca92900
...
...
@@ -263,11 +263,11 @@ function system_test_page_build(&$page) {
$page
[
'footer'
]
=
drupal_set_page_content
();
$page
[
'footer'
][
'main'
][
'#markup'
]
=
'<div id="system-test-content">'
.
$page
[
'footer'
][
'main'
][
'#markup'
]
.
'</div>'
;
}
else
if
(
$menu_item
[
'path'
]
==
'system-test/main-content-fallback'
)
{
elseif
(
$menu_item
[
'path'
]
==
'system-test/main-content-fallback'
)
{
drupal_set_page_content
();
$main_content_display
=
FALSE
;
}
else
if
(
$menu_item
[
'path'
]
==
'system-test/main-content-duplication'
)
{
elseif
(
$menu_item
[
'path'
]
==
'system-test/main-content-duplication'
)
{
drupal_set_page_content
();
}
}
...
...
modules/system/system.tar.inc
View file @
dca92900
...
...
@@ -146,7 +146,7 @@ function __construct($p_tarname, $p_compress = null)
if
(
$this
->
_compress
)
{
// assert zlib or bz2 extension support
if
(
$this
->
_compress_type
==
'gz'
)
$extname
=
'zlib'
;
else
if
(
$this
->
_compress_type
==
'bz2'
)
elseif
(
$this
->
_compress_type
==
'bz2'
)
$extname
=
'bz2'
;
if
(
!
extension_loaded
(
$extname
))
{
...
...
@@ -650,9 +650,9 @@ function _openWrite()
{
if
(
$this
->
_compress_type
==
'gz'
)
$this
->
_file
=
@
gzopen
(
$this
->
_tarname
,
"wb9"
);
else
if
(
$this
->
_compress_type
==
'bz2'
)
elseif
(
$this
->
_compress_type
==
'bz2'
)
$this
->
_file
=
@
bzopen
(
$this
->
_tarname
,
"w"
);
else
if
(
$this
->
_compress_type
==
'none'
)
elseif
(
$this
->
_compress_type
==
'none'
)
$this
->
_file
=
@
fopen
(
$this
->
_tarname
,
"wb"
);
else
$this
->
_error
(
'Unknown or missing compression type ('
...
...
@@ -703,9 +703,9 @@ function _openRead()
if
(
$this
->
_compress_type
==
'gz'
)
$this
->
_file
=
@
gzopen
(
$v_filename
,
"rb"
);
else
if
(
$this
->
_compress_type
==
'bz2'
)
elseif
(
$this
->
_compress_type
==
'bz2'
)
$this
->
_file
=
@
bzopen
(
$v_filename
,
"r"
);
else
if
(
$this
->
_compress_type
==
'none'
)
elseif
(
$this
->
_compress_type
==
'none'
)
$this
->
_file
=
@
fopen
(
$v_filename
,
"rb"
);
else
$this
->
_error
(
'Unknown or missing compression type ('
...
...
@@ -752,9 +752,9 @@ function _close()
if
(
is_resource
(
$this
->
_file
))
{
if
(
$this
->
_compress_type
==
'gz'
)
@
gzclose
(
$this
->
_file
);
else
if
(
$this
->
_compress_type
==
'bz2'
)
elseif
(
$this
->
_compress_type
==
'bz2'
)
@
bzclose
(
$this
->
_file
);
else
if
(
$this
->
_compress_type
==
'none'
)
elseif
(
$this
->
_compress_type
==
'none'
)
@
fclose
(
$this
->
_file
);
else
$this
->
_error
(
'Unknown or missing compression type ('
...
...
@@ -801,9 +801,9 @@ function _writeBlock($p_binary_data, $p_len=null)
if
(
$p_len
===
null
)
{
if
(
$this
->
_compress_type
==
'gz'
)
@
gzputs
(
$this
->
_file
,
$p_binary_data
);
else
if
(
$this
->
_compress_type
==
'bz2'
)
elseif
(
$this
->
_compress_type
==
'bz2'
)
@
bzwrite
(
$this
->
_file
,
$p_binary_data
);
else
if
(
$this
->
_compress_type
==
'none'
)
elseif
(
$this
->
_compress_type
==
'none'
)
@
fputs
(
$this
->
_file
,
$p_binary_data
);
else
$this
->
_error
(
'Unknown or missing compression type ('
...
...
@@ -811,9 +811,9 @@ function _writeBlock($p_binary_data, $p_len=null)
}
else
{
if
(
$this
->
_compress_type
==
'gz'
)
@
gzputs
(
$this
->
_file
,
$p_binary_data
,
$p_len
);
else
if
(
$this
->
_compress_type
==
'bz2'
)
elseif
(
$this
->
_compress_type
==
'bz2'
)
@
bzwrite
(
$this
->
_file
,
$p_binary_data
,
$p_len
);
else
if
(
$this
->
_compress_type
==
'none'
)
elseif
(
$this
->
_compress_type
==
'none'
)
@
fputs
(
$this
->
_file
,
$p_binary_data
,
$p_len
);
else
$this
->
_error
(
'Unknown or missing compression type ('
...
...
@@ -832,9 +832,9 @@ function _readBlock()
if
(
is_resource
(
$this
->
_file
))
{
if
(
$this
->
_compress_type
==
'gz'
)
$v_block
=
@
gzread
(
$this
->
_file
,
512
);
else
if
(
$this
->
_compress_type
==
'bz2'
)
elseif
(
$this
->
_compress_type
==
'bz2'
)
$v_block
=
@
bzread
(
$this
->
_file
,
512
);
else
if
(
$this
->
_compress_type
==
'none'
)
elseif
(
$this
->
_compress_type
==
'none'
)
$v_block
=
@
fread
(
$this
->
_file
,
512
);
else
$this
->
_error
(
'Unknown or missing compression type ('
...
...
@@ -854,11 +854,11 @@ function _jumpBlock($p_len=null)
if
(
$this
->
_compress_type
==
'gz'
)
{
@
gzseek
(
$this
->
_file
,
gztell
(
$this
->
_file
)
+
(
$p_len
*
512
));
}
else
if
(
$this
->
_compress_type
==
'bz2'
)
{
elseif
(
$this
->
_compress_type
==
'bz2'
)
{
// ----- Replace missing bztell() and bzseek()
for
(
$i
=
0
;
$i
<
$p_len
;
$i
++
)
$this
->
_readBlock
();
}
else
if
(
$this
->
_compress_type
==
'none'
)
}
elseif
(
$this
->
_compress_type
==
'none'
)
@
fseek
(
$this
->
_file
,
ftell
(
$this
->
_file
)
+
(
$p_len
*
512
));
else
$this
->
_error
(
'Unknown or missing compression type ('
...
...
@@ -1834,11 +1834,11 @@ function _pathReduction($p_dir)
// ----- Ignore this directory
// Should be the first $i=0, but no check is done
}
else
if
(
$v_list
[
$i
]
==
".."
)
{
elseif
(
$v_list
[
$i
]
==
".."
)
{
// ----- Ignore it and ignore the $i-1
$i
--
;
}
else
if
(
(
$v_list
[
$i
]
==
''
)
elseif
(
(
$v_list
[
$i
]
==
''
)
&&
(
$i
!=
(
sizeof
(
$v_list
)
-
1
))
&&
(
$i
!=
0
))
{
// ----- Ignore only the double '//' in path,
...
...
modules/user/user.module
View file @
dca92900
...
...
@@ -3201,7 +3201,7 @@ function user_build_filter_query(SelectQuery $query) {
$permission_alias
=
$query
->
join
(
'role_permission'
,
'p'
,
$user_role_alias
.
'.rid = %alias.rid'
);
$query
->
condition
(
$permission_alias
.
'.permission'
,
$value
);
}
else
if
(
$key
==
'role'
)
{
elseif
(
$key
==
'role'
)
{
$user_roles_alias
=
$query
->
join
(
'users_roles'
,
'ur'
,
'%alias.uid = u.uid'
);
$query
->
condition
(
$user_role_alias
.
'.rid'
,
$value
);
}
...
...
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