#259623 by dopry and Damien Tournoud: Convert includes/requires to use absolute paths.
parent
9c2e5a52c9
commit
a3bb66e4e8
7
cron.php
7
cron.php
|
|
@ -6,7 +6,12 @@
|
||||||
* Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).
|
* Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once './includes/bootstrap.inc';
|
/**
|
||||||
|
* Root directory of Drupal installation.
|
||||||
|
*/
|
||||||
|
define('DRUPAL_ROOT', dirname(realpath(__FILE__)));
|
||||||
|
|
||||||
|
include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
|
||||||
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
|
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
|
||||||
if (isset($_GET['cron_key']) && variable_get('cron_key', 'drupal') == $_GET['cron_key']) {
|
if (isset($_GET['cron_key']) && variable_get('cron_key', 'drupal') == $_GET['cron_key']) {
|
||||||
drupal_cron_run();
|
drupal_cron_run();
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ function _batch_process() {
|
||||||
// request, we check if it requires an additional file for functions
|
// request, we check if it requires an additional file for functions
|
||||||
// definitions.
|
// definitions.
|
||||||
if ($set_changed && isset($current_set['file']) && is_file($current_set['file'])) {
|
if ($set_changed && isset($current_set['file']) && is_file($current_set['file'])) {
|
||||||
include_once($current_set['file']);
|
include_once DRUPAL_ROOT . '/' . $current_set['file'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$task_message = '';
|
$task_message = '';
|
||||||
|
|
@ -304,7 +304,7 @@ function _batch_finished() {
|
||||||
if (isset($batch_set['finished'])) {
|
if (isset($batch_set['finished'])) {
|
||||||
// Check if the set requires an additional file for functions definitions.
|
// Check if the set requires an additional file for functions definitions.
|
||||||
if (isset($batch_set['file']) && is_file($batch_set['file'])) {
|
if (isset($batch_set['file']) && is_file($batch_set['file'])) {
|
||||||
include_once($batch_set['file']);
|
include_once DRUPAL_ROOT . '/' . $batch_set['file'];
|
||||||
}
|
}
|
||||||
if (function_exists($batch_set['finished'])) {
|
if (function_exists($batch_set['finished'])) {
|
||||||
$batch_set['finished']($batch_set['success'], $batch_set['results'], $batch_set['operations']);
|
$batch_set['finished']($batch_set['success'], $batch_set['results'], $batch_set['operations']);
|
||||||
|
|
|
||||||
|
|
@ -329,8 +329,8 @@ function conf_init() {
|
||||||
global $databases, $db_prefix, $cookie_domain, $conf, $installed_profile, $update_free_access;
|
global $databases, $db_prefix, $cookie_domain, $conf, $installed_profile, $update_free_access;
|
||||||
$conf = array();
|
$conf = array();
|
||||||
|
|
||||||
if (file_exists('./' . conf_path() . '/settings.php')) {
|
if (file_exists(DRUPAL_ROOT . '/' . conf_path() . '/settings.php')) {
|
||||||
include_once './' . conf_path() . '/settings.php';
|
include_once DRUPAL_ROOT . '/' . conf_path() . '/settings.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($base_url)) {
|
if (isset($base_url)) {
|
||||||
|
|
@ -602,7 +602,7 @@ function drupal_load($type, $name) {
|
||||||
$filename = drupal_get_filename($type, $name);
|
$filename = drupal_get_filename($type, $name);
|
||||||
|
|
||||||
if ($filename) {
|
if ($filename) {
|
||||||
include_once "./$filename";
|
include_once DRUPAL_ROOT . '/' . $filename;
|
||||||
$files[$type][$name] = TRUE;
|
$files[$type][$name] = TRUE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
@ -1006,7 +1006,7 @@ function _drupal_bootstrap($phase) {
|
||||||
case DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE:
|
case DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE:
|
||||||
// Allow specifying special cache handlers in settings.php, like
|
// Allow specifying special cache handlers in settings.php, like
|
||||||
// using memcached or files for storing cache information.
|
// using memcached or files for storing cache information.
|
||||||
require_once variable_get('cache_inc', './includes/cache.inc');
|
require_once DRUPAL_ROOT . '/' . variable_get('cache_inc', 'includes/cache.inc');
|
||||||
// If the page_cache_fastpath is set to TRUE in settings.php and
|
// If the page_cache_fastpath is set to TRUE in settings.php and
|
||||||
// page_cache_fastpath (implemented in the special implementation of
|
// page_cache_fastpath (implemented in the special implementation of
|
||||||
// cache.inc) printed the page and indicated this with a returned TRUE
|
// cache.inc) printed the page and indicated this with a returned TRUE
|
||||||
|
|
@ -1019,7 +1019,7 @@ function _drupal_bootstrap($phase) {
|
||||||
case DRUPAL_BOOTSTRAP_DATABASE:
|
case DRUPAL_BOOTSTRAP_DATABASE:
|
||||||
// Initialize the database system. Note that the connection
|
// Initialize the database system. Note that the connection
|
||||||
// won't be initialized until it is actually requested.
|
// won't be initialized until it is actually requested.
|
||||||
require_once './includes/database/database.inc';
|
require_once DRUPAL_ROOT . '/includes/database/database.inc';
|
||||||
// Register autoload functions so that we can access classes and interfaces.
|
// Register autoload functions so that we can access classes and interfaces.
|
||||||
spl_autoload_register('drupal_autoload_class');
|
spl_autoload_register('drupal_autoload_class');
|
||||||
spl_autoload_register('drupal_autoload_interface');
|
spl_autoload_register('drupal_autoload_interface');
|
||||||
|
|
@ -1035,7 +1035,7 @@ function _drupal_bootstrap($phase) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DRUPAL_BOOTSTRAP_SESSION:
|
case DRUPAL_BOOTSTRAP_SESSION:
|
||||||
require_once variable_get('session_inc', './includes/session.inc');
|
require_once DRUPAL_ROOT . '/' . variable_get('session_inc', 'includes/session.inc');
|
||||||
session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy_sid', '_sess_gc');
|
session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy_sid', '_sess_gc');
|
||||||
session_start();
|
session_start();
|
||||||
break;
|
break;
|
||||||
|
|
@ -1044,7 +1044,7 @@ function _drupal_bootstrap($phase) {
|
||||||
// Initialize configuration variables, using values from settings.php if available.
|
// Initialize configuration variables, using values from settings.php if available.
|
||||||
$conf = variable_init(isset($conf) ? $conf : array());
|
$conf = variable_init(isset($conf) ? $conf : array());
|
||||||
// Load module handling.
|
// Load module handling.
|
||||||
require_once './includes/module.inc';
|
require_once DRUPAL_ROOT . '/includes/module.inc';
|
||||||
$cache_mode = variable_get('cache', CACHE_DISABLED);
|
$cache_mode = variable_get('cache', CACHE_DISABLED);
|
||||||
// Get the page from the cache.
|
// Get the page from the cache.
|
||||||
$cache = $cache_mode == CACHE_DISABLED ? '' : page_get_cache();
|
$cache = $cache_mode == CACHE_DISABLED ? '' : page_get_cache();
|
||||||
|
|
@ -1071,13 +1071,13 @@ function _drupal_bootstrap($phase) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DRUPAL_BOOTSTRAP_PATH:
|
case DRUPAL_BOOTSTRAP_PATH:
|
||||||
require_once './includes/path.inc';
|
require_once DRUPAL_ROOT . '/includes/path.inc';
|
||||||
// Initialize $_GET['q'] prior to loading modules and invoking hook_init().
|
// Initialize $_GET['q'] prior to loading modules and invoking hook_init().
|
||||||
drupal_init_path();
|
drupal_init_path();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DRUPAL_BOOTSTRAP_FULL:
|
case DRUPAL_BOOTSTRAP_FULL:
|
||||||
require_once './includes/common.inc';
|
require_once DRUPAL_ROOT . '/includes/common.inc';
|
||||||
_drupal_bootstrap_full();
|
_drupal_bootstrap_full();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -1092,7 +1092,7 @@ function _drupal_bootstrap($phase) {
|
||||||
* @see _drupal_maintenance_theme()
|
* @see _drupal_maintenance_theme()
|
||||||
*/
|
*/
|
||||||
function drupal_maintenance_theme() {
|
function drupal_maintenance_theme() {
|
||||||
require_once './includes/theme.maintenance.inc';
|
require_once DRUPAL_ROOT . '/includes/theme.maintenance.inc';
|
||||||
_drupal_maintenance_theme();
|
_drupal_maintenance_theme();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1120,7 +1120,7 @@ function drupal_init_language() {
|
||||||
$language = language_default();
|
$language = language_default();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
include_once './includes/language.inc';
|
include_once DRUPAL_ROOT . '/includes/language.inc';
|
||||||
$language = language_initialize();
|
$language = language_initialize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1270,7 +1270,7 @@ function drupal_get_schema($table = NULL, $rebuild = FALSE) {
|
||||||
// Invoke hook_schema for all modules.
|
// Invoke hook_schema for all modules.
|
||||||
foreach (module_implements('schema') as $module) {
|
foreach (module_implements('schema') as $module) {
|
||||||
$current = module_invoke($module, 'schema');
|
$current = module_invoke($module, 'schema');
|
||||||
require_once('./includes/common.inc');
|
require_once DRUPAL_ROOT . '/includes/common.inc';
|
||||||
if (drupal_function_exists('_drupal_initialize_schema')) {
|
if (drupal_function_exists('_drupal_initialize_schema')) {
|
||||||
_drupal_initialize_schema($module, $current);
|
_drupal_initialize_schema($module, $current);
|
||||||
}
|
}
|
||||||
|
|
@ -1342,7 +1342,7 @@ function drupal_function_exists($function) {
|
||||||
|
|
||||||
$file = db_result(db_query("SELECT filename FROM {registry} WHERE name = :name AND type = :type", array(':name' => $function, ':type' => 'function')));
|
$file = db_result(db_query("SELECT filename FROM {registry} WHERE name = :name AND type = :type", array(':name' => $function, ':type' => 'function')));
|
||||||
if ($file) {
|
if ($file) {
|
||||||
require_once($file);
|
require_once DRUPAL_ROOT . '/' . $file;
|
||||||
$checked[$function] = function_exists($function);
|
$checked[$function] = function_exists($function);
|
||||||
if ($checked[$function]) {
|
if ($checked[$function]) {
|
||||||
registry_mark_code('function', $function);
|
registry_mark_code('function', $function);
|
||||||
|
|
@ -1390,7 +1390,7 @@ function drupal_autoload_class($class) {
|
||||||
function _registry_check_code($type, $name) {
|
function _registry_check_code($type, $name) {
|
||||||
$file = db_result(db_query("SELECT filename FROM {registry} WHERE name = :name AND type = :type", array(':name' => $name, ':type' => $type)));
|
$file = db_result(db_query("SELECT filename FROM {registry} WHERE name = :name AND type = :type", array(':name' => $name, ':type' => $type)));
|
||||||
if ($file) {
|
if ($file) {
|
||||||
require_once($file);
|
require_once DRUPAL_ROOT . '/' . $file;
|
||||||
registry_mark_code($type, $name);
|
registry_mark_code($type, $name);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
@ -1430,7 +1430,7 @@ function registry_mark_code($type, $name, $return = FALSE) {
|
||||||
* each function, file, and hook implementation in the database.
|
* each function, file, and hook implementation in the database.
|
||||||
*/
|
*/
|
||||||
function registry_rebuild() {
|
function registry_rebuild() {
|
||||||
require_once './includes/registry.inc';
|
require_once DRUPAL_ROOT . '/includes/registry.inc';
|
||||||
_registry_rebuild();
|
_registry_rebuild();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1501,7 +1501,7 @@ function registry_load_path_files($return = FALSE) {
|
||||||
$cache = cache_get('registry:' . $menu['path'], 'cache_registry');
|
$cache = cache_get('registry:' . $menu['path'], 'cache_registry');
|
||||||
if (!empty($cache->data)) {
|
if (!empty($cache->data)) {
|
||||||
foreach(explode(';', $cache->data) as $file) {
|
foreach(explode(';', $cache->data) as $file) {
|
||||||
require_once($file);
|
require_once DRUPAL_ROOT . '/' . $file;
|
||||||
$file_cache_data[] = $file;
|
$file_cache_data[] = $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2491,7 +2491,7 @@ function drupal_valid_token($token, $value = '', $skip_anonymous = FALSE) {
|
||||||
* failed. See xmlrpc_error().
|
* failed. See xmlrpc_error().
|
||||||
*/
|
*/
|
||||||
function xmlrpc($url) {
|
function xmlrpc($url) {
|
||||||
require_once './includes/xmlrpc.inc';
|
require_once DRUPAL_ROOT . '/includes/xmlrpc.inc';
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
return call_user_func_array('_xmlrpc', $args);
|
return call_user_func_array('_xmlrpc', $args);
|
||||||
}
|
}
|
||||||
|
|
@ -2503,16 +2503,16 @@ function _drupal_bootstrap_full() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$called = 1;
|
$called = 1;
|
||||||
require_once './includes/theme.inc';
|
require_once DRUPAL_ROOT . '/includes/theme.inc';
|
||||||
require_once './includes/pager.inc';
|
require_once DRUPAL_ROOT . '/includes/pager.inc';
|
||||||
require_once './includes/menu.inc';
|
require_once DRUPAL_ROOT . '/includes/menu.inc';
|
||||||
require_once './includes/tablesort.inc';
|
require_once DRUPAL_ROOT . '/includes/tablesort.inc';
|
||||||
require_once './includes/file.inc';
|
require_once DRUPAL_ROOT . '/includes/file.inc';
|
||||||
require_once './includes/unicode.inc';
|
require_once DRUPAL_ROOT . '/includes/unicode.inc';
|
||||||
require_once './includes/image.inc';
|
require_once DRUPAL_ROOT . '/includes/image.inc';
|
||||||
require_once './includes/form.inc';
|
require_once DRUPAL_ROOT . '/includes/form.inc';
|
||||||
require_once './includes/mail.inc';
|
require_once DRUPAL_ROOT . '/includes/mail.inc';
|
||||||
require_once './includes/actions.inc';
|
require_once DRUPAL_ROOT . '/includes/actions.inc';
|
||||||
// Set the Drupal custom error handler.
|
// Set the Drupal custom error handler.
|
||||||
set_error_handler('drupal_error_handler');
|
set_error_handler('drupal_error_handler');
|
||||||
// Emit the correct charset HTTP header.
|
// Emit the correct charset HTTP header.
|
||||||
|
|
|
||||||
|
|
@ -825,8 +825,7 @@ abstract class Database {
|
||||||
// We cannot rely on the registry yet, because the registry requires
|
// We cannot rely on the registry yet, because the registry requires
|
||||||
// an open database connection.
|
// an open database connection.
|
||||||
$driver_class = 'DatabaseConnection_' . $driver;
|
$driver_class = 'DatabaseConnection_' . $driver;
|
||||||
$driver_file = './includes/database/' . $driver . '/database.inc';
|
require_once DRUPAL_ROOT . '/includes/database/' . $driver . '/database.inc';
|
||||||
require_once($driver_file);
|
|
||||||
self::$connections[$key][$target] = new $driver_class(self::$databaseInfo[$key][$target]);
|
self::$connections[$key][$target] = new $driver_class(self::$databaseInfo[$key][$target]);
|
||||||
|
|
||||||
// We need to pass around the simpletest database prefix in the request
|
// We need to pass around the simpletest database prefix in the request
|
||||||
|
|
@ -1809,7 +1808,7 @@ function db_result(DatabaseStatement $statement) {
|
||||||
|
|
||||||
function _db_need_install() {
|
function _db_need_install() {
|
||||||
if (!function_exists('install_goto')) {
|
if (!function_exists('install_goto')) {
|
||||||
include_once 'includes/install.inc';
|
include_once DRUPAL_ROOT . '/includes/install.inc';
|
||||||
install_goto('install.php');
|
install_goto('install.php');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2504,7 +2504,7 @@ function batch_process($redirect = NULL, $url = NULL) {
|
||||||
else {
|
else {
|
||||||
// Non-progressive execution: bypass the whole progressbar workflow
|
// Non-progressive execution: bypass the whole progressbar workflow
|
||||||
// and execute the batch in one pass.
|
// and execute the batch in one pass.
|
||||||
require_once './includes/batch.inc';
|
require_once DRUPAL_ROOT . '/includes/batch.inc';
|
||||||
_batch_process();
|
_batch_process();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -211,8 +211,8 @@ function drupal_detect_database_types() {
|
||||||
// without modifying the installer.
|
// without modifying the installer.
|
||||||
// Because we have no registry yet, we need to also include the install.inc
|
// Because we have no registry yet, we need to also include the install.inc
|
||||||
// file for the driver explicitly.
|
// file for the driver explicitly.
|
||||||
foreach (glob('./includes/database/*/{install,database}.inc', GLOB_BRACE) as $file) {
|
foreach (glob(DRUPAL_ROOT . '/includes/database/*/{install,database}.inc', GLOB_BRACE) as $file) {
|
||||||
include_once($file);
|
include_once $file;
|
||||||
$dir_parts = explode('/', $file, -1);
|
$dir_parts = explode('/', $file, -1);
|
||||||
$drivers[end($dir_parts)] = $file;
|
$drivers[end($dir_parts)] = $file;
|
||||||
}
|
}
|
||||||
|
|
@ -330,8 +330,8 @@ abstract class DatabaseInstaller {
|
||||||
* An array of settings that need to be updated.
|
* An array of settings that need to be updated.
|
||||||
*/
|
*/
|
||||||
function drupal_rewrite_settings($settings = array(), $prefix = '') {
|
function drupal_rewrite_settings($settings = array(), $prefix = '') {
|
||||||
$default_settings = './sites/default/default.settings.php';
|
$default_settings = 'sites/default/default.settings.php';
|
||||||
$settings_file = './' . conf_path(FALSE, TRUE) . '/' . $prefix . 'settings.php';
|
$settings_file = conf_path(FALSE, TRUE) . '/' . $prefix . 'settings.php';
|
||||||
|
|
||||||
// Build list of setting names and insert the values into the global namespace.
|
// Build list of setting names and insert the values into the global namespace.
|
||||||
$keys = array();
|
$keys = array();
|
||||||
|
|
@ -342,7 +342,7 @@ function drupal_rewrite_settings($settings = array(), $prefix = '') {
|
||||||
|
|
||||||
$buffer = NULL;
|
$buffer = NULL;
|
||||||
$first = TRUE;
|
$first = TRUE;
|
||||||
if ($fp = fopen($default_settings, 'r')) {
|
if ($fp = fopen(DRUPAL_ROOT . '/' . $default_settings, 'r')) {
|
||||||
// Step line by line through settings.php.
|
// Step line by line through settings.php.
|
||||||
while (!feof($fp)) {
|
while (!feof($fp)) {
|
||||||
$line = fgets($fp);
|
$line = fgets($fp);
|
||||||
|
|
@ -390,7 +390,7 @@ function drupal_rewrite_settings($settings = array(), $prefix = '') {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$fp = fopen($settings_file, 'w');
|
$fp = fopen(DRUPAL_ROOT . '/' . $settings_file, 'w');
|
||||||
if ($fp && fwrite($fp, $buffer) === FALSE) {
|
if ($fp && fwrite($fp, $buffer) === FALSE) {
|
||||||
drupal_set_message(st('Failed to modify %settings, please verify the file permissions.', array('%settings' => $settings_file)), 'error');
|
drupal_set_message(st('Failed to modify %settings, please verify the file permissions.', array('%settings' => $settings_file)), 'error');
|
||||||
}
|
}
|
||||||
|
|
@ -425,16 +425,16 @@ function drupal_get_install_files($module_list = array()) {
|
||||||
* The list of modules to install.
|
* The list of modules to install.
|
||||||
*/
|
*/
|
||||||
function drupal_verify_profile($profile, $locale) {
|
function drupal_verify_profile($profile, $locale) {
|
||||||
include_once './includes/file.inc';
|
include_once DRUPAL_ROOT . '/includes/file.inc';
|
||||||
include_once './includes/common.inc';
|
include_once DRUPAL_ROOT . '/includes/common.inc';
|
||||||
|
|
||||||
$profile_file = "./profiles/$profile/$profile.profile";
|
$profile_file = DRUPAL_ROOT . "/profiles/$profile/$profile.profile";
|
||||||
|
|
||||||
if (!isset($profile) || !file_exists($profile_file)) {
|
if (!isset($profile) || !file_exists($profile_file)) {
|
||||||
install_no_profile_error();
|
install_no_profile_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once($profile_file);
|
require_once $profile_file;
|
||||||
|
|
||||||
// Get a list of modules required by this profile.
|
// Get a list of modules required by this profile.
|
||||||
$function = $profile . '_profile_modules';
|
$function = $profile . '_profile_modules';
|
||||||
|
|
@ -521,11 +521,11 @@ function drupal_install_init_database() {
|
||||||
if (!$included) {
|
if (!$included) {
|
||||||
$connection_info = Database::getConnectionInfo();
|
$connection_info = Database::getConnectionInfo();
|
||||||
$driver = $connection_info['default']['driver'];
|
$driver = $connection_info['default']['driver'];
|
||||||
require_once('./includes/database/query.inc');
|
require_once DRUPAL_ROOT . '/includes/database/query.inc';
|
||||||
require_once('./includes/database/select.inc');
|
require_once DRUPAL_ROOT . '/includes/database/select.inc';
|
||||||
require_once('./includes/database/schema.inc');
|
require_once DRUPAL_ROOT . '/includes/database/schema.inc';
|
||||||
foreach (glob('./includes/database/' . $driver . '/*.inc') as $include_file) {
|
foreach (glob(DRUPAL_ROOT . '/includes/database/' . $driver . '/*.inc') as $include_file) {
|
||||||
require_once($include_file);
|
require_once $include_file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -538,7 +538,7 @@ function drupal_install_init_database() {
|
||||||
*/
|
*/
|
||||||
function drupal_install_system() {
|
function drupal_install_system() {
|
||||||
$system_path = dirname(drupal_get_filename('module', 'system', NULL));
|
$system_path = dirname(drupal_get_filename('module', 'system', NULL));
|
||||||
require_once './' . $system_path . '/system.install';
|
require_once DRUPAL_ROOT . '/' . $system_path . '/system.install';
|
||||||
drupal_install_init_database();
|
drupal_install_init_database();
|
||||||
module_invoke('system', 'install');
|
module_invoke('system', 'install');
|
||||||
|
|
||||||
|
|
@ -818,16 +818,16 @@ function st($string, $args = array()) {
|
||||||
|
|
||||||
if (!isset($locale_strings)) {
|
if (!isset($locale_strings)) {
|
||||||
$locale_strings = array();
|
$locale_strings = array();
|
||||||
$filename = './profiles/' . $profile . '/translations/' . $install_locale . '.po';
|
$filename = 'profiles/' . $profile . '/translations/' . $install_locale . '.po';
|
||||||
if (file_exists($filename)) {
|
if (file_exists(DRUPAL_ROOT . '/' . $filename)) {
|
||||||
require_once './includes/locale.inc';
|
require_once DRUPAL_ROOT . '/includes/locale.inc';
|
||||||
$file = (object) array('filepath' => $filename);
|
$file = (object) array('filepath' => $filename);
|
||||||
_locale_import_read_po('mem-store', $file);
|
_locale_import_read_po('mem-store', $file);
|
||||||
$locale_strings = _locale_import_one_string('mem-report');
|
$locale_strings = _locale_import_one_string('mem-report');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once './includes/theme.inc';
|
require_once DRUPAL_ROOT . '/includes/theme.inc';
|
||||||
// Transform arguments before inserting them
|
// Transform arguments before inserting them
|
||||||
foreach ($args as $key => $value) {
|
foreach ($args as $key => $value) {
|
||||||
switch ($key[0]) {
|
switch ($key[0]) {
|
||||||
|
|
@ -856,15 +856,15 @@ function st($string, $args = array()) {
|
||||||
* Array of the install profile's requirements.
|
* Array of the install profile's requirements.
|
||||||
*/
|
*/
|
||||||
function drupal_check_profile($profile) {
|
function drupal_check_profile($profile) {
|
||||||
include_once './includes/file.inc';
|
include_once DRUPAL_ROOT . '/includes/file.inc';
|
||||||
|
|
||||||
$profile_file = "./profiles/$profile/$profile.profile";
|
$profile_file = DRUPAL_ROOT . "/profiles/$profile/$profile.profile";
|
||||||
|
|
||||||
if (!isset($profile) || !file_exists($profile_file)) {
|
if (!isset($profile) || !file_exists($profile_file)) {
|
||||||
install_no_profile_error();
|
install_no_profile_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once($profile_file);
|
require_once $profile_file;
|
||||||
|
|
||||||
// Get a list of modules required by this profile.
|
// Get a list of modules required by this profile.
|
||||||
$function = $profile . '_profile_modules';
|
$function = $profile . '_profile_modules';
|
||||||
|
|
@ -876,7 +876,7 @@ function drupal_check_profile($profile) {
|
||||||
// Collect requirement testing results
|
// Collect requirement testing results
|
||||||
$requirements = array();
|
$requirements = array();
|
||||||
foreach ($installs as $install) {
|
foreach ($installs as $install) {
|
||||||
require_once $install->filename;
|
require_once DRUPAL_ROOT . '/' . $install->filename;
|
||||||
$function = $install->name. '_requirements';
|
$function = $install->name. '_requirements';
|
||||||
if (function_exists($function)) {
|
if (function_exists($function)) {
|
||||||
$requirements = array_merge($requirements, $function('install'));
|
$requirements = array_merge($requirements, $function('install'));
|
||||||
|
|
@ -916,7 +916,7 @@ function drupal_check_module($module) {
|
||||||
// Include install file
|
// Include install file
|
||||||
$install = drupal_get_install_files(array($module));
|
$install = drupal_get_install_files(array($module));
|
||||||
if (isset($install[$module])) {
|
if (isset($install[$module])) {
|
||||||
require_once $install[$module]->filename;
|
require_once DRUPAL_ROOT . '/' . $install[$module]->filename;
|
||||||
|
|
||||||
// Check requirements
|
// Check requirements
|
||||||
$requirements = module_invoke($module, 'requirements', 'install');
|
$requirements = module_invoke($module, 'requirements', 'install');
|
||||||
|
|
|
||||||
|
|
@ -1040,7 +1040,7 @@ function _locale_import_po($file, $langcode, $mode, $group = NULL) {
|
||||||
*/
|
*/
|
||||||
function _locale_import_read_po($op, $file, $mode = NULL, $lang = NULL, $group = 'default') {
|
function _locale_import_read_po($op, $file, $mode = NULL, $lang = NULL, $group = 'default') {
|
||||||
|
|
||||||
$fd = fopen($file->filepath, "rb"); // File will get closed by PHP on return
|
$fd = fopen(DRUPAL_ROOT . '/' . $file->filepath, "rb"); // File will get closed by PHP on return
|
||||||
if (!$fd) {
|
if (!$fd) {
|
||||||
_locale_import_message('The translation import failed, because the file %filename could not be read.', $file);
|
_locale_import_message('The translation import failed, because the file %filename could not be read.', $file);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
@ -2543,7 +2543,7 @@ function _locale_batch_build($files, $finished = NULL, $components = array()) {
|
||||||
'title' => $t('Importing interface translations'),
|
'title' => $t('Importing interface translations'),
|
||||||
'init_message' => $t('Starting import'),
|
'init_message' => $t('Starting import'),
|
||||||
'error_message' => $t('Error importing interface translations'),
|
'error_message' => $t('Error importing interface translations'),
|
||||||
'file' => './includes/locale.inc',
|
'file' => 'includes/locale.inc',
|
||||||
// This is not a batch API construct, but data passed along to the
|
// This is not a batch API construct, but data passed along to the
|
||||||
// installer, so we know what did we import already.
|
// installer, so we know what did we import already.
|
||||||
'#components' => $components,
|
'#components' => $components,
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@ function drupal_mail($module, $key, $to, $language, $params = array(), $from = N
|
||||||
function drupal_mail_send($message) {
|
function drupal_mail_send($message) {
|
||||||
// Allow for a custom mail backend.
|
// Allow for a custom mail backend.
|
||||||
if (variable_get('smtp_library', '') && file_exists(variable_get('smtp_library', ''))) {
|
if (variable_get('smtp_library', '') && file_exists(variable_get('smtp_library', ''))) {
|
||||||
include_once './' . variable_get('smtp_library', '');
|
include_once DRUPAL_ROOT . '/' . variable_get('smtp_library', '');
|
||||||
return drupal_mail_wrapper($message);
|
return drupal_mail_wrapper($message);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
|
|
@ -2472,7 +2472,7 @@ function _menu_site_is_offline() {
|
||||||
return $_GET['q'] != 'user' && $_GET['q'] != 'user/login';
|
return $_GET['q'] != 'user' && $_GET['q'] != 'user/login';
|
||||||
}
|
}
|
||||||
// Logged in users are unprivileged here, so they are logged out.
|
// Logged in users are unprivileged here, so they are logged out.
|
||||||
require_once drupal_get_path('module', 'user') . '/user.pages.inc';
|
require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.pages.inc';
|
||||||
user_logout();
|
user_logout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -220,7 +220,7 @@ function module_exists($module) {
|
||||||
*/
|
*/
|
||||||
function module_load_install($module) {
|
function module_load_install($module) {
|
||||||
// Make sure the installation API is available
|
// Make sure the installation API is available
|
||||||
include_once './includes/install.inc';
|
include_once DRUPAL_ROOT . '/includes/install.inc';
|
||||||
|
|
||||||
module_load_include('install', $module);
|
module_load_include('install', $module);
|
||||||
}
|
}
|
||||||
|
|
@ -241,16 +241,13 @@ function module_load_include($type, $module, $name = NULL) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (drupal_function_exists('drupal_get_path')) {
|
if (drupal_function_exists('drupal_get_path')) {
|
||||||
$file = './' . drupal_get_path('module', $module) . "/$name.$type";
|
$file = DRUPAL_ROOT . '/' . drupal_get_path('module', $module) . "/$name.$type";
|
||||||
}
|
if (is_file($file)) {
|
||||||
|
require_once $file;
|
||||||
if (is_file($file)) {
|
return $file;
|
||||||
require_once $file;
|
}
|
||||||
return $file;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,9 @@ function _registry_rebuild() {
|
||||||
// registry rebuild process runs.
|
// registry rebuild process runs.
|
||||||
$connection_info = Database::getConnectionInfo();
|
$connection_info = Database::getConnectionInfo();
|
||||||
$driver = $connection_info['default']['driver'];
|
$driver = $connection_info['default']['driver'];
|
||||||
require_once('./includes/database/query.inc');
|
require_once DRUPAL_ROOT . '/includes/database/query.inc';
|
||||||
require_once('./includes/database/select.inc');
|
require_once DRUPAL_ROOT . '/includes/database/select.inc';
|
||||||
require_once('./includes/database/' . $driver . '/query.inc');
|
require_once DRUPAL_ROOT . '/includes/database/' . $driver . '/query.inc';
|
||||||
|
|
||||||
// Reset the resources cache.
|
// Reset the resources cache.
|
||||||
_registry_get_resource_name();
|
_registry_get_resource_name();
|
||||||
|
|
@ -45,12 +45,12 @@ function _registry_rebuild() {
|
||||||
if ($module->status) {
|
if ($module->status) {
|
||||||
$dir = dirname($module->filename);
|
$dir = dirname($module->filename);
|
||||||
foreach ($module->info['files'] as $file) {
|
foreach ($module->info['files'] as $file) {
|
||||||
$files["./$dir/$file"] = array();
|
$files["$dir/$file"] = array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach (file_scan_directory('includes', '/\.inc$/') as $filename => $file) {
|
foreach (file_scan_directory('includes', '/\.inc$/') as $filename => $file) {
|
||||||
$files["./$filename"] = array();
|
$files["$filename"] = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (registry_get_parsed_files() as $filename => $file) {
|
foreach (registry_get_parsed_files() as $filename => $file) {
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ function _init_theme($theme, $base_theme = array(), $registry_callback = '_theme
|
||||||
// Initialize the theme.
|
// Initialize the theme.
|
||||||
if (isset($theme->engine)) {
|
if (isset($theme->engine)) {
|
||||||
// Include the engine.
|
// Include the engine.
|
||||||
include_once './' . $theme->owner;
|
include_once DRUPAL_ROOT . '/' . $theme->owner;
|
||||||
|
|
||||||
$theme_engine = $theme->engine;
|
$theme_engine = $theme->engine;
|
||||||
if (function_exists($theme_engine . '_init')) {
|
if (function_exists($theme_engine . '_init')) {
|
||||||
|
|
@ -181,12 +181,12 @@ function _init_theme($theme, $base_theme = array(), $registry_callback = '_theme
|
||||||
foreach ($base_theme as $base) {
|
foreach ($base_theme as $base) {
|
||||||
// Include the theme file or the engine.
|
// Include the theme file or the engine.
|
||||||
if (!empty($base->owner)) {
|
if (!empty($base->owner)) {
|
||||||
include_once './' . $base->owner;
|
include_once DRUPAL_ROOT . '/' . $base->owner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// and our theme gets one too.
|
// and our theme gets one too.
|
||||||
if (!empty($theme->owner)) {
|
if (!empty($theme->owner)) {
|
||||||
include_once './' . $theme->owner;
|
include_once DRUPAL_ROOT . '/' . $theme->owner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -298,10 +298,10 @@ function _theme_process_registry(&$cache, $name, $type, $theme, $path) {
|
||||||
// files can prevent them from getting registered.
|
// files can prevent them from getting registered.
|
||||||
if (isset($info['file']) && !isset($info['path'])) {
|
if (isset($info['file']) && !isset($info['path'])) {
|
||||||
$result[$hook]['file'] = $path . '/' . $info['file'];
|
$result[$hook]['file'] = $path . '/' . $info['file'];
|
||||||
include_once($result[$hook]['file']);
|
include_once DRUPAL_ROOT . '/' . $result[$hook]['file'];
|
||||||
}
|
}
|
||||||
elseif (isset($info['file']) && isset($info['path'])) {
|
elseif (isset($info['file']) && isset($info['path'])) {
|
||||||
include_once($info['path'] . '/' . $info['file']);
|
include_once DRUPAL_ROOT . '/' . $info['path'] . '/' . $info['file'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($info['template']) && !isset($info['path'])) {
|
if (isset($info['template']) && !isset($info['path'])) {
|
||||||
|
|
@ -600,7 +600,7 @@ function theme() {
|
||||||
if (isset($info['path'])) {
|
if (isset($info['path'])) {
|
||||||
$include_file = $info['path'] . '/' . $include_file;
|
$include_file = $info['path'] . '/' . $include_file;
|
||||||
}
|
}
|
||||||
include_once($include_file);
|
include_once DRUPAL_ROOT . '/' . $include_file;
|
||||||
}
|
}
|
||||||
if (isset($info['function'])) {
|
if (isset($info['function'])) {
|
||||||
// The theme call is a function.
|
// The theme call is a function.
|
||||||
|
|
@ -974,12 +974,12 @@ function theme_get_setting($setting_name, $refresh = FALSE) {
|
||||||
* The output generated by the template.
|
* The output generated by the template.
|
||||||
*/
|
*/
|
||||||
function theme_render_template($file, $variables) {
|
function theme_render_template($file, $variables) {
|
||||||
extract($variables, EXTR_SKIP); // Extract the variables to a local namespace
|
extract($variables, EXTR_SKIP); // Extract the variables to a local namespace
|
||||||
ob_start(); // Start output buffering
|
ob_start(); // Start output buffering
|
||||||
include "./$file"; // Include the file
|
include DRUPAL_ROOT . '/' . $file; // Include the file
|
||||||
$contents = ob_get_contents(); // Get the contents of the buffer
|
$contents = ob_get_contents(); // Get the contents of the buffer
|
||||||
ob_end_clean(); // End buffering and discard
|
ob_end_clean(); // End buffering and discard
|
||||||
return $contents; // Return the contents
|
return $contents; // Return the contents
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,13 @@ function _drupal_maintenance_theme() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once './includes/path.inc';
|
require_once DRUPAL_ROOT . '/includes/path.inc';
|
||||||
require_once './includes/theme.inc';
|
require_once DRUPAL_ROOT . '/includes/theme.inc';
|
||||||
require_once './includes/common.inc';
|
require_once DRUPAL_ROOT . '/includes/common.inc';
|
||||||
require_once './includes/unicode.inc';
|
require_once DRUPAL_ROOT . '/includes/unicode.inc';
|
||||||
require_once './includes/file.inc';
|
require_once DRUPAL_ROOT . '/includes/file.inc';
|
||||||
require_once './includes/module.inc';
|
require_once DRUPAL_ROOT . '/includes/module.inc';
|
||||||
require_once './includes/database/database.inc';
|
require_once DRUPAL_ROOT . '/includes/database/database.inc';
|
||||||
unicode_check();
|
unicode_check();
|
||||||
|
|
||||||
// Install and update pages are treated differently to prevent theming overrides.
|
// Install and update pages are treated differently to prevent theming overrides.
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,12 @@
|
||||||
* See COPYRIGHT.txt and LICENSE.txt.
|
* See COPYRIGHT.txt and LICENSE.txt.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once './includes/bootstrap.inc';
|
/**
|
||||||
|
* Root directory of Drupal installation.
|
||||||
|
*/
|
||||||
|
define('DRUPAL_ROOT', dirname(realpath(__FILE__)));
|
||||||
|
|
||||||
|
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
|
||||||
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
|
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
|
||||||
$return = menu_execute_active_handler();
|
$return = menu_execute_active_handler();
|
||||||
|
|
||||||
|
|
|
||||||
55
install.php
55
install.php
|
|
@ -1,7 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
// $Id$
|
// $Id$
|
||||||
|
|
||||||
require_once './includes/install.inc';
|
/**
|
||||||
|
* Root directory of Drupal installation.
|
||||||
|
*/
|
||||||
|
define('DRUPAL_ROOT', dirname(realpath(__FILE__)));
|
||||||
|
|
||||||
|
require_once DRUPAL_ROOT . '/includes/install.inc';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Global flag to indicate that site is in installation mode.
|
* Global flag to indicate that site is in installation mode.
|
||||||
|
|
@ -28,14 +33,14 @@ function install_main() {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once './includes/bootstrap.inc';
|
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
|
||||||
drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION);
|
drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION);
|
||||||
|
|
||||||
// This must go after drupal_bootstrap(), which unsets globals!
|
// This must go after drupal_bootstrap(), which unsets globals!
|
||||||
global $profile, $install_locale, $conf;
|
global $profile, $install_locale, $conf;
|
||||||
|
|
||||||
require_once './modules/system/system.install';
|
require_once DRUPAL_ROOT . '/modules/system/system.install';
|
||||||
require_once './includes/file.inc';
|
require_once DRUPAL_ROOT . '/includes/file.inc';
|
||||||
|
|
||||||
// Ensure correct page headers are sent (e.g. caching)
|
// Ensure correct page headers are sent (e.g. caching)
|
||||||
drupal_page_header();
|
drupal_page_header();
|
||||||
|
|
@ -44,7 +49,7 @@ function install_main() {
|
||||||
drupal_init_language();
|
drupal_init_language();
|
||||||
|
|
||||||
// Load module basics (needed for hook invokes).
|
// Load module basics (needed for hook invokes).
|
||||||
include_once './includes/module.inc';
|
include_once DRUPAL_ROOT . '/includes/module.inc';
|
||||||
$module_list['system']['filename'] = 'modules/system/system.module';
|
$module_list['system']['filename'] = 'modules/system/system.module';
|
||||||
$module_list['filter']['filename'] = 'modules/filter/filter.module';
|
$module_list['filter']['filename'] = 'modules/filter/filter.module';
|
||||||
module_list(TRUE, FALSE, FALSE, $module_list);
|
module_list(TRUE, FALSE, FALSE, $module_list);
|
||||||
|
|
@ -61,12 +66,12 @@ function install_main() {
|
||||||
// Since we have a database connection, we use the normal cache system.
|
// Since we have a database connection, we use the normal cache system.
|
||||||
// This is important, as the installer calls into the Drupal system for
|
// This is important, as the installer calls into the Drupal system for
|
||||||
// the clean URL checks, so we should maintain the cache properly.
|
// the clean URL checks, so we should maintain the cache properly.
|
||||||
require_once './includes/cache.inc';
|
require_once DRUPAL_ROOT . '/includes/cache.inc';
|
||||||
$conf['cache_inc'] = './includes/cache.inc';
|
$conf['cache_inc'] = 'includes/cache.inc';
|
||||||
|
|
||||||
// Initialize the database system. Note that the connection
|
// Initialize the database system. Note that the connection
|
||||||
// won't be initialized until it is actually requested.
|
// won't be initialized until it is actually requested.
|
||||||
require_once './includes/database/database.inc';
|
require_once DRUPAL_ROOT . '/includes/database/database.inc';
|
||||||
|
|
||||||
// Check if Drupal is installed.
|
// Check if Drupal is installed.
|
||||||
$task = install_verify_drupal();
|
$task = install_verify_drupal();
|
||||||
|
|
@ -79,8 +84,8 @@ function install_main() {
|
||||||
// for cached data will fail, we temporarily replace the normal cache
|
// for cached data will fail, we temporarily replace the normal cache
|
||||||
// system with a stubbed-out version that short-circuits the actual
|
// system with a stubbed-out version that short-circuits the actual
|
||||||
// caching process and avoids any errors.
|
// caching process and avoids any errors.
|
||||||
require_once './includes/cache-install.inc';
|
require_once DRUPAL_ROOT . '/includes/cache-install.inc';
|
||||||
$conf['cache_inc'] = './includes/cache-install.inc';
|
$conf['cache_inc'] = 'includes/cache-install.inc';
|
||||||
|
|
||||||
$task = NULL;
|
$task = NULL;
|
||||||
}
|
}
|
||||||
|
|
@ -97,7 +102,7 @@ function install_main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load the profile.
|
// Load the profile.
|
||||||
require_once "./profiles/$profile/$profile.profile";
|
require_once DRUPAL_ROOT . "/profiles/$profile/$profile.profile";
|
||||||
|
|
||||||
// Locale selection
|
// Locale selection
|
||||||
if (!empty($_GET['locale'])) {
|
if (!empty($_GET['locale'])) {
|
||||||
|
|
@ -172,7 +177,7 @@ function install_verify_settings() {
|
||||||
// Verify existing settings (if any).
|
// Verify existing settings (if any).
|
||||||
if (!empty($databases)) {
|
if (!empty($databases)) {
|
||||||
// We need this because we want to run form_get_errors.
|
// We need this because we want to run form_get_errors.
|
||||||
include_once './includes/form.inc';
|
include_once DRUPAL_ROOT . '/includes/form.inc';
|
||||||
|
|
||||||
$database = $databases['default']['default'];
|
$database = $databases['default']['default'];
|
||||||
$settings_file = './' . conf_path(FALSE, TRUE) . '/settings.php';
|
$settings_file = './' . conf_path(FALSE, TRUE) . '/settings.php';
|
||||||
|
|
@ -197,7 +202,7 @@ function install_change_settings($profile = 'default', $install_locale = '') {
|
||||||
$database = isset($databases['default']['default']) ? $databases['default']['default'] : array();
|
$database = isset($databases['default']['default']) ? $databases['default']['default'] : array();
|
||||||
|
|
||||||
// We always need this because we want to run form_get_errors.
|
// We always need this because we want to run form_get_errors.
|
||||||
include_once './includes/form.inc';
|
include_once DRUPAL_ROOT . '/includes/form.inc';
|
||||||
install_task_list('database');
|
install_task_list('database');
|
||||||
|
|
||||||
$output = drupal_get_form('install_settings_form', $profile, $install_locale, $settings_file, $database);
|
$output = drupal_get_form('install_settings_form', $profile, $install_locale, $settings_file, $database);
|
||||||
|
|
@ -411,7 +416,7 @@ function install_find_profiles() {
|
||||||
* The selected profile.
|
* The selected profile.
|
||||||
*/
|
*/
|
||||||
function install_select_profile() {
|
function install_select_profile() {
|
||||||
include_once './includes/form.inc';
|
include_once DRUPAL_ROOT . '/includes/form.inc';
|
||||||
|
|
||||||
$profiles = install_find_profiles();
|
$profiles = install_find_profiles();
|
||||||
// Don't need to choose profile if only one available.
|
// Don't need to choose profile if only one available.
|
||||||
|
|
@ -448,7 +453,7 @@ function install_select_profile_form(&$form_state, $profile_files) {
|
||||||
$names = array();
|
$names = array();
|
||||||
|
|
||||||
foreach ($profile_files as $profile) {
|
foreach ($profile_files as $profile) {
|
||||||
include_once($profile->filename);
|
include_once DRUPAL_ROOT . '/' . $profile->filename;
|
||||||
|
|
||||||
// Load profile details and store them for later retrieval.
|
// Load profile details and store them for later retrieval.
|
||||||
$function = $profile->name . '_profile_details';
|
$function = $profile->name . '_profile_details';
|
||||||
|
|
@ -499,8 +504,8 @@ function install_find_locales($profilename) {
|
||||||
* The selected language.
|
* The selected language.
|
||||||
*/
|
*/
|
||||||
function install_select_locale($profilename) {
|
function install_select_locale($profilename) {
|
||||||
include_once './includes/file.inc';
|
include_once DRUPAL_ROOT . '/includes/file.inc';
|
||||||
include_once './includes/form.inc';
|
include_once DRUPAL_ROOT . '/includes/form.inc';
|
||||||
|
|
||||||
// Find all available locales.
|
// Find all available locales.
|
||||||
$locales = install_find_locales($profilename);
|
$locales = install_find_locales($profilename);
|
||||||
|
|
@ -564,7 +569,7 @@ function install_select_locale($profilename) {
|
||||||
* Form API array definition for language selection.
|
* Form API array definition for language selection.
|
||||||
*/
|
*/
|
||||||
function install_select_locale_form(&$form_state, $locales) {
|
function install_select_locale_form(&$form_state, $locales) {
|
||||||
include_once './includes/locale.inc';
|
include_once DRUPAL_ROOT . '/includes/locale.inc';
|
||||||
$languages = _locale_get_predefined_list();
|
$languages = _locale_get_predefined_list();
|
||||||
foreach ($locales as $locale) {
|
foreach ($locales as $locale) {
|
||||||
// Try to use verbose locale name
|
// Try to use verbose locale name
|
||||||
|
|
@ -660,14 +665,14 @@ function install_tasks($profile, $task) {
|
||||||
// to the same address, until the batch finished callback is invoked
|
// to the same address, until the batch finished callback is invoked
|
||||||
// and the task advances to 'locale-initial-import'.
|
// and the task advances to 'locale-initial-import'.
|
||||||
if ($task == 'profile-install-batch') {
|
if ($task == 'profile-install-batch') {
|
||||||
include_once 'includes/batch.inc';
|
include_once DRUPAL_ROOT .'/includes/batch.inc';
|
||||||
$output = _batch_page();
|
$output = _batch_page();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Import interface translations for the enabled modules.
|
// Import interface translations for the enabled modules.
|
||||||
if ($task == 'locale-initial-import') {
|
if ($task == 'locale-initial-import') {
|
||||||
if (!empty($install_locale) && ($install_locale != 'en')) {
|
if (!empty($install_locale) && ($install_locale != 'en')) {
|
||||||
include_once 'includes/locale.inc';
|
include_once DRUPAL_ROOT . '/includes/locale.inc';
|
||||||
// Enable installation language as default site language.
|
// Enable installation language as default site language.
|
||||||
locale_add_language($install_locale, NULL, NULL, NULL, NULL, NULL, 1, TRUE);
|
locale_add_language($install_locale, NULL, NULL, NULL, NULL, NULL, 1, TRUE);
|
||||||
// Collect files to import for this language.
|
// Collect files to import for this language.
|
||||||
|
|
@ -686,8 +691,8 @@ function install_tasks($profile, $task) {
|
||||||
$task = 'configure';
|
$task = 'configure';
|
||||||
}
|
}
|
||||||
if ($task == 'locale-initial-batch') {
|
if ($task == 'locale-initial-batch') {
|
||||||
include_once 'includes/batch.inc';
|
include_once DRUPAL_ROOT . '/includes/batch.inc';
|
||||||
include_once 'includes/locale.inc';
|
include_once DRUPAL_ROOT . '/includes/locale.inc';
|
||||||
$output = _batch_page();
|
$output = _batch_page();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -771,7 +776,7 @@ if (Drupal.jsEnabled) {
|
||||||
// control and proceed with importing the remaining translations.
|
// control and proceed with importing the remaining translations.
|
||||||
if ($task == 'profile-finished') {
|
if ($task == 'profile-finished') {
|
||||||
if (!empty($install_locale) && ($install_locale != 'en')) {
|
if (!empty($install_locale) && ($install_locale != 'en')) {
|
||||||
include_once 'includes/locale.inc';
|
include_once DRUPAL_ROOT . '/includes/locale.inc';
|
||||||
// Collect files to import for this language. Skip components
|
// Collect files to import for this language. Skip components
|
||||||
// already covered in the initial batch set.
|
// already covered in the initial batch set.
|
||||||
$batch = locale_batch_by_language($install_locale, '_install_locale_remaining_batch_finished', variable_get('install_locale_batch_components', array()));
|
$batch = locale_batch_by_language($install_locale, '_install_locale_remaining_batch_finished', variable_get('install_locale_batch_components', array()));
|
||||||
|
|
@ -789,8 +794,8 @@ if (Drupal.jsEnabled) {
|
||||||
$task = 'finished';
|
$task = 'finished';
|
||||||
}
|
}
|
||||||
if ($task == 'locale-remaining-batch') {
|
if ($task == 'locale-remaining-batch') {
|
||||||
include_once 'includes/batch.inc';
|
include_once DRUPAL_ROOT . '/includes/batch.inc';
|
||||||
include_once 'includes/locale.inc';
|
include_once DRUPAL_ROOT . '/includes/locale.inc';
|
||||||
$output = _batch_page();
|
$output = _batch_page();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ function _color_page_alter(&$vars) {
|
||||||
*/
|
*/
|
||||||
function color_get_info($theme) {
|
function color_get_info($theme) {
|
||||||
$path = drupal_get_path('theme', $theme);
|
$path = drupal_get_path('theme', $theme);
|
||||||
$file = $path . '/color/color.inc';
|
$file = DRUPAL_ROOT . '/' . $path . '/color/color.inc';
|
||||||
if ($path && file_exists($file)) {
|
if ($path && file_exists($file)) {
|
||||||
include $file;
|
include $file;
|
||||||
return $info;
|
return $info;
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ function locale_menu() {
|
||||||
function locale_inc_callback() {
|
function locale_inc_callback() {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$function = array_shift($args);
|
$function = array_shift($args);
|
||||||
include_once './includes/locale.inc';
|
include_once DRUPAL_ROOT . '/includes/locale.inc';
|
||||||
return call_user_func_array($function, $args);
|
return call_user_func_array($function, $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -484,7 +484,7 @@ function locale_language_list($field = 'name', $all = FALSE) {
|
||||||
* translations for.
|
* translations for.
|
||||||
*/
|
*/
|
||||||
function locale_system_update($components) {
|
function locale_system_update($components) {
|
||||||
include_once 'includes/locale.inc';
|
include_once DRUPAL_ROOT . '/includes/locale.inc';
|
||||||
if ($batch = locale_batch_by_component($components)) {
|
if ($batch = locale_batch_by_component($components)) {
|
||||||
batch_set($batch);
|
batch_set($batch);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -686,7 +686,7 @@ class DrupalWebTestCase {
|
||||||
// Generate temporary prefixed database to ensure that tests have a clean starting point.
|
// Generate temporary prefixed database to ensure that tests have a clean starting point.
|
||||||
$db_prefix = 'simpletest' . mt_rand(1000, 1000000);
|
$db_prefix = 'simpletest' . mt_rand(1000, 1000000);
|
||||||
|
|
||||||
include_once './includes/install.inc';
|
include_once DRUPAL_ROOT . '/includes/install.inc';
|
||||||
drupal_install_system();
|
drupal_install_system();
|
||||||
|
|
||||||
// Add the specified modules to the list of modules in the default profile.
|
// Add the specified modules to the list of modules in the default profile.
|
||||||
|
|
|
||||||
|
|
@ -424,7 +424,7 @@ function _simpletest_batch_finished($success, $results, $operations) {
|
||||||
function simpletest_get_all_tests() {
|
function simpletest_get_all_tests() {
|
||||||
static $formatted_classes;
|
static $formatted_classes;
|
||||||
if (!isset($formatted_classes)) {
|
if (!isset($formatted_classes)) {
|
||||||
require_once drupal_get_path('module', 'simpletest') . '/drupal_web_test_case.php';
|
require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'simpletest') . '/drupal_web_test_case.php';
|
||||||
$files = array();
|
$files = array();
|
||||||
foreach (array_keys(module_rebuild_cache()) as $module) {
|
foreach (array_keys(module_rebuild_cache()) as $module) {
|
||||||
$module_path = drupal_get_path('module', $module);
|
$module_path = drupal_get_path('module', $module);
|
||||||
|
|
@ -443,7 +443,7 @@ function simpletest_get_all_tests() {
|
||||||
|
|
||||||
$existing_classes = get_declared_classes();
|
$existing_classes = get_declared_classes();
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
include_once($file);
|
include_once DRUPAL_ROOT . '/' . $file;
|
||||||
}
|
}
|
||||||
$classes = array_values(array_diff(get_declared_classes(), $existing_classes));
|
$classes = array_values(array_diff(get_declared_classes(), $existing_classes));
|
||||||
$formatted_classes = array();
|
$formatted_classes = array();
|
||||||
|
|
|
||||||
|
|
@ -89,11 +89,11 @@ class RegistryParseFilesTestCase extends DrupalWebTestCase {
|
||||||
if ($fileType == 'existing_changed') {
|
if ($fileType == 'existing_changed') {
|
||||||
// Insert a record with a dodgy md5.
|
// Insert a record with a dodgy md5.
|
||||||
$this->$fileType->fakeMD5 = md5($this->$fileType->contents . rand());
|
$this->$fileType->fakeMD5 = md5($this->$fileType->contents . rand());
|
||||||
db_query("INSERT INTO {registry_file} (md5, filename) VALUES ('%s', '%s')", $this->$fileType->fakeMD5, './' . $this->$fileType->fileName);
|
db_query("INSERT INTO {registry_file} (md5, filename) VALUES ('%s', '%s')", $this->$fileType->fakeMD5, $this->$fileType->fileName);
|
||||||
|
|
||||||
// Insert some fake resource records.
|
// Insert some fake resource records.
|
||||||
foreach (array('function', 'class', 'interface') as $type) {
|
foreach (array('function', 'class', 'interface') as $type) {
|
||||||
db_query("INSERT INTO {registry} (name, type, filename) VALUES ('%s', '%s', '%s')", $type . md5(rand()), $type, './' . $this->$fileType->fileName);
|
db_query("INSERT INTO {registry} (name, type, filename) VALUES ('%s', '%s', '%s')", $type . md5(rand()), $type, $this->$fileType->fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -111,7 +111,7 @@ class RegistryParseFilesTestCase extends DrupalWebTestCase {
|
||||||
$this->assertTrue($this->$fileType->$resource == $foundName, t('Resource "@resource" found.', array('@resource' => $this->$fileType->$resource)));
|
$this->assertTrue($this->$fileType->$resource == $foundName, t('Resource "@resource" found.', array('@resource' => $this->$fileType->$resource)));
|
||||||
}
|
}
|
||||||
// Test that we have the right md5.
|
// Test that we have the right md5.
|
||||||
$md5 = db_result(db_query("SELECT md5 FROM {registry_file} WHERE filename = '%s'", './' . $this->$fileType->fileName));
|
$md5 = db_result(db_query("SELECT md5 FROM {registry_file} WHERE filename = '%s'", $this->$fileType->fileName));
|
||||||
$this->assertTrue(md5($this->$fileType->contents) == $md5, t('MD5 for "@filename" matched.' . $fileType . $md5, array('@filename' => $this->$fileType->fileName)));
|
$this->assertTrue(md5($this->$fileType->contents) == $md5, t('MD5 for "@filename" matched.' . $fileType . $md5, array('@filename' => $this->$fileType->fileName)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -123,10 +123,10 @@ class RegistryParseFilesTestCase extends DrupalWebTestCase {
|
||||||
$files = array();
|
$files = array();
|
||||||
foreach ($this->fileTypes as $fileType) {
|
foreach ($this->fileTypes as $fileType) {
|
||||||
if ($fileType == 'existing_changed') {
|
if ($fileType == 'existing_changed') {
|
||||||
$files['./' . $this->$fileType->fileName] = array('md5' => $this->$fileType->fakeMD5);
|
$files[$this->$fileType->fileName] = array('md5' => $this->$fileType->fakeMD5);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$files['./' . $this->$fileType->fileName] = array();
|
$files[$this->$fileType->fileName] = array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $files;
|
return $files;
|
||||||
|
|
|
||||||
|
|
@ -485,11 +485,11 @@ function system_theme_settings(&$form_state, $key = '') {
|
||||||
|
|
||||||
if ($key) {
|
if ($key) {
|
||||||
// Include the theme's theme-settings.php file
|
// Include the theme's theme-settings.php file
|
||||||
$filename = './' . str_replace("/$key.info", '', $themes[$key]->filename) . '/theme-settings.php';
|
$filename = DRUPAL_ROOT . '/' . str_replace("/$key.info", '', $themes[$key]->filename) . '/theme-settings.php';
|
||||||
if (!file_exists($filename) and !empty($themes[$key]->info['base theme'])) {
|
if (!file_exists($filename) and !empty($themes[$key]->info['base theme'])) {
|
||||||
// If the theme doesn't have a theme-settings.php file, use the base theme's.
|
// If the theme doesn't have a theme-settings.php file, use the base theme's.
|
||||||
$base = $themes[$key]->info['base theme'];
|
$base = $themes[$key]->info['base theme'];
|
||||||
$filename = './' . str_replace("/$base.info", '', $themes[$base]->filename) . '/theme-settings.php';
|
$filename = DRUPAL_ROOT . '/' . str_replace("/$base.info", '', $themes[$base]->filename) . '/theme-settings.php';
|
||||||
}
|
}
|
||||||
if (file_exists($filename)) {
|
if (file_exists($filename)) {
|
||||||
require_once $filename;
|
require_once $filename;
|
||||||
|
|
@ -839,7 +839,7 @@ function system_modules_confirm_form($modules, $storage) {
|
||||||
* Submit callback; handles modules form submission.
|
* Submit callback; handles modules form submission.
|
||||||
*/
|
*/
|
||||||
function system_modules_submit($form, &$form_state) {
|
function system_modules_submit($form, &$form_state) {
|
||||||
include_once './includes/install.inc';
|
include_once DRUPAL_ROOT . '/includes/install.inc';
|
||||||
$modules = array();
|
$modules = array();
|
||||||
// If we're not coming from the confirmation form, build the list of modules.
|
// If we're not coming from the confirmation form, build the list of modules.
|
||||||
if (!isset($form_state['storage'])) {
|
if (!isset($form_state['storage'])) {
|
||||||
|
|
@ -986,7 +986,7 @@ function system_modules_submit($form, &$form_state) {
|
||||||
*/
|
*/
|
||||||
function system_modules_uninstall($form_state = NULL) {
|
function system_modules_uninstall($form_state = NULL) {
|
||||||
// Make sure the install API is available.
|
// Make sure the install API is available.
|
||||||
include_once './includes/install.inc';
|
include_once DRUPAL_ROOT . '/includes/install.inc';
|
||||||
|
|
||||||
// Display the confirm form if any modules have been submitted.
|
// Display the confirm form if any modules have been submitted.
|
||||||
if (isset($form_state) && $confirm_form = system_modules_uninstall_confirm_form($form_state['storage'])) {
|
if (isset($form_state) && $confirm_form = system_modules_uninstall_confirm_form($form_state['storage'])) {
|
||||||
|
|
@ -1087,7 +1087,7 @@ function system_modules_uninstall_validate($form, &$form_state) {
|
||||||
*/
|
*/
|
||||||
function system_modules_uninstall_submit($form, &$form_state) {
|
function system_modules_uninstall_submit($form, &$form_state) {
|
||||||
// Make sure the install API is available.
|
// Make sure the install API is available.
|
||||||
include_once './includes/install.inc';
|
include_once DRUPAL_ROOT . '/includes/install.inc';
|
||||||
|
|
||||||
if (!empty($form['#confirmed'])) {
|
if (!empty($form['#confirmed'])) {
|
||||||
// Call the uninstall routine for each selected module.
|
// Call the uninstall routine for each selected module.
|
||||||
|
|
@ -1769,7 +1769,7 @@ function system_clean_url_settings() {
|
||||||
*/
|
*/
|
||||||
function system_status($check = FALSE) {
|
function system_status($check = FALSE) {
|
||||||
// Load .install files
|
// Load .install files
|
||||||
include_once './includes/install.inc';
|
include_once DRUPAL_ROOT . '/includes/install.inc';
|
||||||
drupal_load_updates();
|
drupal_load_updates();
|
||||||
|
|
||||||
// Check run-time requirements and status information.
|
// Check run-time requirements and status information.
|
||||||
|
|
@ -1877,7 +1877,7 @@ function system_sql() {
|
||||||
* Default page callback for batches.
|
* Default page callback for batches.
|
||||||
*/
|
*/
|
||||||
function system_batch_page() {
|
function system_batch_page() {
|
||||||
require_once './includes/batch.inc';
|
require_once DRUPAL_ROOT . '/includes/batch.inc';
|
||||||
$output = _batch_page();
|
$output = _batch_page();
|
||||||
if ($output === FALSE) {
|
if ($output === FALSE) {
|
||||||
drupal_access_denied();
|
drupal_access_denied();
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,7 @@ function system_requirements($phase) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test Unicode library
|
// Test Unicode library
|
||||||
include_once './includes/unicode.inc';
|
include_once DRUPAL_ROOT . '/includes/unicode.inc';
|
||||||
$requirements = array_merge($requirements, unicode_requirements());
|
$requirements = array_merge($requirements, unicode_requirements());
|
||||||
|
|
||||||
// Check for update status module.
|
// Check for update status module.
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ function _update_build_fetch_url($project, $site_key = '') {
|
||||||
* @see update_requirements()
|
* @see update_requirements()
|
||||||
*/
|
*/
|
||||||
function _update_cron_notify() {
|
function _update_cron_notify() {
|
||||||
include_once './includes/install.inc';
|
include_once DRUPAL_ROOT . '/includes/install.inc';
|
||||||
$status = update_requirements('runtime');
|
$status = update_requirements('runtime');
|
||||||
$params = array();
|
$params = array();
|
||||||
foreach (array('core', 'contrib') as $report_type) {
|
foreach (array('core', 'contrib') as $report_type) {
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ function update_help($path, $arg) {
|
||||||
return $output;
|
return $output;
|
||||||
case 'admin/build/themes':
|
case 'admin/build/themes':
|
||||||
case 'admin/build/modules':
|
case 'admin/build/modules':
|
||||||
include_once './includes/install.inc';
|
include_once DRUPAL_ROOT . '/includes/install.inc';
|
||||||
$status = update_requirements('runtime');
|
$status = update_requirements('runtime');
|
||||||
foreach (array('core', 'contrib') as $report_type) {
|
foreach (array('core', 'contrib') as $report_type) {
|
||||||
$type = 'update_' . $report_type;
|
$type = 'update_' . $report_type;
|
||||||
|
|
@ -95,7 +95,7 @@ function update_help($path, $arg) {
|
||||||
// update missing, print an error message about it.
|
// update missing, print an error message about it.
|
||||||
if (arg(0) == 'admin' && strpos($path, '#') === FALSE
|
if (arg(0) == 'admin' && strpos($path, '#') === FALSE
|
||||||
&& user_access('administer site configuration')) {
|
&& user_access('administer site configuration')) {
|
||||||
include_once './includes/install.inc';
|
include_once DRUPAL_ROOT . '/includes/install.inc';
|
||||||
$status = update_requirements('runtime');
|
$status = update_requirements('runtime');
|
||||||
foreach (array('core', 'contrib') as $report_type) {
|
foreach (array('core', 'contrib') as $report_type) {
|
||||||
$type = 'update_' . $report_type;
|
$type = 'update_' . $report_type;
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ function user_update_7000(&$sandbox) {
|
||||||
$sandbox['user_count'] = db_result(db_query("SELECT COUNT(uid) FROM {users}"));
|
$sandbox['user_count'] = db_result(db_query("SELECT COUNT(uid) FROM {users}"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
require_once variable_get('password_inc', './includes/password.inc');
|
require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
|
||||||
// Hash again all current hashed passwords.
|
// Hash again all current hashed passwords.
|
||||||
$has_rows = FALSE;
|
$has_rows = FALSE;
|
||||||
// Update this many per page load.
|
// Update this many per page load.
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@ function user_save($account, $edit = array(), $category = 'account') {
|
||||||
|
|
||||||
if (!empty($edit['pass'])) {
|
if (!empty($edit['pass'])) {
|
||||||
// Allow alternate password hashing schemes.
|
// Allow alternate password hashing schemes.
|
||||||
require_once variable_get('password_inc', './includes/password.inc');
|
require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
|
||||||
$edit['pass'] = user_hash_password(trim($edit['pass']));
|
$edit['pass'] = user_hash_password(trim($edit['pass']));
|
||||||
// Abort if the hashing failed and returned FALSE.
|
// Abort if the hashing failed and returned FALSE.
|
||||||
if (!$edit['pass']) {
|
if (!$edit['pass']) {
|
||||||
|
|
@ -1310,7 +1310,7 @@ function user_authenticate($form_values = array()) {
|
||||||
$account = db_fetch_object(db_query("SELECT * FROM {users} WHERE name = '%s' AND status = 1", $form_values['name']));
|
$account = db_fetch_object(db_query("SELECT * FROM {users} WHERE name = '%s' AND status = 1", $form_values['name']));
|
||||||
if ($account) {
|
if ($account) {
|
||||||
// Allow alternate password hashing schemes.
|
// Allow alternate password hashing schemes.
|
||||||
require_once variable_get('password_inc', './includes/password.inc');
|
require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
|
||||||
if (user_check_password($password, $account)) {
|
if (user_check_password($password, $account)) {
|
||||||
if (user_needs_new_hash($account)) {
|
if (user_needs_new_hash($account)) {
|
||||||
$new_hash = user_hash_password($password);
|
$new_hash = user_hash_password($password);
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ class UserRegistrationTestCase extends DrupalWebTestCase {
|
||||||
$this->assertText(t('The changes have been saved.'), t('Password changed to @password', array('@password' => $new_pass)));
|
$this->assertText(t('The changes have been saved.'), t('Password changed to @password', array('@password' => $new_pass)));
|
||||||
|
|
||||||
// Make sure password changes are present in database.
|
// Make sure password changes are present in database.
|
||||||
require_once variable_get('password_inc', './includes/password.inc');
|
require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
|
||||||
|
|
||||||
$user = user_load(array('uid' => $user->uid));
|
$user = user_load(array('uid' => $user->uid));
|
||||||
$this->assertTrue(user_check_password($new_pass, $user), t('Correct password in database.'));
|
$this->assertTrue(user_check_password($new_pass, $user), t('Correct password in database.'));
|
||||||
|
|
|
||||||
|
|
@ -83,8 +83,10 @@ while ($param = array_shift($_SERVER['argv'])) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once('includes/password.inc');
|
define('DRUPAL_ROOT', getcwd());
|
||||||
include_once('includes/common.inc');
|
|
||||||
|
include_once DRUPAL_ROOT . '/includes/password.inc';
|
||||||
|
include_once DRUPAL_ROOT . '/includes/common.inc';
|
||||||
|
|
||||||
foreach ($passwords as $password) {
|
foreach ($passwords as $password) {
|
||||||
print("\npassword: $password \t\thash: ". user_hash_password($password) ."\n");
|
print("\npassword: $password \t\thash: ". user_hash_password($password) ."\n");
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,8 @@ function simpletest_script_init() {
|
||||||
$_SERVER['HTTP_USER_AGENT'] = 'Drupal command line';
|
$_SERVER['HTTP_USER_AGENT'] = 'Drupal command line';
|
||||||
|
|
||||||
chdir(realpath(dirname(__FILE__) . '/..'));
|
chdir(realpath(dirname(__FILE__) . '/..'));
|
||||||
require_once './includes/bootstrap.inc';
|
define('DRUPAL_ROOT', getcwd());
|
||||||
|
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
function phptemplate_init($template) {
|
function phptemplate_init($template) {
|
||||||
$file = dirname($template->filename) . '/template.php';
|
$file = dirname($template->filename) . '/template.php';
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
include_once "./$file";
|
include_once DRUPAL_ROOT . '/' . $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
19
update.php
19
update.php
|
|
@ -1,6 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
// $Id$
|
// $Id$
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Root directory of Drupal installation.
|
||||||
|
*/
|
||||||
|
define('DRUPAL_ROOT', dirname(realpath(__FILE__)));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Administrative page for handling updates from one Drupal version to another.
|
* Administrative page for handling updates from one Drupal version to another.
|
||||||
|
|
@ -607,7 +612,7 @@ function update_check_requirements() {
|
||||||
// Our custom error handler is not yet installed, so we just suppress them.
|
// Our custom error handler is not yet installed, so we just suppress them.
|
||||||
ini_set('display_errors', FALSE);
|
ini_set('display_errors', FALSE);
|
||||||
|
|
||||||
require_once './includes/bootstrap.inc';
|
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
|
||||||
|
|
||||||
// We only load DRUPAL_BOOTSTRAP_CONFIGURATION for the update requirements
|
// We only load DRUPAL_BOOTSTRAP_CONFIGURATION for the update requirements
|
||||||
// check to avoid reaching the PHP memory limit.
|
// check to avoid reaching the PHP memory limit.
|
||||||
|
|
@ -616,12 +621,12 @@ if (empty($op)) {
|
||||||
// Minimum load of components.
|
// Minimum load of components.
|
||||||
drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION);
|
drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION);
|
||||||
|
|
||||||
require_once './includes/install.inc';
|
require_once DRUPAL_ROOT . '/includes/install.inc';
|
||||||
require_once './includes/file.inc';
|
require_once DRUPAL_ROOT . '/includes/file.inc';
|
||||||
require_once './modules/system/system.install';
|
require_once DRUPAL_ROOT . '/modules/system/system.install';
|
||||||
|
|
||||||
// Load module basics.
|
// Load module basics.
|
||||||
include_once './includes/module.inc';
|
include_once DRUPAL_ROOT . '/includes/module.inc';
|
||||||
$module_list['system']['filename'] = 'modules/system/system.module';
|
$module_list['system']['filename'] = 'modules/system/system.module';
|
||||||
$module_list['filter']['filename'] = 'modules/filter/filter.module';
|
$module_list['filter']['filename'] = 'modules/filter/filter.module';
|
||||||
module_list(TRUE, FALSE, FALSE, $module_list);
|
module_list(TRUE, FALSE, FALSE, $module_list);
|
||||||
|
|
@ -662,8 +667,8 @@ ini_set('display_errors', TRUE);
|
||||||
// Access check:
|
// Access check:
|
||||||
if (!empty($update_free_access) || $user->uid == 1) {
|
if (!empty($update_free_access) || $user->uid == 1) {
|
||||||
|
|
||||||
include_once './includes/install.inc';
|
include_once DRUPAL_ROOT . '/includes/install.inc';
|
||||||
include_once './includes/batch.inc';
|
include_once DRUPAL_ROOT . '/includes/batch.inc';
|
||||||
drupal_load_updates();
|
drupal_load_updates();
|
||||||
|
|
||||||
update_fix_d6_requirements();
|
update_fix_d6_requirements();
|
||||||
|
|
|
||||||
11
xmlrpc.php
11
xmlrpc.php
|
|
@ -6,9 +6,14 @@
|
||||||
* PHP page for handling incoming XML-RPC requests from clients.
|
* PHP page for handling incoming XML-RPC requests from clients.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once './includes/bootstrap.inc';
|
/**
|
||||||
|
* Root directory of Drupal installation.
|
||||||
|
*/
|
||||||
|
define('DRUPAL_ROOT', dirname(realpath(__FILE__)));
|
||||||
|
|
||||||
|
include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
|
||||||
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
|
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
|
||||||
include_once './includes/xmlrpc.inc';
|
include_once DRUPAL_ROOT . '/includes/xmlrpc.inc';
|
||||||
include_once './includes/xmlrpcs.inc';
|
include_once DRUPAL_ROOT . '/includes/xmlrpcs.inc';
|
||||||
|
|
||||||
xmlrpc_server(module_invoke_all('xmlrpc'));
|
xmlrpc_server(module_invoke_all('xmlrpc'));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue