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
225
Merge Requests
225
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
013b73e6
Commit
013b73e6
authored
Sep 08, 2005
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- 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
Showing
13 changed files
with
29 additions
and
29 deletions
+29
-29
cron.php
cron.php
+1
-1
database/updates.inc
database/updates.inc
+1
-1
includes/bootstrap.inc
includes/bootstrap.inc
+1
-1
includes/database.inc
includes/database.inc
+2
-2
includes/image.inc
includes/image.inc
+2
-2
includes/theme.inc
includes/theme.inc
+2
-2
modules/locale.module
modules/locale.module
+6
-6
modules/locale/locale.module
modules/locale/locale.module
+6
-6
modules/system.module
modules/system.module
+2
-2
modules/system/system.module
modules/system/system.module
+2
-2
modules/user.module
modules/user.module
+1
-1
modules/user/user.module
modules/user/user.module
+1
-1
themes/engines/phptemplate/phptemplate.engine
themes/engines/phptemplate/phptemplate.engine
+2
-2
No files found.
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
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