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
d4200e26
Commit
d4200e26
authored
May 18, 2010
by
Dries Buytaert
Browse files
- Patch
#763850
by c960657: require_once() and drupal_get_path() inconsistencies.
parent
245454be
Changes
7
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
d4200e26
...
...
@@ -4459,7 +4459,7 @@ function _drupal_bootstrap_full() {
require_once
DRUPAL_ROOT
.
'/'
.
variable_get
(
'path_inc'
,
'includes/path.inc'
);
require_once
DRUPAL_ROOT
.
'/includes/theme.inc'
;
require_once
DRUPAL_ROOT
.
'/includes/pager.inc'
;
require_once
DRUPAL_ROOT
.
'/'
.
variable_get
(
'menu_inc'
,
'
/
includes/menu.inc'
);
require_once
DRUPAL_ROOT
.
'/'
.
variable_get
(
'menu_inc'
,
'includes/menu.inc'
);
require_once
DRUPAL_ROOT
.
'/includes/tablesort.inc'
;
require_once
DRUPAL_ROOT
.
'/includes/file.inc'
;
require_once
DRUPAL_ROOT
.
'/includes/unicode.inc'
;
...
...
includes/install.core.inc
View file @
d4200e26
...
...
@@ -1082,7 +1082,7 @@ function _install_select_profile($profiles) {
if
(
sizeof
(
$profiles
)
==
1
)
{
$profile
=
array_pop
(
$profiles
);
// TODO: is this right?
require_once
$profile
->
uri
;
require_once
DRUPAL_ROOT
.
'/'
.
$profile
->
uri
;
return
$profile
->
name
;
}
else
{
...
...
includes/install.inc
View file @
d4200e26
...
...
@@ -547,7 +547,7 @@ function drupal_verify_profile($install_state) {
* functions can be made available while other modules are installed.
*/
function
drupal_install_system
()
{
$system_path
=
dirname
(
drupal_get_
filename
(
'module'
,
'system'
,
NULL
)
);
$system_path
=
drupal_get_
path
(
'module'
,
'system'
);
require_once
DRUPAL_ROOT
.
'/'
.
$system_path
.
'/system.install'
;
module_invoke
(
'system'
,
'install'
);
...
...
modules/simpletest/tests/graph.test
View file @
d4200e26
...
...
@@ -23,7 +23,7 @@ class GraphUnitTest extends DrupalUnitTestCase {
*/
function
testDepthFirstSearch
()
{
// Provoke the inclusion of graph.inc.
require_once
'
includes/graph.inc'
;
require_once
DRUPAL_ROOT
.
'/
includes/graph.inc'
;
// The sample graph used is:
// 1 --> 2 --> 3 5 ---> 6
...
...
modules/system/system.admin.inc
View file @
d4200e26
...
...
@@ -1330,7 +1330,7 @@ function system_modules_uninstall_confirm_form($storage) {
// Construct the hidden form elements and list items.
foreach
(
array_filter
(
$storage
[
'uninstall'
])
as
$module
=>
$value
)
{
$info
=
drupal_parse_info_file
(
dirname
(
drupal_get_
filename
(
'module'
,
$module
)
)
.
'/'
.
$module
.
'.info'
);
$info
=
drupal_parse_info_file
(
drupal_get_
path
(
'module'
,
$module
)
.
'/'
.
$module
.
'.info'
);
$uninstall
[]
=
$info
[
'name'
];
$form
[
'uninstall'
][
$module
]
=
array
(
'#type'
=>
'hidden'
,
'#value'
=>
1
,
...
...
modules/system/system.updater.inc
View file @
d4200e26
...
...
@@ -53,8 +53,8 @@ public static function canUpdate($project_name) {
* Return available database schema updates one a new version is installed.
*/
public
function
getSchemaUpdates
()
{
require_once
'
.
/includes/install.inc'
;
require_once
'
.
/includes/update.inc'
;
require_once
DRUPAL_ROOT
.
'/includes/install.inc'
;
require_once
DRUPAL_ROOT
.
'/includes/update.inc'
;
if
(
_update_get_project_type
(
$project
)
!=
'module'
)
{
return
array
();
...
...
update.php
View file @
d4200e26
...
...
@@ -268,7 +268,7 @@ function update_access_allowed() {
// Calls to user_access() might fail during the Drupal 6 to 7 update process,
// so we fall back on requiring that the user be logged in as user #1.
try
{
require_once
drupal_get_path
(
'module'
,
'user'
)
.
'/user.module'
;
require_once
DRUPAL_ROOT
.
'/'
.
drupal_get_path
(
'module'
,
'user'
)
.
'/user.module'
;
return
user_access
(
'administer software updates'
);
}
catch
(
Exception
$e
)
{
...
...
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