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
013b73e6
Commit
013b73e6
authored
Sep 08, 2005
by
Dries Buytaert
Browse files
- Patch
#30122
by m3verick: changed include_once()'s to include "./$file"
for performance's sake.
parent
451dbd17
Changes
13
Hide whitespace changes
Inline
Side-by-side
cron.php
View file @
013b73e6
...
...
@@ -6,7 +6,7 @@
* Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).
*/
include_once
'includes/bootstrap.inc'
;
include_once
'
./
includes/bootstrap.inc'
;
drupal_bootstrap
(
DRUPAL_BOOTSTRAP_FULL
);
// If not in 'safe mode', increase the maximum execution time:
...
...
database/updates.inc
View file @
013b73e6
...
...
@@ -545,7 +545,7 @@ function update_132() {
/**
* Wipe the search index
*/
include_once
(
'
modules/search.module'
)
;
include_once
'./
modules/search.module'
;
search_wipe
();
}
...
...
includes/bootstrap.inc
View file @
013b73e6
...
...
@@ -460,7 +460,7 @@ function drupal_load($type, $name) {
$filename
=
drupal_get_filename
(
$type
,
$name
);
if
(
$filename
)
{
include_once
(
$filename
)
;
include_once
"./
$filename
"
;
$files
[
$type
][
$name
]
=
TRUE
;
return
TRUE
;
...
...
includes/database.inc
View file @
013b73e6
...
...
@@ -110,10 +110,10 @@ function db_set_active($name = 'default') {
}
$db_type
=
substr
(
$connect_url
,
0
,
strpos
(
$connect_url
,
'://'
));
$handler
=
"includes/database.
$db_type
.inc"
;
$handler
=
"
./
includes/database.
$db_type
.inc"
;
if
(
is_file
(
$handler
))
{
include_once
(
$handler
)
;
include_once
$handler
;
}
else
{
drupal_maintenance_theme
();
...
...
includes/image.inc
View file @
013b73e6
...
...
@@ -11,7 +11,7 @@ function image_get_available_toolkits() {
$output
=
array
();
foreach
(
$toolkits
as
$file
=>
$toolkit
)
{
include_once
(
$file
)
;
include_once
"./
$file
"
;
$function
=
str_replace
(
'.'
,
'_'
,
$toolkit
->
name
)
.
'_info'
;
if
(
function_exists
(
$function
))
{
$info
=
$function
();
...
...
@@ -31,7 +31,7 @@ function image_get_toolkit() {
static
$toolkit
;
if
(
!
$toolkit
)
{
$toolkit
=
variable_get
(
'image_toolkit'
,
'gd'
);
$toolkit_file
=
'includes/image.'
.
$toolkit
.
'.inc'
;
$toolkit_file
=
'
./
includes/image.'
.
$toolkit
.
'.inc'
;
if
(
$toolkit
!=
'gd'
&&
file_exists
(
$toolkit_file
))
{
include_once
$toolkit_file
;
}
...
...
includes/theme.inc
View file @
013b73e6
...
...
@@ -68,11 +68,11 @@ function init_theme() {
if
(
strpos
(
$themes
[
$theme
]
->
filename
,
'.theme'
))
{
// file is a theme; include it
include_once
(
$themes
[
$theme
]
->
filename
)
;
include_once
'./'
.
$themes
[
$theme
]
->
filename
;
}
elseif
(
strpos
(
$themes
[
$theme
]
->
description
,
'.engine'
))
{
// file is a template; include its engine
include_once
(
$themes
[
$theme
]
->
description
)
;
include_once
'./'
.
$themes
[
$theme
]
->
description
;
$theme_engine
=
basename
(
$themes
[
$theme
]
->
description
,
'.engine'
);
if
(
function_exists
(
$theme_engine
.
'_init'
))
{
call_user_func
(
$theme_engine
.
'_init'
,
$themes
[
$theme
]);
...
...
modules/locale.module
View file @
013b73e6
...
...
@@ -258,7 +258,7 @@ function locale_get_plural($count) {
* Page handler for the language management screen
*/
function
locale_admin_manage
()
{
include_once
'includes/locale.inc'
;
include_once
'
./
includes/locale.inc'
;
$edit
=
&
$_POST
[
'edit'
];
if
(
$_POST
[
'op'
]
==
t
(
'Save configuration'
))
{
...
...
@@ -290,7 +290,7 @@ function locale_admin_manage() {
* User interface for the language deletion confirmation screen
*/
function
locale_admin_manage_delete_screen
()
{
include_once
'includes/locale.inc'
;
include_once
'
./
includes/locale.inc'
;
$langcode
=
arg
(
4
);
$edit
=
$_POST
[
'edit'
];
...
...
@@ -334,7 +334,7 @@ function locale_admin_manage_delete_screen() {
* Page handler for the language addition screen
*/
function
locale_admin_manage_add
()
{
include_once
'includes/locale.inc'
;
include_once
'
./
includes/locale.inc'
;
$edit
=
&
$_POST
[
'edit'
];
$isocodes
=
_locale_get_iso639_list
();
...
...
@@ -374,7 +374,7 @@ function locale_admin_manage_add() {
* Page handler for the translation import screen
*/
function
locale_admin_import
()
{
include_once
'includes/locale.inc'
;
include_once
'
./
includes/locale.inc'
;
$edit
=
&
$_POST
[
'edit'
];
switch
(
$_POST
[
'op'
])
{
case
t
(
'Import'
)
:
...
...
@@ -408,7 +408,7 @@ function locale_admin_import() {
* Page handler for the translation export screen
*/
function
locale_admin_export
()
{
include_once
'includes/locale.inc'
;
include_once
'
./
includes/locale.inc'
;
switch
(
$_POST
[
'op'
])
{
case
t
(
'Export'
)
:
_locale_export_po
(
$_POST
[
'edit'
][
'langcode'
]);
...
...
@@ -425,7 +425,7 @@ function locale_admin_export() {
* Page handler for the string search and administration screen
*/
function
locale_admin_string
()
{
include_once
'includes/locale.inc'
;
include_once
'
./
includes/locale.inc'
;
$op
=
(
$_POST
[
'op'
]
?
$_POST
[
'op'
]
:
arg
(
3
));
$edit
=&
$_POST
[
'edit'
];
...
...
modules/locale/locale.module
View file @
013b73e6
...
...
@@ -258,7 +258,7 @@ function locale_get_plural($count) {
* Page handler for the language management screen
*/
function
locale_admin_manage
()
{
include_once
'includes/locale.inc'
;
include_once
'
./
includes/locale.inc'
;
$edit
=
&
$_POST
[
'edit'
];
if
(
$_POST
[
'op'
]
==
t
(
'Save configuration'
))
{
...
...
@@ -290,7 +290,7 @@ function locale_admin_manage() {
* User interface for the language deletion confirmation screen
*/
function
locale_admin_manage_delete_screen
()
{
include_once
'includes/locale.inc'
;
include_once
'
./
includes/locale.inc'
;
$langcode
=
arg
(
4
);
$edit
=
$_POST
[
'edit'
];
...
...
@@ -334,7 +334,7 @@ function locale_admin_manage_delete_screen() {
* Page handler for the language addition screen
*/
function
locale_admin_manage_add
()
{
include_once
'includes/locale.inc'
;
include_once
'
./
includes/locale.inc'
;
$edit
=
&
$_POST
[
'edit'
];
$isocodes
=
_locale_get_iso639_list
();
...
...
@@ -374,7 +374,7 @@ function locale_admin_manage_add() {
* Page handler for the translation import screen
*/
function
locale_admin_import
()
{
include_once
'includes/locale.inc'
;
include_once
'
./
includes/locale.inc'
;
$edit
=
&
$_POST
[
'edit'
];
switch
(
$_POST
[
'op'
])
{
case
t
(
'Import'
)
:
...
...
@@ -408,7 +408,7 @@ function locale_admin_import() {
* Page handler for the translation export screen
*/
function
locale_admin_export
()
{
include_once
'includes/locale.inc'
;
include_once
'
./
includes/locale.inc'
;
switch
(
$_POST
[
'op'
])
{
case
t
(
'Export'
)
:
_locale_export_po
(
$_POST
[
'edit'
][
'langcode'
]);
...
...
@@ -425,7 +425,7 @@ function locale_admin_export() {
* Page handler for the string search and administration screen
*/
function
locale_admin_string
()
{
include_once
'includes/locale.inc'
;
include_once
'
./
includes/locale.inc'
;
$op
=
(
$_POST
[
'op'
]
?
$_POST
[
'op'
]
:
arg
(
3
));
$edit
=&
$_POST
[
'edit'
];
...
...
modules/system.module
View file @
013b73e6
...
...
@@ -392,13 +392,13 @@ function system_region_list($theme_key) {
return
$list
[
$theme_key
];
}
if
(
file_exists
(
$file
=
dirname
(
$theme
->
filename
)
.
'/'
.
$theme_key
.
'.theme'
))
{
include_once
(
$file
)
;
include_once
"./
$file
"
;
}
$regions
=
function_exists
(
$theme_key
.
'_regions'
)
?
call_user_func
(
$theme_key
.
'_regions'
)
:
array
();
if
(
strpos
(
$theme
->
description
,
'.engine'
))
{
// File is a template; include its engine's regions.
include_once
(
$theme
->
description
)
;
include_once
'./'
.
$theme
->
description
;
$theme_engine
=
basename
(
$theme
->
description
,
'.engine'
);
$engine_regions
=
function_exists
(
$theme_engine
.
'_regions'
)
?
call_user_func
(
$theme_engine
.
'_regions'
)
:
array
();
$regions
=
array_merge
(
$engine_regions
,
$regions
);
...
...
modules/system/system.module
View file @
013b73e6
...
...
@@ -392,13 +392,13 @@ function system_region_list($theme_key) {
return
$list
[
$theme_key
];
}
if
(
file_exists
(
$file
=
dirname
(
$theme
->
filename
)
.
'/'
.
$theme_key
.
'.theme'
))
{
include_once
(
$file
)
;
include_once
"./
$file
"
;
}
$regions
=
function_exists
(
$theme_key
.
'_regions'
)
?
call_user_func
(
$theme_key
.
'_regions'
)
:
array
();
if
(
strpos
(
$theme
->
description
,
'.engine'
))
{
// File is a template; include its engine's regions.
include_once
(
$theme
->
description
)
;
include_once
'./'
.
$theme
->
description
;
$theme_engine
=
basename
(
$theme
->
description
,
'.engine'
);
$engine_regions
=
function_exists
(
$theme_engine
.
'_regions'
)
?
call_user_func
(
$theme_engine
.
'_regions'
)
:
array
();
$regions
=
array_merge
(
$engine_regions
,
$regions
);
...
...
modules/user.module
View file @
013b73e6
...
...
@@ -370,7 +370,7 @@ function user_is_blocked($name) {
*/
function
user_mail
(
$mail
,
$subject
,
$message
,
$header
)
{
if
(
variable_get
(
'smtp_library'
,
''
)
&&
file_exists
(
variable_get
(
'smtp_library'
,
''
)))
{
include_once
variable_get
(
'smtp_library'
,
''
);
include_once
'./'
.
variable_get
(
'smtp_library'
,
''
);
return
user_mail_wrapper
(
$mail
,
$subject
,
$message
,
$header
);
}
else
{
...
...
modules/user/user.module
View file @
013b73e6
...
...
@@ -370,7 +370,7 @@ function user_is_blocked($name) {
*/
function
user_mail
(
$mail
,
$subject
,
$message
,
$header
)
{
if
(
variable_get
(
'smtp_library'
,
''
)
&&
file_exists
(
variable_get
(
'smtp_library'
,
''
)))
{
include_once
variable_get
(
'smtp_library'
,
''
);
include_once
'./'
.
variable_get
(
'smtp_library'
,
''
);
return
user_mail_wrapper
(
$mail
,
$subject
,
$message
,
$header
);
}
else
{
...
...
themes/engines/phptemplate/phptemplate.engine
View file @
013b73e6
...
...
@@ -9,7 +9,7 @@
function
phptemplate_init
(
$template
)
{
$file
=
dirname
(
$template
->
filename
)
.
'/template.php'
;
if
(
file_exists
(
$file
))
{
include_once
(
$file
)
;
include_once
"./
$file
"
;
}
}
...
...
@@ -333,7 +333,7 @@ function _phptemplate_default($hook, $variables, $file = NULL) {
if
(
$file
)
{
extract
(
$variables
,
EXTR_SKIP
);
// Extract the vars to local namespace
ob_start
();
// Start output buffering
include
(
$file
);
// Include the file
include
"./
$file
"
;
// Include the file
$contents
=
ob_get_contents
();
// Get the contents of the buffer
ob_end_clean
();
// End buffering and discard
return
$contents
;
// Return the contents
...
...
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