diff --git README.txt README.txt
index 921f99c..904084a 100644
--- README.txt
+++ README.txt
@@ -17,7 +17,7 @@ Drupal community at http://drupal.org/community.
Legal information about Drupal:
* Know your rights when using Drupal:
- See LICENSE.txt in the same directory as this document.
+ See LICENSE.txt in the "core" directory.
* Learn about the Drupal trademark and logo policy:
http://drupal.com/trademark
@@ -35,7 +35,7 @@ core) available for download.
More about configuration:
* Install, upgrade, and maintain Drupal:
- See INSTALL.txt and UPGRADE.txt in the same directory as this document.
+ See INSTALL.txt and UPGRADE.txt in the "core" directory.
* Learn about how to use Drupal to create your site:
http://drupal.org/documentation
* Download contributed modules to sites/all/modules to extend Drupal's
diff --git core/INSTALL.txt core/INSTALL.txt
index 7b526e3..8678a4a 100644
--- core/INSTALL.txt
+++ core/INSTALL.txt
@@ -286,9 +286,9 @@ INSTALLATION
crontab utility on Unix/Linux systems. The following crontab line uses the
wget command to visit the cron.php page, and runs each hour, on the hour:
- 0 * * * * wget -O - -q -t 1 http://example.com/cron.php?cron_key=YOURKEY
+ 0 * * * * wget -O - -q -t 1 http://example.com/core/cron.php?cron_key=YOURKEY
- Replace the text "http://example.com/cron.php?cron_key=YOURKEY" in the
+ Replace the text "http://example.com/core/cron.php?cron_key=YOURKEY" in the
example with the full URL displayed under "Cron maintenance tasks" on the
"Status report" page.
diff --git core/UPGRADE.txt core/UPGRADE.txt
index edef885..ba93d42 100644
--- core/UPGRADE.txt
+++ core/UPGRADE.txt
@@ -85,7 +85,7 @@ following the instructions in the INTRODUCTION section at the top of this file:
5. Re-apply any modifications to files such as .htaccess or robots.txt.
-6. Run update.php by visiting http://www.example.com/update.php (replace
+6. Run update.php by visiting http://www.example.com/core/update.php (replace
www.example.com with your domain name). This will update the core database
tables.
@@ -189,7 +189,7 @@ following the instructions in the INTRODUCTION section at the top of this file:
sites/default/settings.php
-13. Run update.php by visiting http://www.example.com/update.php (replace
+13. Run update.php by visiting http://www.example.com/core/update.php (replace
www.example.com with your domain name). This will update the core database
tables.
diff --git core/authorize.php core/authorize.php
index cd3df50..56d1aff 100644
--- core/authorize.php
+++ core/authorize.php
@@ -20,6 +20,9 @@
* @link authorize Authorized operation helper functions @endlink
*/
+// Change the directory to the Drupal root.
+chdir('..');
+
/**
* Root directory of Drupal installation.
*/
@@ -59,12 +62,12 @@ function authorize_access_allowed() {
// *** Real work of the script begins here. ***
-require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
-require_once DRUPAL_ROOT . '/includes/session.inc';
-require_once DRUPAL_ROOT . '/includes/common.inc';
-require_once DRUPAL_ROOT . '/includes/file.inc';
-require_once DRUPAL_ROOT . '/includes/module.inc';
-require_once DRUPAL_ROOT . '/includes/ajax.inc';
+require_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
+require_once DRUPAL_ROOT . '/core/includes/session.inc';
+require_once DRUPAL_ROOT . '/core/includes/common.inc';
+require_once DRUPAL_ROOT . '/core/includes/file.inc';
+require_once DRUPAL_ROOT . '/core/includes/module.inc';
+require_once DRUPAL_ROOT . '/core/includes/ajax.inc';
// We prepare only a minimal bootstrap. This includes the database and
// variables, however, so we have access to the class autoloader registry.
@@ -75,8 +78,8 @@ global $conf;
// We have to enable the user and system modules, even to check access and
// display errors via the maintainence theme.
-$module_list['system']['filename'] = 'modules/system/system.module';
-$module_list['user']['filename'] = 'modules/user/user.module';
+$module_list['system']['filename'] = 'core/modules/system/system.module';
+$module_list['user']['filename'] = 'core/modules/user/user.module';
module_list(TRUE, FALSE, FALSE, $module_list);
drupal_load('module', 'system');
drupal_load('module', 'user');
@@ -95,10 +98,10 @@ $show_messages = TRUE;
if (authorize_access_allowed()) {
// Load both the Form API and Batch API.
- require_once DRUPAL_ROOT . '/includes/form.inc';
- require_once DRUPAL_ROOT . '/includes/batch.inc';
+ require_once DRUPAL_ROOT . '/core/includes/form.inc';
+ require_once DRUPAL_ROOT . '/core/includes/batch.inc';
// Load the code that drives the authorize process.
- require_once DRUPAL_ROOT . '/includes/authorize.inc';
+ require_once DRUPAL_ROOT . '/core/includes/authorize.inc';
// For the sake of Batch API and a few other low-level functions, we need to
// initialize the URL path into $_GET['q']. However, we do not want to raise
diff --git core/cron.php core/cron.php
index c6ce531..fa9aa14 100644
--- core/cron.php
+++ core/cron.php
@@ -5,12 +5,15 @@
* Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).
*/
+// Change the directory to the Drupal root.
+chdir('..');
+
/**
* Root directory of Drupal installation.
*/
define('DRUPAL_ROOT', getcwd());
-include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
+include_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
if (!isset($_GET['cron_key']) || variable_get('cron_key', 'drupal') != $_GET['cron_key']) {
diff --git core/includes/bootstrap.inc core/includes/bootstrap.inc
index de9a175..507cfa1 100644
--- core/includes/bootstrap.inc
+++ core/includes/bootstrap.inc
@@ -575,7 +575,15 @@ function drupal_settings_initialize() {
// $_SERVER['SCRIPT_NAME'] can, in contrast to $_SERVER['PHP_SELF'], not
// be modified by a visitor.
if ($dir = rtrim(dirname($_SERVER['SCRIPT_NAME']), '\/')) {
- $base_path = $dir;
+ // Remove "core" directory if present, allowing install.php, update.php,
+ // cron.php and others to auto-detect a base path.
+ $core_position = strrpos($dir, '/core');
+ if ($core_position !== FALSE && strlen($dir) - 5 == $core_position) {
+ $base_path = substr($dir, 0, $core_position);
+ }
+ else {
+ $base_path = $dir;
+ }
$base_url .= $base_path;
$base_path .= '/';
}
@@ -703,7 +711,7 @@ function drupal_get_filename($type, $name, $filename = NULL) {
}
if (!function_exists('drupal_system_listing')) {
- require_once DRUPAL_ROOT . '/includes/common.inc';
+ require_once DRUPAL_ROOT . '/core/includes/common.inc';
}
// Scan the appropriate directories for all files with the requested
// extension, not just the file we are currently looking for. This
@@ -1443,7 +1451,7 @@ function watchdog_exception($type, Exception $exception, $message = NULL, $varia
$variables = array();
}
- require_once DRUPAL_ROOT . '/includes/errors.inc';
+ require_once DRUPAL_ROOT . '/core/includes/errors.inc';
$variables += _drupal_decode_exception($exception);
watchdog($type, $message, $variables, $severity, $link);
}
@@ -1911,7 +1919,7 @@ function drupal_bootstrap($phase = NULL, $new_phase = TRUE) {
break;
case DRUPAL_BOOTSTRAP_SESSION:
- require_once DRUPAL_ROOT . '/' . variable_get('session_inc', 'includes/session.inc');
+ require_once DRUPAL_ROOT . '/' . variable_get('session_inc', 'core/includes/session.inc');
drupal_session_initialize();
break;
@@ -1924,7 +1932,7 @@ function drupal_bootstrap($phase = NULL, $new_phase = TRUE) {
break;
case DRUPAL_BOOTSTRAP_FULL:
- require_once DRUPAL_ROOT . '/includes/common.inc';
+ require_once DRUPAL_ROOT . '/core/includes/common.inc';
_drupal_bootstrap_full();
break;
}
@@ -1963,7 +1971,7 @@ function drupal_get_user_timezone() {
* An array that points to the active symbol table at the point the error occurred.
*/
function _drupal_error_handler($error_level, $message, $filename, $line, $context) {
- require_once DRUPAL_ROOT . '/includes/errors.inc';
+ require_once DRUPAL_ROOT . '/core/includes/errors.inc';
_drupal_error_handler_real($error_level, $message, $filename, $line, $context);
}
@@ -1978,7 +1986,7 @@ function _drupal_error_handler($error_level, $message, $filename, $line, $contex
* The exception object that was thrown.
*/
function _drupal_exception_handler($exception) {
- require_once DRUPAL_ROOT . '/includes/errors.inc';
+ require_once DRUPAL_ROOT . '/core/includes/errors.inc';
try {
// Log the message to the watchdog and return an error page to the user.
@@ -2018,7 +2026,7 @@ function _drupal_bootstrap_page_cache() {
// Allow specifying special cache handlers in settings.php, like
// using memcached or files for storing cache information.
- require_once DRUPAL_ROOT . '/includes/cache.inc';
+ require_once DRUPAL_ROOT . '/core/includes/cache.inc';
foreach (variable_get('cache_backends', array()) as $include) {
require_once DRUPAL_ROOT . '/' . $include;
}
@@ -2074,8 +2082,8 @@ function _drupal_bootstrap_database() {
// installed yet (i.e., if no $databases array has been defined in the
// settings.php file) and we are not already installing.
if (empty($GLOBALS['databases']) && !drupal_installation_attempted()) {
- include_once DRUPAL_ROOT . '/includes/install.inc';
- install_goto('install.php');
+ include_once DRUPAL_ROOT . '/core/includes/install.inc';
+ install_goto('core/install.php');
}
// The user agent header is used to pass a database prefix in the request when
@@ -2108,7 +2116,7 @@ function _drupal_bootstrap_database() {
// Initialize the database system. Note that the connection
// won't be initialized until it is actually requested.
- require_once DRUPAL_ROOT . '/includes/database/database.inc';
+ require_once DRUPAL_ROOT . '/core/includes/database/database.inc';
// Register autoload functions so that we can access classes and interfaces.
// The database autoload routine comes first so that we can load the database
@@ -2125,13 +2133,13 @@ function _drupal_bootstrap_variables() {
global $conf;
// Initialize the lock system.
- require_once DRUPAL_ROOT . '/' . variable_get('lock_inc', 'includes/lock.inc');
+ require_once DRUPAL_ROOT . '/' . variable_get('lock_inc', 'core/includes/lock.inc');
lock_initialize();
// Load variables from the database, but do not overwrite variables set in settings.php.
$conf = variable_initialize(isset($conf) ? $conf : array());
// Load bootstrap modules.
- require_once DRUPAL_ROOT . '/includes/module.inc';
+ require_once DRUPAL_ROOT . '/core/includes/module.inc';
module_load_all(TRUE);
}
@@ -2223,7 +2231,7 @@ function drupal_generate_test_ua($prefix) {
* @see _drupal_maintenance_theme()
*/
function drupal_maintenance_theme() {
- require_once DRUPAL_ROOT . '/includes/theme.maintenance.inc';
+ require_once DRUPAL_ROOT . '/core/includes/theme.maintenance.inc';
_drupal_maintenance_theme();
}
@@ -2263,7 +2271,7 @@ function drupal_language_initialize() {
$GLOBALS[$type] = $default;
}
if (drupal_multilingual()) {
- include_once DRUPAL_ROOT . '/includes/language.inc';
+ include_once DRUPAL_ROOT . '/core/includes/language.inc';
foreach ($types as $type) {
$GLOBALS[$type] = language_initialize($type);
}
@@ -2535,7 +2543,7 @@ function drupal_get_schema($table = NULL, $rebuild = FALSE) {
module_load_all_includes('install');
}
- require_once DRUPAL_ROOT . '/includes/common.inc';
+ require_once DRUPAL_ROOT . '/core/includes/common.inc';
// Invoke hook_schema for all modules.
foreach (module_implements('schema') as $module) {
// Cast the result of hook_schema() to an array, as a NULL return value
@@ -2709,7 +2717,7 @@ function registry_rebuild() {
* @see registry_rebuild()
*/
function registry_update() {
- require_once DRUPAL_ROOT . '/includes/registry.inc';
+ require_once DRUPAL_ROOT . '/core/includes/registry.inc';
_registry_update();
}
@@ -2951,7 +2959,7 @@ function _drupal_shutdown_function() {
}
catch (Exception $exception) {
// If we are displaying errors, then do so with no possibility of a further uncaught exception being thrown.
- require_once DRUPAL_ROOT . '/includes/errors.inc';
+ require_once DRUPAL_ROOT . '/core/includes/errors.inc';
if (error_displayable()) {
print '
Uncaught exception thrown in shutdown function.
';
print '' . _drupal_render_exception_safe($exception) . '
';
diff --git core/includes/common.inc core/includes/common.inc
index 00b2e71..f25a699 100644
--- core/includes/common.inc
+++ core/includes/common.inc
@@ -1550,7 +1550,7 @@ function filter_xss_bad_protocol($string, $decode = TRUE) {
// string that needs decoding.
if ($decode) {
if (!function_exists('decode_entities')) {
- require_once DRUPAL_ROOT . '/includes/unicode.inc';
+ require_once DRUPAL_ROOT . '/core/includes/unicode.inc';
}
$string = decode_entities($string);
@@ -2768,9 +2768,9 @@ function drupal_add_html_head_link($attributes, $header = FALSE) {
* - 'basename': Force a basename for the file being added. Modules are
* expected to use stylesheets with unique filenames, but integration of
* external libraries may make this impossible. The basename of
- * 'modules/node/node.css' is 'node.css'. If the external library "node.js"
- * ships with a 'node.css', then a different, unique basename would be
- * 'node.js.css'.
+ * 'core/modules/node/node.css' is 'node.css'. If the external library
+ * "node.js" ships with a 'node.css', then a different, unique basename
+ * would be 'node.js.css'.
* - 'group': A number identifying the group in which to add the stylesheet.
* Available constants are:
* - CSS_SYSTEM: Any system-layer CSS.
@@ -3803,8 +3803,8 @@ function drupal_region_class($region) {
*
* Examples:
* @code
- * drupal_add_js('misc/collapse.js');
- * drupal_add_js('misc/collapse.js', 'file');
+ * drupal_add_js('core/misc/collapse.js');
+ * drupal_add_js('core/misc/collapse.js', 'file');
* drupal_add_js('jQuery(document).ready(function () { alert("Hello!"); });', 'inline');
* drupal_add_js('jQuery(document).ready(function () { alert("Hello!"); });',
* array('type' => 'inline', 'scope' => 'footer', 'weight' => 5)
@@ -3960,8 +3960,8 @@ function drupal_add_js($data = NULL, $options = NULL) {
'every_page' => TRUE,
'weight' => 0,
),
- 'misc/drupal.js' => array(
- 'data' => 'misc/drupal.js',
+ 'core/misc/drupal.js' => array(
+ 'data' => 'core/misc/drupal.js',
'type' => 'file',
'scope' => 'header',
'group' => JS_LIBRARY,
@@ -4684,7 +4684,7 @@ function drupal_add_tabledrag($table_id, $action, $relationship, $group, $subgro
// to ensure that table drag behaviors are registered before any module
// uses it.
drupal_add_library('system', 'jquery.cookie');
- drupal_add_js('misc/tabledrag.js', array('weight' => -1));
+ drupal_add_js('core/misc/tabledrag.js', array('weight' => -1));
$js_added = TRUE;
}
@@ -4881,20 +4881,20 @@ function _drupal_bootstrap_full() {
return;
}
$called = TRUE;
- 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 . '/includes/tablesort.inc';
- require_once DRUPAL_ROOT . '/includes/file.inc';
- require_once DRUPAL_ROOT . '/includes/unicode.inc';
- require_once DRUPAL_ROOT . '/includes/image.inc';
- require_once DRUPAL_ROOT . '/includes/form.inc';
- require_once DRUPAL_ROOT . '/includes/mail.inc';
- require_once DRUPAL_ROOT . '/includes/actions.inc';
- require_once DRUPAL_ROOT . '/includes/ajax.inc';
- require_once DRUPAL_ROOT . '/includes/token.inc';
- require_once DRUPAL_ROOT . '/includes/errors.inc';
+ require_once DRUPAL_ROOT . '/' . variable_get('path_inc', 'core/includes/path.inc');
+ require_once DRUPAL_ROOT . '/core/includes/theme.inc';
+ require_once DRUPAL_ROOT . '/core/includes/pager.inc';
+ require_once DRUPAL_ROOT . '/' . variable_get('menu_inc', 'core/includes/menu.inc');
+ require_once DRUPAL_ROOT . '/core/includes/tablesort.inc';
+ require_once DRUPAL_ROOT . '/core/includes/file.inc';
+ require_once DRUPAL_ROOT . '/core/includes/unicode.inc';
+ require_once DRUPAL_ROOT . '/core/includes/image.inc';
+ require_once DRUPAL_ROOT . '/core/includes/form.inc';
+ require_once DRUPAL_ROOT . '/core/includes/mail.inc';
+ require_once DRUPAL_ROOT . '/core/includes/actions.inc';
+ require_once DRUPAL_ROOT . '/core/includes/ajax.inc';
+ require_once DRUPAL_ROOT . '/core/includes/token.inc';
+ require_once DRUPAL_ROOT . '/core/includes/errors.inc';
// Detect string handling method
unicode_check();
@@ -5096,7 +5096,7 @@ function drupal_cron_cleanup() {
* The preg_match() regular expression for the files to find.
* @param string $directory
* The subdirectory name in which the files are found. For example,
- * 'modules' will search in sub-directories of the top-level /modules
+ * 'core/modules' will search in sub-directories of the /core/modules
* directory, sub-directories of /sites/all/modules/, etc.
* @param string $key
* The key to be used for the associative array returned. Possible values are
@@ -5106,7 +5106,8 @@ function drupal_cron_cleanup() {
* @param int $min_depth
* Minimum depth of directories to return files from, relative to each
* directory searched. For instance, a minimum depth of 2 would find modules
- * inside /modules/node/tests, but not modules directly in /modules/node.
+ * inside /core/modules/node/tests, but not modules directly in
+ * /core/modules/node.
*
* @return array
* An associative array of file objects, keyed on the chosen key. Each element
@@ -5117,16 +5118,16 @@ function drupal_cron_cleanup() {
*/
function drupal_system_listing($mask, $directory, $key = 'name', $min_depth = 1) {
$config = conf_path();
-
- $profile = drupal_get_profile();
-
- $searchdir = array($directory);
$files = array();
+ // Search for the directory in core.
+ $searchdir = array('core/' . $directory);
+
// The 'profiles' directory contains pristine collections of modules and
// themes as organized by a distribution. It is pristine in the same way
// that /modules is pristine for core; users should avoid changing anything
// there in favor of sites/all or sites/ directories.
+ $profile = drupal_get_profile();
if (file_exists("profiles/$profile/$directory")) {
$searchdir[] = "profiles/$profile/$directory";
}
@@ -5140,7 +5141,7 @@ function drupal_system_listing($mask, $directory, $key = 'name', $min_depth = 1)
// Get current list of items
if (!function_exists('file_scan_directory')) {
- require_once DRUPAL_ROOT . '/includes/file.inc';
+ require_once DRUPAL_ROOT . '/core/includes/file.inc';
}
foreach ($searchdir as $dir) {
$files_to_add = file_scan_directory($dir, $mask, array('key' => $key, 'min_depth' => $min_depth));
@@ -7673,7 +7674,7 @@ function entity_form_submit_build_entity($entity_type, $entity, $form, &$form_st
* failed. See xmlrpc_error().
*/
function xmlrpc($url, $args, $options = array()) {
- require_once DRUPAL_ROOT . '/includes/xmlrpc.inc';
+ require_once DRUPAL_ROOT . '/core/includes/xmlrpc.inc';
return _xmlrpc($url, $args, $options);
}
diff --git core/includes/database/database.inc core/includes/database/database.inc
index 4a3cbb4..8306fa9 100644
--- core/includes/database/database.inc
+++ core/includes/database/database.inc
@@ -1568,7 +1568,7 @@ abstract class Database {
// We cannot rely on the registry yet, because the registry requires an
// open database connection.
$driver_class = 'DatabaseConnection_' . $driver;
- require_once DRUPAL_ROOT . '/includes/database/' . $driver . '/database.inc';
+ require_once DRUPAL_ROOT . '/core/includes/database/' . $driver . '/database.inc';
$new_connection = new $driver_class(self::$databaseInfo[$key][$target]);
$new_connection->setTarget($target);
$new_connection->setKey($key);
diff --git core/includes/database/schema.inc core/includes/database/schema.inc
index de1b2f5..b34713f 100644
--- core/includes/database/schema.inc
+++ core/includes/database/schema.inc
@@ -245,7 +245,8 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface {
* method should be overwritten by a database driver if the database provider
* uses alternate methods. Because information_schema.tables is used in a few
* different functions, a database driver will only need to override this function
- * to make all the others work. For example see includes/databases/mysql/schema.inc.
+ * to make all the others work. For example see
+ * core/includes/databases/mysql/schema.inc.
*
* @param $table_name
* The name of the table in question.
diff --git core/includes/database/sqlite/database.inc core/includes/database/sqlite/database.inc
index cf3b955..caaabf9 100644
--- core/includes/database/sqlite/database.inc
+++ core/includes/database/sqlite/database.inc
@@ -10,7 +10,7 @@
* @{
*/
-include_once DRUPAL_ROOT . '/includes/database/prefetch.inc';
+include_once DRUPAL_ROOT . '/core/includes/database/prefetch.inc';
/**
* Specific SQLite implementation of DatabaseConnection.
diff --git core/includes/errors.inc core/includes/errors.inc
index 3a97b6d..bdb6058 100644
--- core/includes/errors.inc
+++ core/includes/errors.inc
@@ -70,7 +70,7 @@ function _drupal_error_handler_real($error_level, $message, $filename, $line, $c
$caller = _drupal_get_last_caller(debug_backtrace());
if (!function_exists('filter_xss_admin')) {
- require_once DRUPAL_ROOT . '/includes/common.inc';
+ require_once DRUPAL_ROOT . '/core/includes/common.inc';
}
// We treat recoverable errors as fatal.
diff --git core/includes/file.inc core/includes/file.inc
index 26a6c41..a7b5029 100644
--- core/includes/file.inc
+++ core/includes/file.inc
@@ -12,7 +12,7 @@
* File API is needed before a bootstrap, or in an alternate order (e.g.
* maintenance theme).
*/
-require_once DRUPAL_ROOT . '/includes/stream_wrappers.inc';
+require_once DRUPAL_ROOT . '/core/includes/stream_wrappers.inc';
/**
* @defgroup file File interface
diff --git core/includes/form.inc core/includes/form.inc
index c0163ca..0b90515 100644
--- core/includes/form.inc
+++ core/includes/form.inc
@@ -3162,7 +3162,7 @@ function theme_tableselect($variables) {
// checkboxes/radios in the first table column.
if ($element['#js_select']) {
// Add a "Select all" checkbox.
- drupal_add_js('misc/tableselect.js');
+ drupal_add_js('core/misc/tableselect.js');
array_unshift($header, array('class' => array('select-all')));
}
else {
@@ -3329,7 +3329,7 @@ function form_process_machine_name($element, &$form_state) {
),
),
);
- $element['#attached']['js'][] = 'misc/machine-name.js';
+ $element['#attached']['js'][] = 'core/misc/machine-name.js';
$element['#attached']['js'][] = $js_settings;
return $element;
@@ -4281,7 +4281,7 @@ function batch_process($redirect = NULL, $url = 'batch', $redirect_callback = 'd
else {
// Non-progressive execution: bypass the whole progressbar workflow
// and execute the batch in one pass.
- require_once DRUPAL_ROOT . '/includes/batch.inc';
+ require_once DRUPAL_ROOT . '/core/includes/batch.inc';
_batch_process();
}
}
@@ -4350,8 +4350,8 @@ function _batch_queue($batch_set) {
// sure the files are manually included.
if (!isset($queues)) {
$queues = array();
- require_once DRUPAL_ROOT . '/modules/system/system.queue.inc';
- require_once DRUPAL_ROOT . '/includes/batch.queue.inc';
+ require_once DRUPAL_ROOT . '/core/modules/system/system.queue.inc';
+ require_once DRUPAL_ROOT . '/core/includes/batch.queue.inc';
}
if (isset($batch_set['queue'])) {
diff --git core/includes/install.core.inc core/includes/install.core.inc
index a74dfdf..4696446 100644
--- core/includes/install.core.inc
+++ core/includes/install.core.inc
@@ -222,7 +222,7 @@ function install_begin_request(&$install_state) {
}
// Allow command line scripts to override server variables used by Drupal.
- require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
+ require_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
if (!$install_state['interactive']) {
drupal_override_server_variables($install_state['server']);
}
@@ -240,23 +240,23 @@ function install_begin_request(&$install_state) {
// This must go after drupal_bootstrap(), which unsets globals!
global $conf;
- require_once DRUPAL_ROOT . '/modules/system/system.install';
- require_once DRUPAL_ROOT . '/includes/common.inc';
- require_once DRUPAL_ROOT . '/includes/file.inc';
- require_once DRUPAL_ROOT . '/includes/install.inc';
- require_once DRUPAL_ROOT . '/' . variable_get('path_inc', 'includes/path.inc');
+ require_once DRUPAL_ROOT . '/core/modules/system/system.install';
+ require_once DRUPAL_ROOT . '/core/includes/common.inc';
+ require_once DRUPAL_ROOT . '/core/includes/file.inc';
+ require_once DRUPAL_ROOT . '/core/includes/install.inc';
+ require_once DRUPAL_ROOT . '/' . variable_get('path_inc', 'core/includes/path.inc');
// Load module basics (needed for hook invokes).
- include_once DRUPAL_ROOT . '/includes/module.inc';
- include_once DRUPAL_ROOT . '/includes/session.inc';
+ include_once DRUPAL_ROOT . '/core/includes/module.inc';
+ include_once DRUPAL_ROOT . '/core/includes/session.inc';
// Set up $language, so t() caller functions will still work.
drupal_language_initialize();
- include_once DRUPAL_ROOT . '/includes/entity.inc';
- require_once DRUPAL_ROOT . '/includes/ajax.inc';
- $module_list['system']['filename'] = 'modules/system/system.module';
- $module_list['user']['filename'] = 'modules/user/user.module';
+ include_once DRUPAL_ROOT . '/core/includes/entity.inc';
+ require_once DRUPAL_ROOT . '/core/includes/ajax.inc';
+ $module_list['system']['filename'] = 'core/modules/system/system.module';
+ $module_list['user']['filename'] = 'core/modules/user/user.module';
module_list(TRUE, FALSE, FALSE, $module_list);
drupal_load('module', 'system');
drupal_load('module', 'user');
@@ -270,8 +270,8 @@ function install_begin_request(&$install_state) {
// continue using the cache implementation they started with) and also
// because any data put in the cache during the installer is inherently
// suspect, due to the fact that Drupal is not fully set up yet.
- require_once DRUPAL_ROOT . '/includes/cache.inc';
- require_once DRUPAL_ROOT . '/includes/cache-install.inc';
+ require_once DRUPAL_ROOT . '/core/includes/cache.inc';
+ require_once DRUPAL_ROOT . '/core/includes/cache-install.inc';
$conf['cache_default_class'] = 'DrupalFakeCache';
// Prepare for themed output. We need to run this at the beginning of the
@@ -287,7 +287,7 @@ function install_begin_request(&$install_state) {
if ($install_state['settings_verified']) {
// Initialize the database system. Note that the connection
// won't be initialized until it is actually requested.
- require_once DRUPAL_ROOT . '/includes/database/database.inc';
+ require_once DRUPAL_ROOT . '/core/includes/database/database.inc';
// Verify the last completed task in the database, if there is one.
$task = install_verify_completed_task();
@@ -377,7 +377,7 @@ function install_run_task($task, &$install_state) {
$function = $task['function'];
if ($task['type'] == 'form') {
- require_once DRUPAL_ROOT . '/includes/form.inc';
+ require_once DRUPAL_ROOT . '/core/includes/form.inc';
if ($install_state['interactive']) {
// For interactive forms, build the form and ensure that it will not
// redirect, since the installer handles its own redirection only after
@@ -448,7 +448,7 @@ function install_run_task($task, &$install_state) {
// If we are in the middle of processing this batch, keep sending back
// any output from the batch process, until the task is complete.
elseif ($current_batch == $function) {
- include_once DRUPAL_ROOT . '/includes/batch.inc';
+ include_once DRUPAL_ROOT . '/core/includes/batch.inc';
$output = _batch_page();
// The task is complete when we try to access the batch page and receive
// FALSE in return, since this means we are at a URL where we are no
@@ -656,7 +656,7 @@ function install_tasks_to_display($install_state) {
* @see install_full_redirect_url()
*/
function install_redirect_url($install_state) {
- return 'install.php?' . drupal_http_build_query($install_state['parameters']);
+ return 'core/install.php?' . drupal_http_build_query($install_state['parameters']);
}
/**
@@ -1009,7 +1009,7 @@ function install_select_profile(&$install_state) {
// yet), rather just a convenience method for setting parameters in the
// URL.
if ($install_state['interactive']) {
- include_once DRUPAL_ROOT . '/includes/form.inc';
+ include_once DRUPAL_ROOT . '/core/includes/form.inc';
drupal_set_title(st('Select an installation profile'));
$form = drupal_get_form('install_select_profile_form', $install_state['profiles']);
return drupal_render($form);
@@ -1185,7 +1185,7 @@ function install_select_locale(&$install_state) {
$output .= '';
}
else {
- include_once DRUPAL_ROOT . '/includes/form.inc';
+ include_once DRUPAL_ROOT . '/core/includes/form.inc';
$elements = drupal_get_form('install_select_locale_form', $locales, $profilename);
$output = drupal_render($elements);
}
@@ -1219,7 +1219,7 @@ function install_select_locale(&$install_state) {
// URL.
if ($install_state['interactive']) {
drupal_set_title(st('Choose language'));
- include_once DRUPAL_ROOT . '/includes/form.inc';
+ include_once DRUPAL_ROOT . '/core/includes/form.inc';
$elements = drupal_get_form('install_select_locale_form', $locales, $profilename);
return drupal_render($elements);
}
@@ -1234,7 +1234,7 @@ function install_select_locale(&$install_state) {
* Form API array definition for language selection.
*/
function install_select_locale_form($form, &$form_state, $locales, $profilename) {
- include_once DRUPAL_ROOT . '/includes/iso.inc';
+ include_once DRUPAL_ROOT . '/core/includes/iso.inc';
$languages = _locale_get_predefined_list();
foreach ($locales as $locale) {
$name = $locale->langcode;
@@ -1372,10 +1372,10 @@ function install_profile_modules(&$install_state) {
* The batch definition, if there are language files to import.
*/
function install_import_locales(&$install_state) {
- include_once DRUPAL_ROOT . '/includes/locale.inc';
+ include_once DRUPAL_ROOT . '/core/includes/locale.inc';
$install_locale = $install_state['parameters']['locale'];
- include_once DRUPAL_ROOT . '/includes/iso.inc';
+ include_once DRUPAL_ROOT . '/core/includes/iso.inc';
$predefined = _locale_get_predefined_list();
if (!isset($predefined[$install_locale])) {
// Drupal does not know about this language, so we prefill its values with
@@ -1433,7 +1433,7 @@ function install_configure_form($form, &$form_state, &$install_state) {
drupal_add_js(drupal_get_path('module', 'system') . '/system.js');
// Add JavaScript time zone detection.
- drupal_add_js('misc/timezone.js');
+ drupal_add_js('core/misc/timezone.js');
// We add these strings as settings because JavaScript translation does not
// work on install time.
drupal_add_js(array('copyFieldValue' => array('edit-site-mail' => array('edit-account-mail'))), 'setting');
@@ -1467,7 +1467,7 @@ function install_configure_form($form, &$form_state, &$install_state) {
* The batch definition, if there are language files to import.
*/
function install_import_locales_remaining(&$install_state) {
- include_once DRUPAL_ROOT . '/includes/locale.inc';
+ include_once DRUPAL_ROOT . '/core/includes/locale.inc';
// Collect files to import for this language. Skip components already covered
// in the initial batch set.
$install_locale = $install_state['parameters']['locale'];
@@ -1628,7 +1628,7 @@ function install_check_requirements($install_state) {
'title' => st('Settings file'),
'value' => st('The settings file does not exist.'),
'severity' => REQUIREMENT_ERROR,
- 'description' => st('The @drupal installer requires that you create a settings file as part of the installation process. Copy the %default_file file to %file. More details about installing Drupal are available in INSTALL.txt.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '%default_file' => $default_settings_file, '@install_txt' => base_path() . 'INSTALL.txt')),
+ 'description' => st('The @drupal installer requires that you create a settings file as part of the installation process. Copy the %default_file file to %file. More details about installing Drupal are available in INSTALL.txt.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '%default_file' => $default_settings_file, '@install_txt' => base_path() . 'core/INSTALL.txt')),
);
}
else {
@@ -1656,7 +1656,7 @@ function install_check_requirements($install_state) {
'title' => st('Settings file'),
'value' => st('The settings file is owned by the web server.'),
'severity' => REQUIREMENT_ERROR,
- 'description' => st('The @drupal installer failed to create a settings file with proper file ownership. Log on to your web server, remove the existing %file file, and create a new one by copying the %default_file file to %file. More details about installing Drupal are available in INSTALL.txt. If you have problems with the file permissions on your server, consult the online handbook.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '%default_file' => $default_settings_file, '@install_txt' => base_path() . 'INSTALL.txt', '@handbook_url' => 'http://drupal.org/server-permissions')),
+ 'description' => st('The @drupal installer failed to create a settings file with proper file ownership. Log on to your web server, remove the existing %file file, and create a new one by copying the %default_file file to %file. More details about installing Drupal are available in INSTALL.txt. If you have problems with the file permissions on your server, consult the online handbook.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '%default_file' => $default_settings_file, '@install_txt' => base_path() . 'core/INSTALL.txt', '@handbook_url' => 'http://drupal.org/server-permissions')),
);
}
}
@@ -1668,7 +1668,7 @@ function install_check_requirements($install_state) {
* Forms API array definition for site configuration.
*/
function _install_configure_form($form, &$form_state, &$install_state) {
- include_once DRUPAL_ROOT . '/includes/locale.inc';
+ include_once DRUPAL_ROOT . '/core/includes/locale.inc';
$form['site_information'] = array(
'#type' => 'fieldset',
diff --git core/includes/install.inc core/includes/install.inc
index 14b5d7e..dad5402 100644
--- core/includes/install.inc
+++ core/includes/install.inc
@@ -212,7 +212,7 @@ function drupal_install_profile_distribution_name() {
* @return
* The auto-detected $base_url that should be configured in settings.php
*/
-function drupal_detect_baseurl($file = 'install.php') {
+function drupal_detect_baseurl($file = 'core/install.php') {
$proto = $_SERVER['HTTPS'] ? 'https://' : 'http://';
$host = $_SERVER['SERVER_NAME'];
$port = ($_SERVER['SERVER_PORT'] == 80 ? '' : ':' . $_SERVER['SERVER_PORT']);
@@ -247,13 +247,13 @@ function drupal_detect_database_types() {
function drupal_get_database_types() {
$databases = array();
- // We define a driver as a directory in /includes/database that in turn
+ // We define a driver as a directory in /core/includes/database that in turn
// contains a database.inc file. That allows us to drop in additional drivers
// without modifying the installer.
// Because we have no registry yet, we need to also include the install.inc
// file for the driver explicitly.
- require_once DRUPAL_ROOT . '/includes/database/database.inc';
- foreach (file_scan_directory(DRUPAL_ROOT . '/includes/database', '/^[a-z]*$/i', array('recurse' => FALSE)) as $file) {
+ require_once DRUPAL_ROOT . '/core/includes/database/database.inc';
+ foreach (file_scan_directory(DRUPAL_ROOT . '/core/includes/database', '/^[a-z]*$/i', array('recurse' => FALSE)) as $file) {
if (file_exists($file->uri . '/database.inc') && file_exists($file->uri . '/install.inc')) {
$drivers[$file->filename] = $file->uri;
}
@@ -665,8 +665,8 @@ function drupal_verify_profile($install_state) {
$profile = $install_state['parameters']['profile'];
$locale = $install_state['parameters']['locale'];
- include_once DRUPAL_ROOT . '/includes/file.inc';
- include_once DRUPAL_ROOT . '/includes/common.inc';
+ include_once DRUPAL_ROOT . '/core/includes/file.inc';
+ include_once DRUPAL_ROOT . '/core/includes/common.inc';
$profile_file = DRUPAL_ROOT . "/profiles/$profile/$profile.profile";
@@ -1042,7 +1042,7 @@ function drupal_install_fix_file($file, $mask, $message = TRUE) {
*/
function install_goto($path) {
global $base_url;
- include_once DRUPAL_ROOT . '/includes/common.inc';
+ include_once DRUPAL_ROOT . '/core/includes/common.inc';
header('Location: ' . $base_url . '/' . $path);
header('Cache-Control: no-cache'); // Not a permanent redirect.
drupal_exit();
@@ -1074,7 +1074,7 @@ function st($string, array $args = array(), array $options = array()) {
// that multiple files end with the same extension, even if unlikely.
$po_files = file_scan_directory('./profiles/' . $install_state['parameters']['profile'] . '/translations', '/'. $install_state['parameters']['locale'] .'\.po$/', array('recurse' => FALSE));
if (count($po_files)) {
- require_once DRUPAL_ROOT . '/includes/locale.inc';
+ require_once DRUPAL_ROOT . '/core/includes/locale.inc';
foreach ($po_files as $po_file) {
_locale_import_read_po('mem-store', $po_file);
}
@@ -1083,7 +1083,7 @@ function st($string, array $args = array(), array $options = array()) {
}
}
- require_once DRUPAL_ROOT . '/includes/theme.inc';
+ require_once DRUPAL_ROOT . '/core/includes/theme.inc';
// Transform arguments before inserting them
foreach ($args as $key => $value) {
switch ($key[0]) {
@@ -1112,7 +1112,7 @@ function st($string, array $args = array(), array $options = array()) {
* Array of the install profile's requirements.
*/
function drupal_check_profile($profile) {
- include_once DRUPAL_ROOT . '/includes/file.inc';
+ include_once DRUPAL_ROOT . '/core/includes/file.inc';
$profile_file = DRUPAL_ROOT . "/profiles/$profile/$profile.profile";
diff --git core/includes/locale.inc core/includes/locale.inc
index 578b1b3..589cd7c 100644
--- core/includes/locale.inc
+++ core/includes/locale.inc
@@ -460,7 +460,7 @@ function locale_add_language($langcode, $name = NULL, $native = NULL, $direction
// If name was not set, we add a predefined language.
if (!isset($name)) {
- include_once DRUPAL_ROOT . '/includes/iso.inc';
+ include_once DRUPAL_ROOT . '/core/includes/iso.inc';
$predefined = _locale_get_predefined_list();
$name = $predefined[$langcode][0];
$native = isset($predefined[$langcode][1]) ? $predefined[$langcode][1] : $predefined[$langcode][0];
@@ -2006,7 +2006,7 @@ function _locale_translate_language_list($translation, $limit_language) {
* Prepares the language code list for a select form item with only the unsupported ones
*/
function _locale_prepare_predefined_list() {
- include_once DRUPAL_ROOT . '/includes/iso.inc';
+ include_once DRUPAL_ROOT . '/core/includes/iso.inc';
$languages = language_list();
$predefined = _locale_get_predefined_list();
foreach ($predefined as $key => $value) {
@@ -2138,7 +2138,7 @@ function _locale_batch_build($files, $finished = NULL, $components = array()) {
'title' => $t('Importing interface translations'),
'init_message' => $t('Starting import'),
'error_message' => $t('Error importing interface translations'),
- 'file' => 'includes/locale.inc',
+ 'file' => 'core/includes/locale.inc',
// This is not a batch API construct, but data passed along to the
// installer, so we know what did we import already.
'#components' => $components,
@@ -2200,7 +2200,7 @@ function _locale_batch_language_finished($success, $results) {
* An array of all country code => country name pairs.
*/
function country_get_list() {
- include_once DRUPAL_ROOT . '/includes/iso.inc';
+ include_once DRUPAL_ROOT . '/core/includes/iso.inc';
$countries = _country_get_predefined_list();
// Allow other modules to modify the country list.
drupal_alter('countries', $countries);
diff --git core/includes/module.inc core/includes/module.inc
index ae772ff..05080fa 100644
--- core/includes/module.inc
+++ core/includes/module.inc
@@ -215,7 +215,7 @@ function system_list_reset() {
* without this module.
*/
function _module_build_dependencies($files) {
- require_once DRUPAL_ROOT . '/includes/graph.inc';
+ require_once DRUPAL_ROOT . '/core/includes/graph.inc';
foreach ($files as $filename => $file) {
$graph[$file->name]['edges'] = array();
if (isset($file->info['dependencies']) && is_array($file->info['dependencies'])) {
@@ -259,7 +259,7 @@ function module_exists($module) {
*/
function module_load_install($module) {
// Make sure the installation API is available
- include_once DRUPAL_ROOT . '/includes/install.inc';
+ include_once DRUPAL_ROOT . '/core/includes/install.inc';
return module_load_include('install', $module);
}
@@ -392,7 +392,7 @@ function module_enable($module_list, $enable_dependencies = TRUE) {
}
// Required for module installation checks.
- include_once DRUPAL_ROOT . '/includes/install.inc';
+ include_once DRUPAL_ROOT . '/core/includes/install.inc';
$modules_installed = array();
$modules_enabled = array();
diff --git core/includes/registry.inc core/includes/registry.inc
index 3fb14fb..4bfacb2 100644
--- core/includes/registry.inc
+++ core/includes/registry.inc
@@ -29,9 +29,9 @@ function _registry_update() {
// registry rebuild process runs.
$connection_info = Database::getConnectionInfo();
$driver = $connection_info['default']['driver'];
- require_once DRUPAL_ROOT . '/includes/database/query.inc';
- require_once DRUPAL_ROOT . '/includes/database/select.inc';
- require_once DRUPAL_ROOT . '/includes/database/' . $driver . '/query.inc';
+ require_once DRUPAL_ROOT . '/core/includes/database/query.inc';
+ require_once DRUPAL_ROOT . '/core/includes/database/select.inc';
+ require_once DRUPAL_ROOT . '/core/includes/database/' . $driver . '/query.inc';
// Get current list of modules and their files.
$modules = db_query("SELECT * FROM {system} WHERE type = 'module'")->fetchAll();
@@ -51,7 +51,7 @@ function _registry_update() {
}
}
}
- foreach (file_scan_directory('includes', '/\.inc$/') as $filename => $file) {
+ foreach (file_scan_directory('core/includes', '/\.inc$/') as $filename => $file) {
$files["$filename"] = array('module' => '', 'weight' => 0);
}
diff --git core/includes/session.inc core/includes/session.inc
index 2ede2ff..541ca67 100644
--- core/includes/session.inc
+++ core/includes/session.inc
@@ -216,7 +216,7 @@ function _drupal_session_write($sid, $value) {
return TRUE;
}
catch (Exception $exception) {
- require_once DRUPAL_ROOT . '/includes/errors.inc';
+ require_once DRUPAL_ROOT . '/core/includes/errors.inc';
// If we are displaying errors, then do so with no possibility of a further
// uncaught exception being thrown.
if (error_displayable()) {
diff --git core/includes/stream_wrappers.inc core/includes/stream_wrappers.inc
index df380a8..170c984 100644
--- core/includes/stream_wrappers.inc
+++ core/includes/stream_wrappers.inc
@@ -312,7 +312,7 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface
if (!isset($mapping)) {
// The default file map, defined in file.mimetypes.inc is quite big.
// We only load it when necessary.
- include_once DRUPAL_ROOT . '/includes/file.mimetypes.inc';
+ include_once DRUPAL_ROOT . '/core/includes/file.mimetypes.inc';
$mapping = file_mimetype_mapping();
}
diff --git core/includes/theme.inc core/includes/theme.inc
index 806e5ee..bf48a7b 100644
--- core/includes/theme.inc
+++ core/includes/theme.inc
@@ -1200,7 +1200,7 @@ function theme_get_setting($setting_name, $theme = NULL) {
$cache[$theme]['favicon'] = file_create_url($favicon);
}
else {
- $cache[$theme]['favicon'] = file_create_url('misc/favicon.ico');
+ $cache[$theme]['favicon'] = file_create_url('core/misc/favicon.ico');
}
}
elseif ($cache[$theme]['favicon_path']) {
@@ -1618,7 +1618,7 @@ function theme_table($variables) {
// Add sticky headers, if applicable.
if (count($header) && $sticky) {
- drupal_add_js('misc/tableheader.js');
+ drupal_add_js('core/misc/tableheader.js');
// Add 'sticky-enabled' class to the table to identify it for JS.
// This is needed to target tables constructed by this function.
$attributes['class'][] = 'sticky-enabled';
@@ -1751,10 +1751,10 @@ function theme_table($variables) {
*/
function theme_tablesort_indicator($variables) {
if ($variables['style'] == "asc") {
- return theme('image', array('path' => 'misc/arrow-asc.png', 'alt' => t('sort ascending'), 'title' => t('sort ascending')));
+ return theme('image', array('path' => 'core/misc/arrow-asc.png', 'alt' => t('sort ascending'), 'title' => t('sort ascending')));
}
else {
- return theme('image', array('path' => 'misc/arrow-desc.png', 'alt' => t('sort descending'), 'title' => t('sort descending')));
+ return theme('image', array('path' => 'core/misc/arrow-desc.png', 'alt' => t('sort descending'), 'title' => t('sort descending')));
}
}
@@ -1867,7 +1867,7 @@ function theme_more_help_link($variables) {
*/
function theme_feed_icon($variables) {
$text = t('Subscribe to @feed-title', array('@feed-title' => $variables['title']));
- if ($image = theme('image', array('path' => 'misc/feed.png', 'alt' => $text))) {
+ if ($image = theme('image', array('path' => 'core/misc/feed.png', 'alt' => $text))) {
return l($image, $variables['url'], array('html' => TRUE, 'attributes' => array('class' => array('feed-icon'), 'title' => $text)));
}
}
diff --git core/includes/theme.maintenance.inc core/includes/theme.maintenance.inc
index 218a8ad..fcd8703 100644
--- core/includes/theme.maintenance.inc
+++ core/includes/theme.maintenance.inc
@@ -22,12 +22,12 @@ function _drupal_maintenance_theme() {
return;
}
- require_once DRUPAL_ROOT . '/' . variable_get('path_inc', 'includes/path.inc');
- require_once DRUPAL_ROOT . '/includes/theme.inc';
- require_once DRUPAL_ROOT . '/includes/common.inc';
- require_once DRUPAL_ROOT . '/includes/unicode.inc';
- require_once DRUPAL_ROOT . '/includes/file.inc';
- require_once DRUPAL_ROOT . '/includes/module.inc';
+ require_once DRUPAL_ROOT . '/' . variable_get('path_inc', 'core/includes/path.inc');
+ require_once DRUPAL_ROOT . '/core/includes/theme.inc';
+ require_once DRUPAL_ROOT . '/core/includes/common.inc';
+ require_once DRUPAL_ROOT . '/core/includes/unicode.inc';
+ require_once DRUPAL_ROOT . '/core/includes/file.inc';
+ require_once DRUPAL_ROOT . '/core/includes/module.inc';
unicode_check();
// Install and update pages are treated differently to prevent theming overrides.
@@ -39,7 +39,7 @@ function _drupal_maintenance_theme() {
// environment, we need to bootstrap just enough to allow hook invocations
// to work. See _drupal_log_error().
if (!class_exists('Database', FALSE)) {
- require_once DRUPAL_ROOT . '/includes/database/database.inc';
+ require_once DRUPAL_ROOT . '/core/includes/database/database.inc';
}
// We use the default theme as the maintenance theme. If a default theme
@@ -49,7 +49,7 @@ function _drupal_maintenance_theme() {
// Ensure that system.module is loaded.
if (!function_exists('_system_rebuild_theme_data')) {
- $module_list['system']['filename'] = 'modules/system/system.module';
+ $module_list['system']['filename'] = 'core/modules/system/system.module';
module_list(TRUE, FALSE, FALSE, $module_list);
drupal_load('module', 'system');
}
diff --git core/includes/update.inc core/includes/update.inc
index 69bc061..7c59650 100644
--- core/includes/update.inc
+++ core/includes/update.inc
@@ -81,7 +81,7 @@ function update_check_incompatibility($name, $type = 'module') {
function update_prepare_d7_bootstrap() {
// Allow the bootstrap to proceed even if a Drupal 6 settings.php file is
// still being used.
- include_once DRUPAL_ROOT . '/includes/install.inc';
+ include_once DRUPAL_ROOT . '/core/includes/install.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION);
global $databases, $db_url, $db_prefix, $update_rewrite_settings;
if (empty($databases) && !empty($db_url)) {
@@ -809,7 +809,7 @@ function update_do_one($module, $number, $dependency_map, &$context) {
catch (Exception $e) {
watchdog_exception('update', $e);
- require_once DRUPAL_ROOT . '/includes/errors.inc';
+ require_once DRUPAL_ROOT . '/core/includes/errors.inc';
$variables = _drupal_decode_exception($e);
// The exception message is run through check_plain() by _drupal_decode_exception().
$ret['#abort'] = array('success' => FALSE, 'query' => t('%type: !message in %function (line %line of %file).', $variables));
@@ -911,7 +911,7 @@ function update_batch($start, $redirect = NULL, $url = NULL, $batch = array(), $
'init_message' => 'Starting updates',
'error_message' => 'An unrecoverable error has occurred. You can find the error message below. It is advised to copy it to the clipboard for reference.',
'finished' => 'update_finished',
- 'file' => 'includes/update.inc',
+ 'file' => 'core/includes/update.inc',
);
batch_set($batch);
batch_process($redirect, $url, $redirect_callback);
@@ -1059,7 +1059,7 @@ function update_resolve_dependencies($starting_updates) {
$graph = update_build_dependency_graph($update_functions);
// Perform the depth-first search and sort the results.
- require_once DRUPAL_ROOT . '/includes/graph.inc';
+ require_once DRUPAL_ROOT . '/core/includes/graph.inc';
drupal_depth_first_search($graph);
uasort($graph, 'drupal_sort_weight');
diff --git core/install.php core/install.php
index 881ca5a..dbe8037 100644
--- core/install.php
+++ core/install.php
@@ -5,6 +5,9 @@
* Initiates a browser-based installation of Drupal.
*/
+// Change the directory to the Drupal root.
+chdir('..');
+
/**
* Root directory of Drupal installation.
*/
@@ -22,5 +25,5 @@ if (version_compare(PHP_VERSION, '5.2.4') < 0) {
}
// Start the installer.
-require_once DRUPAL_ROOT . '/includes/install.core.inc';
+require_once DRUPAL_ROOT . '/core/includes/install.core.inc';
install_drupal();
diff --git core/modules/aggregator/aggregator.test core/modules/aggregator/aggregator.test
index 1ab12dc..c4f42a4 100644
--- core/modules/aggregator/aggregator.test
+++ core/modules/aggregator/aggregator.test
@@ -720,11 +720,11 @@ class AggregatorCronTestCase extends AggregatorTestCase {
$key = variable_get('cron_key', 'drupal');
$this->createSampleNodes();
$feed = $this->createFeed();
- $this->drupalGet($base_url . '/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key)));
+ $this->drupalGet($base_url . '/core/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key)));
$this->assertEqual(5, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->fid))->fetchField(), 'Expected number of items in database.');
$this->removeFeedItems($feed);
$this->assertEqual(0, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->fid))->fetchField(), 'Expected number of items in database.');
- $this->drupalGet($base_url . '/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key)));
+ $this->drupalGet($base_url . '/core/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key)));
$this->assertEqual(5, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->fid))->fetchField(), 'Expected number of items in database.');
// Test feed locking when queued for update.
@@ -735,7 +735,7 @@ class AggregatorCronTestCase extends AggregatorTestCase {
'queued' => REQUEST_TIME,
))
->execute();
- $this->drupalGet($base_url . '/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key)));
+ $this->drupalGet($base_url . '/core/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key)));
$this->assertEqual(0, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->fid))->fetchField(), 'Expected number of items in database.');
db_update('aggregator_feed')
->condition('fid', $feed->fid)
@@ -743,7 +743,7 @@ class AggregatorCronTestCase extends AggregatorTestCase {
'queued' => 0,
))
->execute();
- $this->drupalGet($base_url . '/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key)));
+ $this->drupalGet($base_url . '/core/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key)));
$this->assertEqual(5, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->fid))->fetchField(), 'Expected number of items in database.');
}
}
diff --git core/modules/block/block-admin-display-form.tpl.php core/modules/block/block-admin-display-form.tpl.php
index 94b6104..bb3d887 100644
--- core/modules/block/block-admin-display-form.tpl.php
+++ core/modules/block/block-admin-display-form.tpl.php
@@ -25,7 +25,7 @@
?>
$title) {
drupal_add_tabledrag('blocks', 'match', 'sibling', 'block-region-select', 'block-region-' . $region, NULL, FALSE);
diff --git core/modules/field/field.module core/modules/field/field.module
index 163f448..a25edf2 100644
--- core/modules/field/field.module
+++ core/modules/field/field.module
@@ -17,12 +17,12 @@ class FieldException extends Exception {}
* mechanism for auto-loading core APIs, so we have to load them on
* every page request.
*/
-require_once DRUPAL_ROOT . '/modules/field/field.crud.inc';
-require_once DRUPAL_ROOT . '/modules/field/field.default.inc';
-require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-require_once DRUPAL_ROOT . '/modules/field/field.multilingual.inc';
-require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-require_once DRUPAL_ROOT . '/modules/field/field.form.inc';
+require_once DRUPAL_ROOT . '/core/modules/field/field.crud.inc';
+require_once DRUPAL_ROOT . '/core/modules/field/field.default.inc';
+require_once DRUPAL_ROOT . '/core/modules/field/field.info.inc';
+require_once DRUPAL_ROOT . '/core/modules/field/field.multilingual.inc';
+require_once DRUPAL_ROOT . '/core/modules/field/field.attach.inc';
+require_once DRUPAL_ROOT . '/core/modules/field/field.form.inc';
/**
* @defgroup field Field API
diff --git core/modules/field/tests/field.test core/modules/field/tests/field.test
index 97510e4..7565b8d 100644
--- core/modules/field/tests/field.test
+++ core/modules/field/tests/field.test
@@ -2640,7 +2640,7 @@ class FieldTranslationsTestCase extends FieldTestCase {
field_create_instance($instance);
$this->instance = field_read_instance('test_entity', $this->field_name, 'test_bundle');
- require_once DRUPAL_ROOT . '/includes/locale.inc';
+ require_once DRUPAL_ROOT . '/core/includes/locale.inc';
for ($i = 0; $i < 3; ++$i) {
locale_add_language('l' . $i, $this->randomString(), $this->randomString());
}
diff --git core/modules/field/tests/field_test.module core/modules/field/tests/field_test.module
index 09415e2..fedbb7b 100644
--- core/modules/field/tests/field_test.module
+++ core/modules/field/tests/field_test.module
@@ -13,9 +13,9 @@
* test helper functions
*/
-require_once DRUPAL_ROOT . '/modules/field/tests/field_test.entity.inc';
-require_once DRUPAL_ROOT . '/modules/field/tests/field_test.field.inc';
-require_once DRUPAL_ROOT . '/modules/field/tests/field_test.storage.inc';
+require_once DRUPAL_ROOT . '/core/modules/field/tests/field_test.entity.inc';
+require_once DRUPAL_ROOT . '/core/modules/field/tests/field_test.field.inc';
+require_once DRUPAL_ROOT . '/core/modules/field/tests/field_test.storage.inc';
/**
* Implements hook_permission().
diff --git core/modules/field_ui/field_ui.admin.inc core/modules/field_ui/field_ui.admin.inc
index 96beb13..7208869 100644
--- core/modules/field_ui/field_ui.admin.inc
+++ core/modules/field_ui/field_ui.admin.inc
@@ -1042,7 +1042,7 @@ function field_ui_display_overview_form($form, &$form_state, $entity_type, $bund
$table[$name]['settings_edit'] = $base_button + array(
'#type' => 'image_button',
'#name' => $name . '_formatter_settings_edit',
- '#src' => 'misc/configure.png',
+ '#src' => 'core/misc/configure.png',
'#attributes' => array('class' => array('field-formatter-settings-edit'), 'alt' => t('Edit')),
'#op' => 'edit',
// Do not check errors for the 'Edit' button, but make sure we get
diff --git core/modules/file/file.module core/modules/file/file.module
index 224a08a..bfa4fee 100644
--- core/modules/file/file.module
+++ core/modules/file/file.module
@@ -6,7 +6,7 @@
*/
// Load all Field module hooks for File.
-require_once DRUPAL_ROOT . '/modules/file/file.field.inc';
+require_once DRUPAL_ROOT . '/core/modules/file/file.field.inc';
/**
* Implements hook_help().
diff --git core/modules/image/image.module core/modules/image/image.module
index d2d081c..189a98c 100644
--- core/modules/image/image.module
+++ core/modules/image/image.module
@@ -31,7 +31,7 @@ define('IMAGE_STORAGE_EDITABLE', IMAGE_STORAGE_NORMAL | IMAGE_STORAGE_OVERRIDE);
define('IMAGE_STORAGE_MODULE', IMAGE_STORAGE_OVERRIDE | IMAGE_STORAGE_DEFAULT);
// Load all Field module hooks for Image.
-require_once DRUPAL_ROOT . '/modules/image/image.field.inc';
+require_once DRUPAL_ROOT . '/core/modules/image/image.field.inc';
/**
* Implement of hook_help().
@@ -905,7 +905,7 @@ function image_effect_definitions() {
}
else {
$effects = array();
- include_once DRUPAL_ROOT . '/modules/image/image.effects.inc';
+ include_once DRUPAL_ROOT . '/core/modules/image/image.effects.inc';
foreach (module_implements('image_effect_info') as $module) {
foreach (module_invoke($module, 'image_effect_info') as $name => $effect) {
// Ensure the current toolkit supports the effect.
diff --git core/modules/locale/locale.admin.inc core/modules/locale/locale.admin.inc
index 3e4c6f1..918fe05 100644
--- core/modules/locale/locale.admin.inc
+++ core/modules/locale/locale.admin.inc
@@ -321,7 +321,7 @@ function locale_languages_predefined_form_validate($form, &$form_state) {
if (!isset($form_state['values']['name'])) {
// Predefined language selection.
- include_once DRUPAL_ROOT . '/includes/iso.inc';
+ include_once DRUPAL_ROOT . '/core/includes/iso.inc';
$predefined = _locale_get_predefined_list();
if (!isset($predefined[$langcode])) {
form_set_error('langcode', t('Invalid language code.'));
@@ -345,7 +345,7 @@ function locale_languages_predefined_form_submit($form, &$form_state) {
}
else {
// Predefined language selection.
- include_once DRUPAL_ROOT . '/includes/iso.inc';
+ include_once DRUPAL_ROOT . '/core/includes/iso.inc';
$predefined = _locale_get_predefined_list();
locale_add_language($langcode);
drupal_set_message(t('The language %language has been created and can now be used. More information is available on the help screen.', array('%language' => t($predefined[$langcode][0]), '@locale-help' => url('admin/help/locale'))));
@@ -484,7 +484,7 @@ function locale_languages_delete_form_submit($form, &$form_state) {
* Setting for language negotiation options
*/
function locale_languages_configure_form() {
- include_once DRUPAL_ROOT . '/includes/language.inc';
+ include_once DRUPAL_ROOT . '/core/includes/language.inc';
$form = array(
'#submit' => array('locale_languages_configure_form_submit'),
@@ -989,7 +989,7 @@ function locale_translate_import_form_submit($form, &$form_state) {
$languages = language_list('language');
$langcode = $form_state['values']['langcode'];
if (!isset($languages[$langcode])) {
- include_once DRUPAL_ROOT . '/includes/iso.inc';
+ include_once DRUPAL_ROOT . '/core/includes/iso.inc';
$predefined = _locale_get_predefined_list();
locale_add_language($langcode);
drupal_set_message(t('The language %language has been created.', array('%language' => t($predefined[$langcode][0]))));
@@ -1395,7 +1395,7 @@ function locale_date_format_form($form, &$form_state, $langcode) {
* Submit handler for configuring localized date formats on the locale_date_format_form.
*/
function locale_date_format_form_submit($form, &$form_state) {
- include_once DRUPAL_ROOT . '/includes/locale.inc';
+ include_once DRUPAL_ROOT . '/core/includes/locale.inc';
$langcode = $form_state['values']['langcode'];
// Get list of date format types.
diff --git core/modules/locale/locale.install core/modules/locale/locale.install
index 2abbc53..9266225 100644
--- core/modules/locale/locale.install
+++ core/modules/locale/locale.install
@@ -56,9 +56,9 @@ function locale_update_7000() {
* Upgrade language negotiation settings.
*/
function locale_update_7001() {
- require_once DRUPAL_ROOT . '/includes/language.inc';
- require_once DRUPAL_ROOT . '/includes/locale.inc';
- require_once DRUPAL_ROOT . '/modules/locale/locale.module';
+ require_once DRUPAL_ROOT . '/core/includes/language.inc';
+ require_once DRUPAL_ROOT . '/core/includes/locale.inc';
+ require_once DRUPAL_ROOT . '/core/modules/locale/locale.module';
switch (variable_get('language_negotiation', 0)) {
// LANGUAGE_NEGOTIATION_NONE.
@@ -117,7 +117,7 @@ function locale_update_7001() {
function locale_update_7002() {
// language.inc may not have been included during bootstrap if there is not
// more than one language currently enabled.
- require_once DRUPAL_ROOT . '/includes/language.inc';
+ require_once DRUPAL_ROOT . '/core/includes/language.inc';
$language_types_info = language_types_info();
$info = $language_types_info[LANGUAGE_TYPE_URL];
if (isset($info['fixed'])) {
diff --git core/modules/locale/locale.module core/modules/locale/locale.module
index 9505f72..ed76ca7 100644
--- core/modules/locale/locale.module
+++ core/modules/locale/locale.module
@@ -225,7 +225,7 @@ function locale_menu() {
*/
function locale_init() {
global $conf, $language;
- include_once DRUPAL_ROOT . '/includes/locale.inc';
+ include_once DRUPAL_ROOT . '/core/includes/locale.inc';
// For each date type (e.g. long, short), get the localized date format
// for the user's current language and override the default setting for it
@@ -472,7 +472,7 @@ function locale_field_language_fallback(&$display_language, $entity, $langcode)
}
elseif (!empty($entity->{$field_name})) {
if (!isset($fallback_candidates)) {
- require_once DRUPAL_ROOT . '/includes/language.inc';
+ require_once DRUPAL_ROOT . '/core/includes/language.inc';
$fallback_candidates = language_fallback_get_candidates();
}
foreach ($fallback_candidates as $fallback_language) {
@@ -506,7 +506,7 @@ function locale_entity_info_alter(&$entity_info) {
* detected. It is used by l() as the default language if none is specified.
*/
function locale_language_types_info() {
- require_once DRUPAL_ROOT . '/includes/locale.inc';
+ require_once DRUPAL_ROOT . '/core/includes/locale.inc';
return array(
LANGUAGE_TYPE_INTERFACE => array(
'name' => t('User interface text'),
@@ -525,7 +525,7 @@ function locale_language_types_info() {
* Implements hook_language_negotiation_info().
*/
function locale_language_negotiation_info() {
- $file = 'includes/locale.inc';
+ $file = 'core/includes/locale.inc';
$providers = array();
$providers[LOCALE_LANGUAGE_NEGOTIATION_URL] = array(
@@ -799,7 +799,7 @@ function locale_themes_enabled($themes) {
* translations for.
*/
function locale_system_update($components) {
- include_once DRUPAL_ROOT . '/includes/locale.inc';
+ include_once DRUPAL_ROOT . '/core/includes/locale.inc';
if ($batch = locale_batch_by_component($components)) {
batch_set($batch);
}
@@ -821,7 +821,7 @@ function locale_js_alter(&$javascript) {
$files = $new_files = FALSE;
// Require because locale_js_alter() could be called without locale_init().
- require_once DRUPAL_ROOT . '/includes/locale.inc';
+ require_once DRUPAL_ROOT . '/core/includes/locale.inc';
foreach ($javascript as $item) {
if ($item['type'] == 'file') {
@@ -925,7 +925,7 @@ function locale_library_alter(&$libraries, $module) {
* Implements hook_block_info().
*/
function locale_block_info() {
- include_once DRUPAL_ROOT . '/includes/language.inc';
+ include_once DRUPAL_ROOT . '/core/includes/language.inc';
$block = array();
$info = language_types_info();
foreach (language_types_configurable() as $type) {
@@ -975,7 +975,7 @@ function locale_url_outbound_alter(&$path, &$options, $original_path) {
if (!isset($callbacks)) {
$callbacks = array();
- include_once DRUPAL_ROOT . '/includes/language.inc';
+ include_once DRUPAL_ROOT . '/core/includes/language.inc';
foreach (language_types_configurable() as $type) {
// Get url rewriter callbacks only from enabled language providers.
diff --git core/modules/locale/locale.test core/modules/locale/locale.test
index 765bfb6..d1e739b 100644
--- core/modules/locale/locale.test
+++ core/modules/locale/locale.test
@@ -339,7 +339,7 @@ class LocaleTranslationFunctionalTest extends DrupalWebTestCase {
$this->drupalPost($url, $edit, t('Save translations'));
// Trigger JavaScript translation parsing and building.
- require_once DRUPAL_ROOT . '/includes/locale.inc';
+ require_once DRUPAL_ROOT . '/core/includes/locale.inc';
_locale_rebuild_js($langcode);
// Retrieve the JavaScript translation hash code for the custom language to
@@ -1058,7 +1058,7 @@ class LocaleInstallTest extends DrupalWebTestCase {
parent::setUp('locale');
// st() lives in install.inc, so ensure that it is loaded for all tests.
- require_once DRUPAL_ROOT . '/includes/install.inc';
+ require_once DRUPAL_ROOT . '/core/includes/install.inc';
}
/**
@@ -1100,7 +1100,7 @@ class LocaleUninstallFunctionalTest extends DrupalWebTestCase {
$locale_module = array('locale');
// Add a new language and optionally set it as default.
- require_once DRUPAL_ROOT . '/includes/locale.inc';
+ require_once DRUPAL_ROOT . '/core/includes/locale.inc';
locale_add_language('fr', 'French', 'Français', LANGUAGE_LTR, '', '', TRUE, $this->language == 'fr');
// Check the UI language.
@@ -1162,7 +1162,7 @@ class LocaleUninstallFunctionalTest extends DrupalWebTestCase {
$this->assertEqual($language_count, 1, t('Language count: %count', array('%count' => $language_count)));
// Check language negotiation.
- require_once DRUPAL_ROOT . '/includes/language.inc';
+ require_once DRUPAL_ROOT . '/core/includes/language.inc';
$this->assertTrue(count(language_types()) == count(drupal_language_types()), t('Language types reset'));
$language_negotiation = language_negotiation_get(LANGUAGE_TYPE_INTERFACE) == LANGUAGE_NEGOTIATION_DEFAULT;
$this->assertTrue($language_negotiation, t('Interface language negotiation: %setting', array('%setting' => t($language_negotiation ? 'none' : 'set'))));
@@ -1788,7 +1788,7 @@ class LocaleUILanguageNegotiationTest extends DrupalWebTestCase {
function setUp() {
parent::setUp('locale', 'locale_test');
- require_once DRUPAL_ROOT . '/includes/language.inc';
+ require_once DRUPAL_ROOT . '/core/includes/language.inc';
drupal_load('module', 'locale');
$admin_user = $this->drupalCreateUser(array('administer languages', 'translate interface', 'access administration pages', 'administer blocks'));
$this->drupalLogin($admin_user);
@@ -1814,7 +1814,7 @@ class LocaleUILanguageNegotiationTest extends DrupalWebTestCase {
$language_domain = 'example.cn';
// Setup the site languages by installing two languages.
- require_once DRUPAL_ROOT . '/includes/locale.inc';
+ require_once DRUPAL_ROOT . '/core/includes/locale.inc';
locale_add_language($language_browser_fallback);
locale_add_language($language);
@@ -2098,7 +2098,7 @@ class LocaleMultilingualFieldsFunctionalTest extends DrupalWebTestCase {
$this->drupalLogin($admin_user);
// Add a new language.
- require_once DRUPAL_ROOT . '/includes/locale.inc';
+ require_once DRUPAL_ROOT . '/core/includes/locale.inc';
locale_add_language('it', 'Italian', 'Italiano', LANGUAGE_LTR, '', '', TRUE, FALSE);
// Enable URL language detection and selection.
diff --git core/modules/node/node.admin.inc core/modules/node/node.admin.inc
index a6ea1b5..f0d1fe5 100644
--- core/modules/node/node.admin.inc
+++ core/modules/node/node.admin.inc
@@ -206,7 +206,7 @@ function node_filter_form() {
$form['filters']['status']['actions']['reset'] = array('#type' => 'submit', '#value' => t('Reset'));
}
- drupal_add_js('misc/form.js');
+ drupal_add_js('core/misc/form.js');
return $form;
}
diff --git core/modules/profile/profile.test core/modules/profile/profile.test
index 83bed25..9c91110 100644
--- core/modules/profile/profile.test
+++ core/modules/profile/profile.test
@@ -345,7 +345,7 @@ class ProfileTestAutocomplete extends ProfileTestCase {
// Check that autocompletion html is found on the user's profile edit page.
$this->drupalGet('user/' . $this->admin_user->uid . '/edit/' . $category);
$this->assertRaw($autocomplete_html, t('Autocomplete found.'));
- $this->assertRaw('misc/autocomplete.js', t('Autocomplete JavaScript found.'));
+ $this->assertRaw('core/misc/autocomplete.js', t('Autocomplete JavaScript found.'));
$this->assertRaw('class="form-text form-autocomplete"', t('Autocomplete form element class found.'));
// Check the autocompletion path using the first letter of our user's profile
diff --git core/modules/search/search.test core/modules/search/search.test
index 4d37133..498e282 100644
--- core/modules/search/search.test
+++ core/modules/search/search.test
@@ -1108,7 +1108,7 @@ class SearchSimplifyTestCase extends DrupalWebTestCase {
// their own lines). So the even-numbered lines should simplify to nothing,
// and the odd-numbered lines we need to split into shorter chunks and
// verify that simplification doesn't lose any characters.
- $input = file_get_contents(DRUPAL_ROOT . '/modules/search/tests/UnicodeTest.txt');
+ $input = file_get_contents(DRUPAL_ROOT . '/core/modules/search/tests/UnicodeTest.txt');
$basestrings = explode(chr(10), $input);
$strings = array();
foreach ($basestrings as $key => $string) {
diff --git core/modules/simpletest/drupal_web_test_case.php core/modules/simpletest/drupal_web_test_case.php
index a0cd114..43627f5 100644
--- core/modules/simpletest/drupal_web_test_case.php
+++ core/modules/simpletest/drupal_web_test_case.php
@@ -529,7 +529,7 @@ abstract class DrupalTestCase {
'line' => $exception->getLine(),
'file' => $exception->getFile(),
));
- require_once DRUPAL_ROOT . '/includes/errors.inc';
+ require_once DRUPAL_ROOT . '/core/includes/errors.inc';
// The exception message is run through check_plain() by _drupal_decode_exception().
$this->error(t('%type: !message in %function (line %line of %file).', _drupal_decode_exception($exception)), 'Uncaught exception', _drupal_get_last_caller($backtrace));
}
@@ -1289,7 +1289,7 @@ class DrupalWebTestCase extends DrupalTestCase {
$test_info['test_run_id'] = $this->databasePrefix;
$test_info['in_child_site'] = FALSE;
- include_once DRUPAL_ROOT . '/includes/install.inc';
+ include_once DRUPAL_ROOT . '/core/includes/install.inc';
drupal_install_system();
$this->preloadRegistry();
@@ -2065,7 +2065,7 @@ class DrupalWebTestCase extends DrupalTestCase {
* Runs cron in the Drupal installed by Simpletest.
*/
protected function cronRun() {
- $this->drupalGet($GLOBALS['base_url'] . '/cron.php', array('external' => TRUE, 'query' => array('cron_key' => variable_get('cron_key', 'drupal'))));
+ $this->drupalGet($GLOBALS['base_url'] . '/core/cron.php', array('external' => TRUE, 'query' => array('cron_key' => variable_get('cron_key', 'drupal'))));
}
/**
diff --git core/modules/simpletest/simpletest.module core/modules/simpletest/simpletest.module
index b992fd2..331d23f 100644
--- core/modules/simpletest/simpletest.module
+++ core/modules/simpletest/simpletest.module
@@ -95,8 +95,8 @@ function simpletest_js_alter(&$javascript) {
// Since SimpleTest is a special use case for the table select, stick the
// SimpleTest JavaScript above the table select.
$simpletest = drupal_get_path('module', 'simpletest') . '/simpletest.js';
- if (array_key_exists($simpletest, $javascript) && array_key_exists('misc/tableselect.js', $javascript)) {
- $javascript[$simpletest]['weight'] = $javascript['misc/tableselect.js']['weight'] - 1;
+ if (array_key_exists($simpletest, $javascript) && array_key_exists('core/misc/tableselect.js', $javascript)) {
+ $javascript[$simpletest]['weight'] = $javascript['core/misc/tableselect.js']['weight'] - 1;
}
}
diff --git core/modules/simpletest/simpletest.pages.inc core/modules/simpletest/simpletest.pages.inc
index 732d641..be33009 100644
--- core/modules/simpletest/simpletest.pages.inc
+++ core/modules/simpletest/simpletest.pages.inc
@@ -70,7 +70,7 @@ function theme_simpletest_test_table($variables) {
drupal_add_css(drupal_get_path('module', 'simpletest') . '/simpletest.css');
drupal_add_js(drupal_get_path('module', 'simpletest') . '/simpletest.js');
- drupal_add_js('misc/tableselect.js');
+ drupal_add_js('core/misc/tableselect.js');
// Create header for test selection table.
$header = array(
@@ -82,8 +82,8 @@ function theme_simpletest_test_table($variables) {
// Define the images used to expand/collapse the test groups.
$js = array(
'images' => array(
- theme('image', array('path' => 'misc/menu-collapsed.png', 'alt' => t('Expand'), 'title' => t('Expand'))) . ' (' . t('Expand') . ')',
- theme('image', array('path' => 'misc/menu-expanded.png', 'alt' => t('Collapse'), 'title' => t('Collapse'))) . ' (' . t('Collapse') . ')',
+ theme('image', array('path' => 'core/misc/menu-collapsed.png', 'alt' => t('Expand'), 'title' => t('Expand'))) . ' (' . t('Expand') . ')',
+ theme('image', array('path' => 'core/misc/menu-expanded.png', 'alt' => t('Collapse'), 'title' => t('Collapse'))) . ' (' . t('Collapse') . ')',
),
);
@@ -426,10 +426,10 @@ function simpletest_result_status_image($status) {
if (!isset($map)) {
$map = array(
- 'pass' => theme('image', array('path' => 'misc/watchdog-ok.png', 'alt' => t('Pass'))),
- 'fail' => theme('image', array('path' => 'misc/watchdog-error.png', 'alt' => t('Fail'))),
- 'exception' => theme('image', array('path' => 'misc/watchdog-warning.png', 'alt' => t('Exception'))),
- 'debug' => theme('image', array('path' => 'misc/watchdog-warning.png', 'alt' => t('Debug'))),
+ 'pass' => theme('image', array('path' => 'core/misc/watchdog-ok.png', 'alt' => t('Pass'))),
+ 'fail' => theme('image', array('path' => 'core/misc/watchdog-error.png', 'alt' => t('Fail'))),
+ 'exception' => theme('image', array('path' => 'core/misc/watchdog-warning.png', 'alt' => t('Exception'))),
+ 'debug' => theme('image', array('path' => 'core/misc/watchdog-warning.png', 'alt' => t('Debug'))),
);
}
if (isset($map[$status])) {
diff --git core/modules/simpletest/simpletest.test core/modules/simpletest/simpletest.test
index f516364..00ad8bd 100644
--- core/modules/simpletest/simpletest.test
+++ core/modules/simpletest/simpletest.test
@@ -55,7 +55,7 @@ class SimpleTestFunctionalTest extends DrupalWebTestCase {
// using the user-agent header. This is an important security check.
global $base_url;
- $this->drupalGet($base_url . '/install.php', array('external' => TRUE));
+ $this->drupalGet($base_url . '/core/install.php', array('external' => TRUE));
$this->assertResponse(403, 'Cannot access install.php with a "simpletest" user-agent header.');
$user = $this->drupalCreateUser();
@@ -273,7 +273,7 @@ class SimpleTestFunctionalTest extends DrupalWebTestCase {
$assertion['file'] = $this->asText($row->td[2]);
$assertion['line'] = $this->asText($row->td[3]);
$assertion['function'] = $this->asText($row->td[4]);
- $ok_url = file_create_url('misc/watchdog-ok.png');
+ $ok_url = file_create_url('core/misc/watchdog-ok.png');
$assertion['status'] = ($row->td[5]->img['src'] == $ok_url) ? 'Pass' : 'Fail';
$results['assertions'][] = $assertion;
}
diff --git core/modules/simpletest/tests/batch.test core/modules/simpletest/tests/batch.test
index d1c0e0b..d5163ba 100644
--- core/modules/simpletest/tests/batch.test
+++ core/modules/simpletest/tests/batch.test
@@ -366,7 +366,7 @@ class BatchPercentagesUnitTestCase extends DrupalUnitTestCase {
// 19999/20000 should add yet another digit and go to 99.995%.
'99.995' => array('total' => 20000, 'current' => 19999),
);
- require_once DRUPAL_ROOT . '/includes/batch.inc';
+ require_once DRUPAL_ROOT . '/core/includes/batch.inc';
parent::setUp();
}
diff --git core/modules/simpletest/tests/bootstrap.test core/modules/simpletest/tests/bootstrap.test
index 14c16a9..49fae74 100644
--- core/modules/simpletest/tests/bootstrap.test
+++ core/modules/simpletest/tests/bootstrap.test
@@ -342,13 +342,13 @@ class BootstrapGetFilenameTestCase extends DrupalUnitTestCase {
drupal_static_reset('drupal_get_filename');
// Retrieving the location of a module.
- $this->assertIdentical(drupal_get_filename('module', 'php'), 'modules/php/php.module', t('Retrieve module location.'));
+ $this->assertIdentical(drupal_get_filename('module', 'php'), 'core/modules/php/php.module', t('Retrieve module location.'));
// Retrieving the location of a theme.
- $this->assertIdentical(drupal_get_filename('theme', 'stark'), 'themes/stark/stark.info', t('Retrieve theme location.'));
+ $this->assertIdentical(drupal_get_filename('theme', 'stark'), 'core/themes/stark/stark.info', t('Retrieve theme location.'));
// Retrieving the location of a theme engine.
- $this->assertIdentical(drupal_get_filename('theme_engine', 'phptemplate'), 'themes/engines/phptemplate/phptemplate.engine', t('Retrieve theme engine location.'));
+ $this->assertIdentical(drupal_get_filename('theme_engine', 'phptemplate'), 'core/themes/engines/phptemplate/phptemplate.engine', t('Retrieve theme engine location.'));
// Retrieving a file that is definitely not stored in the database.
$this->assertIdentical(drupal_get_filename('profile', 'standard'), 'profiles/standard/standard.profile', t('Retrieve install profile location.'));
diff --git core/modules/simpletest/tests/common.test core/modules/simpletest/tests/common.test
index 4664f04..09ea7ad 100644
--- core/modules/simpletest/tests/common.test
+++ core/modules/simpletest/tests/common.test
@@ -1165,10 +1165,10 @@ class JavaScriptTestCase extends DrupalWebTestCase {
* Test adding a JavaScript file.
*/
function testAddFile() {
- $javascript = drupal_add_js('misc/collapse.js');
- $this->assertTrue(array_key_exists('misc/jquery.js', $javascript), t('jQuery is added when a file is added.'));
- $this->assertTrue(array_key_exists('misc/drupal.js', $javascript), t('Drupal.js is added when file is added.'));
- $this->assertTrue(array_key_exists('misc/collapse.js', $javascript), t('JavaScript files are correctly added.'));
+ $javascript = drupal_add_js('core/misc/collapse.js');
+ $this->assertTrue(array_key_exists('core/misc/jquery.js', $javascript), t('jQuery is added when a file is added.'));
+ $this->assertTrue(array_key_exists('core/misc/drupal.js', $javascript), t('Drupal.js is added when file is added.'));
+ $this->assertTrue(array_key_exists('core/misc/collapse.js', $javascript), t('JavaScript files are correctly added.'));
$this->assertEqual(base_path(), $javascript['settings']['data'][0]['basePath'], t('Base path JavaScript setting is correctly set.'));
}
@@ -1207,7 +1207,7 @@ class JavaScriptTestCase extends DrupalWebTestCase {
$javascript = drupal_get_js('header');
$this->assertTrue(strpos($javascript, 'basePath') > 0, t('Rendered JavaScript header returns basePath setting.'));
- $this->assertTrue(strpos($javascript, 'misc/jquery.js') > 0, t('Rendered JavaScript header includes jQuery.'));
+ $this->assertTrue(strpos($javascript, 'core/misc/jquery.js') > 0, t('Rendered JavaScript header includes jQuery.'));
// Test whether drupal_add_js can be used to override a previous setting.
$this->assertTrue(strpos($javascript, 'commonTestShouldAppear') > 0, t('Rendered JavaScript header returns custom setting.'));
@@ -1228,7 +1228,7 @@ class JavaScriptTestCase extends DrupalWebTestCase {
* Test to see if resetting the JavaScript empties the cache.
*/
function testReset() {
- drupal_add_js('misc/collapse.js');
+ drupal_add_js('core/misc/collapse.js');
drupal_static_reset('drupal_add_js');
$this->assertEqual(array(), drupal_add_js(), t('Resetting the JavaScript correctly empties the cache.'));
}
@@ -1239,7 +1239,7 @@ class JavaScriptTestCase extends DrupalWebTestCase {
function testAddInline() {
$inline = 'jQuery(function () { });';
$javascript = drupal_add_js($inline, array('type' => 'inline', 'scope' => 'footer'));
- $this->assertTrue(array_key_exists('misc/jquery.js', $javascript), t('jQuery is added when inline scripts are added.'));
+ $this->assertTrue(array_key_exists('core/misc/jquery.js', $javascript), t('jQuery is added when inline scripts are added.'));
$data = end($javascript);
$this->assertEqual($inline, $data['data'], t('Inline JavaScript is correctly added to the footer.'));
}
@@ -1269,24 +1269,24 @@ class JavaScriptTestCase extends DrupalWebTestCase {
* Test drupal_add_js() sets preproccess to false when cache is set to false.
*/
function testNoCache() {
- $javascript = drupal_add_js('misc/collapse.js', array('cache' => FALSE));
- $this->assertFalse($javascript['misc/collapse.js']['preprocess'], t('Setting cache to FALSE sets proprocess to FALSE when adding JavaScript.'));
+ $javascript = drupal_add_js('core/misc/collapse.js', array('cache' => FALSE));
+ $this->assertFalse($javascript['core/misc/collapse.js']['preprocess'], t('Setting cache to FALSE sets proprocess to FALSE when adding JavaScript.'));
}
/**
* Test adding a JavaScript file with a different group.
*/
function testDifferentGroup() {
- $javascript = drupal_add_js('misc/collapse.js', array('group' => JS_THEME));
- $this->assertEqual($javascript['misc/collapse.js']['group'], JS_THEME, t('Adding a JavaScript file with a different group caches the given group.'));
+ $javascript = drupal_add_js('core/misc/collapse.js', array('group' => JS_THEME));
+ $this->assertEqual($javascript['core/misc/collapse.js']['group'], JS_THEME, t('Adding a JavaScript file with a different group caches the given group.'));
}
/**
* Test adding a JavaScript file with a different weight.
*/
function testDifferentWeight() {
- $javascript = drupal_add_js('misc/collapse.js', array('weight' => 2));
- $this->assertEqual($javascript['misc/collapse.js']['weight'], 2, t('Adding a JavaScript file with a different weight caches the given weight.'));
+ $javascript = drupal_add_js('core/misc/collapse.js', array('weight' => 2));
+ $this->assertEqual($javascript['core/misc/collapse.js']['weight'], 2, t('Adding a JavaScript file with a different weight caches the given weight.'));
}
/**
@@ -1338,9 +1338,9 @@ class JavaScriptTestCase extends DrupalWebTestCase {
// JavaScript files are sorted first by group, then by the 'every_page'
// flag, then by weight (see drupal_sort_css_js()), so to test the effect of
// weight, we need the other two options to be the same.
- drupal_add_js('misc/collapse.js', array('group' => JS_LIBRARY, 'every_page' => TRUE, 'weight' => -21));
+ drupal_add_js('core/misc/collapse.js', array('group' => JS_LIBRARY, 'every_page' => TRUE, 'weight' => -21));
$javascript = drupal_get_js();
- $this->assertTrue(strpos($javascript, 'misc/collapse.js') < strpos($javascript, 'misc/jquery.js'), t('Rendering a JavaScript file above jQuery.'));
+ $this->assertTrue(strpos($javascript, 'core/misc/collapse.js') < strpos($javascript, 'core/misc/jquery.js'), t('Rendering a JavaScript file above jQuery.'));
}
/**
@@ -1350,14 +1350,14 @@ class JavaScriptTestCase extends DrupalWebTestCase {
*/
function testAlter() {
// Add both tableselect.js and simpletest.js, with a larger weight on SimpleTest.
- drupal_add_js('misc/tableselect.js');
+ drupal_add_js('core/misc/tableselect.js');
drupal_add_js(drupal_get_path('module', 'simpletest') . '/simpletest.js', array('weight' => 9999));
// Render the JavaScript, testing if simpletest.js was altered to be before
// tableselect.js. See simpletest_js_alter() to see where this alteration
// takes place.
$javascript = drupal_get_js();
- $this->assertTrue(strpos($javascript, 'simpletest.js') < strpos($javascript, 'misc/tableselect.js'), t('Altering JavaScript weight through the alter hook.'));
+ $this->assertTrue(strpos($javascript, 'simpletest.js') < strpos($javascript, 'core/misc/tableselect.js'), t('Altering JavaScript weight through the alter hook.'));
}
/**
@@ -1368,8 +1368,8 @@ class JavaScriptTestCase extends DrupalWebTestCase {
$this->assertTrue($result !== FALSE, t('Library was added without errors.'));
$scripts = drupal_get_js();
$styles = drupal_get_css();
- $this->assertTrue(strpos($scripts, 'misc/farbtastic/farbtastic.js'), t('JavaScript of library was added to the page.'));
- $this->assertTrue(strpos($styles, 'misc/farbtastic/farbtastic.css'), t('Stylesheet of library was added to the page.'));
+ $this->assertTrue(strpos($scripts, 'core/misc/farbtastic/farbtastic.js'), t('JavaScript of library was added to the page.'));
+ $this->assertTrue(strpos($styles, 'core/misc/farbtastic/farbtastic.css'), t('Stylesheet of library was added to the page.'));
}
/**
@@ -1385,7 +1385,7 @@ class JavaScriptTestCase extends DrupalWebTestCase {
// common_test_library_alter() also added a dependency on jQuery Form.
drupal_add_library('system', 'farbtastic');
$scripts = drupal_get_js();
- $this->assertTrue(strpos($scripts, 'misc/jquery.form.js'), t('Altered library dependencies are added to the page.'));
+ $this->assertTrue(strpos($scripts, 'core/misc/jquery.form.js'), t('Altered library dependencies are added to the page.'));
}
/**
@@ -1419,7 +1419,7 @@ class JavaScriptTestCase extends DrupalWebTestCase {
$element['#attached']['library'][] = array('system', 'farbtastic');
drupal_render($element);
$scripts = drupal_get_js();
- $this->assertTrue(strpos($scripts, 'misc/farbtastic/farbtastic.js'), t('The attached_library property adds the additional libraries.'));
+ $this->assertTrue(strpos($scripts, 'core/misc/farbtastic/farbtastic.js'), t('The attached_library property adds the additional libraries.'));
}
/**
@@ -2096,14 +2096,14 @@ class DrupalSystemListingTestCase extends DrupalWebTestCase {
// with Drupal core, the copy in the core modules directory takes
// precedence.
'drupal_system_listing_incompatible_test' => array(
- 'modules/simpletest/tests',
+ 'core/modules/simpletest/tests',
'profiles/testing/modules',
),
// When both copies of the module are compatible with Drupal core, the
// copy in the profile directory takes precedence.
'drupal_system_listing_compatible_test' => array(
'profiles/testing/modules',
- 'modules/simpletest/tests',
+ 'core/modules/simpletest/tests',
),
);
diff --git core/modules/simpletest/tests/common_test.module core/modules/simpletest/tests/common_test.module
index 9b61788..20a222b 100644
--- core/modules/simpletest/tests/common_test.module
+++ core/modules/simpletest/tests/common_test.module
@@ -206,10 +206,10 @@ function common_test_library() {
'website' => 'http://code.google.com/p/farbtastic/',
'version' => '5.3',
'js' => array(
- 'misc/farbtastic/farbtastic.js' => array(),
+ 'core/misc/farbtastic/farbtastic.js' => array(),
),
'css' => array(
- 'misc/farbtastic/farbtastic.css' => array(),
+ 'core/misc/farbtastic/farbtastic.css' => array(),
),
);
return $libraries;
diff --git core/modules/simpletest/tests/error.test core/modules/simpletest/tests/error.test
index b1ec4b3..8c5a848 100644
--- core/modules/simpletest/tests/error.test
+++ core/modules/simpletest/tests/error.test
@@ -24,19 +24,19 @@ class DrupalErrorHandlerUnitTest extends DrupalWebTestCase {
'%type' => 'Notice',
'!message' => 'Undefined variable: bananas',
'%function' => 'error_test_generate_warnings()',
- '%file' => drupal_realpath('modules/simpletest/tests/error_test.module'),
+ '%file' => drupal_realpath('core/modules/simpletest/tests/error_test.module'),
);
$error_warning = array(
'%type' => 'Warning',
'!message' => 'Division by zero',
'%function' => 'error_test_generate_warnings()',
- '%file' => drupal_realpath('modules/simpletest/tests/error_test.module'),
+ '%file' => drupal_realpath('core/modules/simpletest/tests/error_test.module'),
);
$error_user_notice = array(
'%type' => 'User warning',
'!message' => 'Drupal is awesome',
'%function' => 'error_test_generate_warnings()',
- '%file' => drupal_realpath('modules/simpletest/tests/error_test.module'),
+ '%file' => drupal_realpath('core/modules/simpletest/tests/error_test.module'),
);
// Set error reporting to collect notices.
@@ -73,14 +73,14 @@ class DrupalErrorHandlerUnitTest extends DrupalWebTestCase {
'!message' => 'Drupal is awesome',
'%function' => 'error_test_trigger_exception()',
'%line' => 57,
- '%file' => drupal_realpath('modules/simpletest/tests/error_test.module'),
+ '%file' => drupal_realpath('core/modules/simpletest/tests/error_test.module'),
);
$error_pdo_exception = array(
'%type' => 'PDOException',
'!message' => 'SELECT * FROM bananas_are_awesome',
'%function' => 'error_test_trigger_pdo_exception()',
'%line' => 65,
- '%file' => drupal_realpath('modules/simpletest/tests/error_test.module'),
+ '%file' => drupal_realpath('core/modules/simpletest/tests/error_test.module'),
);
$this->drupalGet('error-test/trigger-exception');
diff --git core/modules/simpletest/tests/file.test core/modules/simpletest/tests/file.test
index dc12b1b..cff05bb 100644
--- core/modules/simpletest/tests/file.test
+++ core/modules/simpletest/tests/file.test
@@ -368,11 +368,11 @@ class FileValidatorTest extends DrupalWebTestCase {
parent::setUp();
$this->image = new stdClass();
- $this->image->uri = 'misc/druplicon.png';
+ $this->image->uri = 'core/misc/druplicon.png';
$this->image->filename = basename($this->image->uri);
$this->non_image = new stdClass();
- $this->non_image->uri = 'misc/jquery.js';
+ $this->non_image->uri = 'core/misc/jquery.js';
$this->non_image->filename = basename($this->non_image->uri);
}
@@ -427,7 +427,7 @@ class FileValidatorTest extends DrupalWebTestCase {
// Maximum size.
if (image_get_toolkit()) {
// Copy the image so that the original doesn't get resized.
- copy(drupal_realpath('misc/druplicon.png'), 'temporary://druplicon.png');
+ copy(drupal_realpath('core/misc/druplicon.png'), 'temporary://druplicon.png');
$this->image->uri = 'temporary://druplicon.png';
$errors = file_validate_image_resolution($this->image, '10x5');
@@ -955,7 +955,7 @@ class FileDirectoryTest extends FileTestCase {
*/
function testFileDestination() {
// First test for non-existent file.
- $destination = 'misc/xyz.txt';
+ $destination = 'core/misc/xyz.txt';
$path = file_destination($destination, FILE_EXISTS_REPLACE);
$this->assertEqual($path, $destination, t('Non-existing filepath destination is correct with FILE_EXISTS_REPLACE.'), 'File');
$path = file_destination($destination, FILE_EXISTS_RENAME);
@@ -963,7 +963,7 @@ class FileDirectoryTest extends FileTestCase {
$path = file_destination($destination, FILE_EXISTS_ERROR);
$this->assertEqual($path, $destination, t('Non-existing filepath destination is correct with FILE_EXISTS_ERROR.'), 'File');
- $destination = 'misc/druplicon.png';
+ $destination = 'core/misc/druplicon.png';
$path = file_destination($destination, FILE_EXISTS_REPLACE);
$this->assertEqual($path, $destination, t('Existing filepath destination remains the same with FILE_EXISTS_REPLACE.'), 'File');
$path = file_destination($destination, FILE_EXISTS_RENAME);
@@ -2215,7 +2215,7 @@ class FileDownloadTest extends FileTestCase {
// Test generating an URL to a shipped file (i.e. a file that is part of
// Drupal core, a module or a theme, for example a JavaScript file).
- $filepath = 'misc/jquery.js';
+ $filepath = 'core/misc/jquery.js';
$url = file_create_url($filepath);
$this->assertEqual($GLOBALS['base_url'] . '/' . $filepath, $url, t('Correctly generated a URL for a shipped file.'));
$this->drupalHead($url);
@@ -2343,28 +2343,28 @@ class FileURLRewritingTest extends FileTestCase {
// Test alteration of file URLs to use a CDN.
variable_set('file_test_hook_file_url_alter', 'cdn');
- $filepath = 'misc/jquery.js';
+ $filepath = 'core/misc/jquery.js';
$url = file_create_url($filepath);
$this->assertEqual(FILE_URL_TEST_CDN_1 . '/' . $filepath, $url, t('Correctly generated a CDN URL for a shipped file.'));
- $filepath = 'misc/favicon.ico';
+ $filepath = 'core/misc/favicon.ico';
$url = file_create_url($filepath);
$this->assertEqual(FILE_URL_TEST_CDN_2 . '/' . $filepath, $url, t('Correctly generated a CDN URL for a shipped file.'));
// Test alteration of file URLs to use root-relative URLs.
variable_set('file_test_hook_file_url_alter', 'root-relative');
- $filepath = 'misc/jquery.js';
+ $filepath = 'core/misc/jquery.js';
$url = file_create_url($filepath);
$this->assertEqual(base_path() . '/' . $filepath, $url, t('Correctly generated a root-relative URL for a shipped file.'));
- $filepath = 'misc/favicon.ico';
+ $filepath = 'core/misc/favicon.ico';
$url = file_create_url($filepath);
$this->assertEqual(base_path() . '/' . $filepath, $url, t('Correctly generated a root-relative URL for a shipped file.'));
// Test alteration of file URLs to use protocol-relative URLs.
variable_set('file_test_hook_file_url_alter', 'protocol-relative');
- $filepath = 'misc/jquery.js';
+ $filepath = 'core/misc/jquery.js';
$url = file_create_url($filepath);
$this->assertEqual('/' . base_path() . '/' . $filepath, $url, t('Correctly generated a protocol-relative URL for a shipped file.'));
- $filepath = 'misc/favicon.ico';
+ $filepath = 'core/misc/favicon.ico';
$url = file_create_url($filepath);
$this->assertEqual('/' . base_path() . '/' . $filepath, $url, t('Correctly generated a protocol-relative URL for a shipped file.'));
}
diff --git core/modules/simpletest/tests/form.test core/modules/simpletest/tests/form.test
index e7ae9de..427010b 100644
--- core/modules/simpletest/tests/form.test
+++ core/modules/simpletest/tests/form.test
@@ -857,8 +857,8 @@ class FormsElementsVerticalTabsFunctionalTest extends DrupalWebTestCase {
*/
function testJavaScriptOrdering() {
$this->drupalGet('form_test/vertical-tabs');
- $position1 = strpos($this->content, 'misc/vertical-tabs.js');
- $position2 = strpos($this->content, 'misc/collapse.js');
+ $position1 = strpos($this->content, 'core/misc/vertical-tabs.js');
+ $position2 = strpos($this->content, 'core/misc/collapse.js');
$this->assertTrue($position1 !== FALSE && $position2 !== FALSE && $position1 < $position2, t('vertical-tabs.js is included before collapse.js'));
}
}
diff --git core/modules/simpletest/tests/form_test.module core/modules/simpletest/tests/form_test.module
index 00be7d2..7440826 100644
--- core/modules/simpletest/tests/form_test.module
+++ core/modules/simpletest/tests/form_test.module
@@ -1491,7 +1491,7 @@ function form_test_clicked_button($form, &$form_state) {
);
// Image buttons need a #src; the others need a #value.
if ($type == 'image_button') {
- $form[$name]['#src'] = 'misc/druplicon.png';
+ $form[$name]['#src'] = 'core/misc/druplicon.png';
}
else {
$form[$name]['#value'] = $name;
diff --git core/modules/simpletest/tests/graph.test core/modules/simpletest/tests/graph.test
index c190161..e60cd39 100644
--- core/modules/simpletest/tests/graph.test
+++ core/modules/simpletest/tests/graph.test
@@ -18,7 +18,7 @@ class GraphUnitTest extends DrupalUnitTestCase {
}
function setUp() {
- require_once DRUPAL_ROOT . '/includes/graph.inc';
+ require_once DRUPAL_ROOT . '/core/includes/graph.inc';
parent::setUp();
}
diff --git core/modules/simpletest/tests/http.php core/modules/simpletest/tests/http.php
index a22938d..91985a6 100644
--- core/modules/simpletest/tests/http.php
+++ core/modules/simpletest/tests/http.php
@@ -12,14 +12,14 @@ $is_http_mock = !empty($_SERVER['HTTPS']);
$_SERVER['HTTPS'] = NULL;
ini_set('session.cookie_secure', FALSE);
foreach ($_SERVER as $key => $value) {
- $_SERVER[$key] = str_replace('modules/simpletest/tests/http.php', 'index.php', $value);
+ $_SERVER[$key] = str_replace('core/modules/simpletest/tests/http.php', 'index.php', $value);
$_SERVER[$key] = str_replace('https://', 'http://', $_SERVER[$key]);
}
// Change current directory to the Drupal root.
-chdir('../../..');
+chdir('../../../..');
define('DRUPAL_ROOT', getcwd());
-require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
+require_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
// Make sure this file can only be used by simpletest.
drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION);
diff --git core/modules/simpletest/tests/https.php core/modules/simpletest/tests/https.php
index b5ffab6..c342abc 100644
--- core/modules/simpletest/tests/https.php
+++ core/modules/simpletest/tests/https.php
@@ -11,14 +11,14 @@ $is_https_mock = empty($_SERVER['HTTPS']);
// Change to https.
$_SERVER['HTTPS'] = 'on';
foreach ($_SERVER as $key => $value) {
- $_SERVER[$key] = str_replace('modules/simpletest/tests/https.php', 'index.php', $value);
+ $_SERVER[$key] = str_replace('core/modules/simpletest/tests/https.php', 'index.php', $value);
$_SERVER[$key] = str_replace('http://', 'https://', $_SERVER[$key]);
}
// Change current directory to the Drupal root.
-chdir('../../..');
+chdir('../../../..');
define('DRUPAL_ROOT', getcwd());
-require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
+require_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
// Make sure this file can only be used by simpletest.
drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION);
diff --git core/modules/simpletest/tests/password.test core/modules/simpletest/tests/password.test
index e100c2e..e0139e9 100644
--- core/modules/simpletest/tests/password.test
+++ core/modules/simpletest/tests/password.test
@@ -20,7 +20,7 @@ class PasswordHashingTest extends DrupalWebTestCase {
}
function setUp() {
- require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
+ require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'core/includes/password.inc');
parent::setUp();
}
diff --git core/modules/simpletest/tests/system_test.module core/modules/simpletest/tests/system_test.module
index 46fb876..f37a322 100644
--- core/modules/simpletest/tests/system_test.module
+++ core/modules/simpletest/tests/system_test.module
@@ -354,7 +354,7 @@ class SystemTestFileTransfer {
* @see system_authorized_init().
*/
function system_test_authorize_init_page($page_title) {
- $authorize_url = $GLOBALS['base_url'] . '/authorize.php';
+ $authorize_url = $GLOBALS['base_url'] . '/core/authorize.php';
system_authorized_init('system_test_authorize_run', drupal_get_path('module', 'system_test') . '/system_test.module', array(), $page_title);
drupal_goto($authorize_url);
}
diff --git core/modules/simpletest/tests/theme.test core/modules/simpletest/tests/theme.test
index d0ad77d..86395af 100644
--- core/modules/simpletest/tests/theme.test
+++ core/modules/simpletest/tests/theme.test
@@ -118,7 +118,7 @@ class ThemeTableUnitTest extends DrupalWebTestCase {
$rows = array(array(1,2,3), array(4,5,6), array(7,8,9));
$this->content = theme('table', array('header' => $header, 'rows' => $rows));
$js = drupal_add_js();
- $this->assertTrue(isset($js['misc/tableheader.js']), t('tableheader.js was included when $sticky = TRUE.'));
+ $this->assertTrue(isset($js['core/misc/tableheader.js']), t('tableheader.js was included when $sticky = TRUE.'));
$this->assertRaw('sticky-enabled', t('Table has a class of sticky-enabled when $sticky = TRUE.'));
drupal_static_reset('drupal_add_js');
}
@@ -134,7 +134,7 @@ class ThemeTableUnitTest extends DrupalWebTestCase {
$colgroups = array();
$this->content = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => $attributes, 'caption' => $caption, 'colgroups' => $colgroups, 'sticky' => FALSE));
$js = drupal_add_js();
- $this->assertFalse(isset($js['misc/tableheader.js']), t('tableheader.js was not included because $sticky = FALSE.'));
+ $this->assertFalse(isset($js['core/misc/tableheader.js']), t('tableheader.js was not included because $sticky = FALSE.'));
$this->assertNoRaw('sticky-enabled', t('Table does not have a class of sticky-enabled because $sticky = FALSE.'));
drupal_static_reset('drupal_add_js');
}
diff --git core/modules/simpletest/tests/update.test core/modules/simpletest/tests/update.test
index 966efff..d0d4cad 100644
--- core/modules/simpletest/tests/update.test
+++ core/modules/simpletest/tests/update.test
@@ -19,7 +19,7 @@ class UpdateDependencyOrderingTestCase extends DrupalWebTestCase {
function setUp() {
parent::setUp('update_test_1', 'update_test_2', 'update_test_3');
- require_once DRUPAL_ROOT . '/includes/update.inc';
+ require_once DRUPAL_ROOT . '/core/includes/update.inc';
}
/**
@@ -71,7 +71,7 @@ class UpdateDependencyMissingTestCase extends DrupalWebTestCase {
// Only install update_test_2.module, even though its updates have a
// dependency on update_test_3.module.
parent::setUp('update_test_2');
- require_once DRUPAL_ROOT . '/includes/update.inc';
+ require_once DRUPAL_ROOT . '/core/includes/update.inc';
}
function testMissingUpdate() {
@@ -99,7 +99,7 @@ class UpdateDependencyHookInvocationTestCase extends DrupalWebTestCase {
function setUp() {
parent::setUp('update_test_1', 'update_test_2');
- require_once DRUPAL_ROOT . '/includes/update.inc';
+ require_once DRUPAL_ROOT . '/core/includes/update.inc';
}
/**
diff --git core/modules/simpletest/tests/upgrade/upgrade.test core/modules/simpletest/tests/upgrade/upgrade.test
index 8a3da81..bf4ff47 100644
--- core/modules/simpletest/tests/upgrade/upgrade.test
+++ core/modules/simpletest/tests/upgrade/upgrade.test
@@ -34,7 +34,7 @@ abstract class UpgradePathTestCase extends DrupalWebTestCase {
global $user, $language, $conf;
// Load the Update API.
- require_once DRUPAL_ROOT . '/includes/update.inc';
+ require_once DRUPAL_ROOT . '/core/includes/update.inc';
// Reset flags.
$this->upgradedSite = FALSE;
@@ -231,7 +231,7 @@ abstract class UpgradePathTestCase extends DrupalWebTestCase {
* TRUE if the upgrade succeeded, FALSE otherwise.
*/
protected function performUpgrade($register_errors = TRUE) {
- $update_url = $GLOBALS['base_url'] . '/update.php';
+ $update_url = $GLOBALS['base_url'] . '/core/update.php';
// Load the first update screen.
$this->drupalGet($update_url, array('external' => TRUE));
diff --git core/modules/system/system.admin.inc core/modules/system/system.admin.inc
index fb0664a..ffe1d32 100644
--- core/modules/system/system.admin.inc
+++ core/modules/system/system.admin.inc
@@ -781,7 +781,7 @@ function system_modules($form, $form_state = array()) {
$help_arg = module_exists('help') ? drupal_help_arg() : FALSE;
// Used when displaying modules that are required by the install profile.
- require_once DRUPAL_ROOT . '/includes/install.inc';
+ require_once DRUPAL_ROOT . '/core/includes/install.inc';
$distribution_name = check_plain(drupal_install_profile_distribution_name());
// Iterate through each of the modules.
@@ -985,7 +985,7 @@ function _system_modules_build_row($info, $extra) {
}
else {
$form['enable'] = array(
- '#markup' => theme('image', array('path' => 'misc/watchdog-error.png', 'alt' => $status_short, 'title' => $status_short)),
+ '#markup' => theme('image', array('path' => 'core/misc/watchdog-error.png', 'alt' => $status_short, 'title' => $status_short)),
);
$form['description']['#markup'] .= theme('system_modules_incompatible', array('message' => $status_long));
}
@@ -1050,7 +1050,7 @@ function system_modules_confirm_form($modules, $storage) {
* Submit callback; handles modules form submission.
*/
function system_modules_submit($form, &$form_state) {
- include_once DRUPAL_ROOT . '/includes/install.inc';
+ include_once DRUPAL_ROOT . '/core/includes/install.inc';
// Builds list of modules.
$modules = array();
@@ -1199,7 +1199,7 @@ function system_modules_submit($form, &$form_state) {
*/
function system_modules_uninstall($form, $form_state = NULL) {
// Make sure the install API is available.
- include_once DRUPAL_ROOT . '/includes/install.inc';
+ include_once DRUPAL_ROOT . '/core/includes/install.inc';
// Display the confirm form if any modules have been submitted.
if (!empty($form_state['storage']) && $confirm_form = system_modules_uninstall_confirm_form($form_state['storage'])) {
@@ -1312,7 +1312,7 @@ function system_modules_uninstall_validate($form, &$form_state) {
*/
function system_modules_uninstall_submit($form, &$form_state) {
// Make sure the install API is available.
- include_once DRUPAL_ROOT . '/includes/install.inc';
+ include_once DRUPAL_ROOT . '/core/includes/install.inc';
if (!empty($form['#confirmed'])) {
// Call the uninstall routine for each selected module.
@@ -1857,7 +1857,7 @@ function system_rss_feeds_settings() {
* @see system_regional_settings_submit()
*/
function system_regional_settings() {
- include_once DRUPAL_ROOT . '/includes/locale.inc';
+ include_once DRUPAL_ROOT . '/core/includes/locale.inc';
$countries = country_get_list();
// Date settings:
@@ -2223,7 +2223,7 @@ function system_clean_url_settings($form, &$form_state) {
*/
function system_status($check = FALSE) {
// Load .install files
- include_once DRUPAL_ROOT . '/includes/install.inc';
+ include_once DRUPAL_ROOT . '/core/includes/install.inc';
drupal_load_updates();
// Check run-time requirements and status information.
@@ -2271,7 +2271,7 @@ function system_php() {
* Default page callback for batches.
*/
function system_batch_page() {
- require_once DRUPAL_ROOT . '/includes/batch.inc';
+ require_once DRUPAL_ROOT . '/core/includes/batch.inc';
$output = _batch_page();
if ($output === FALSE) {
diff --git core/modules/system/system.api.php core/modules/system/system.api.php
index 0981438..f380e91 100644
--- core/modules/system/system.api.php
+++ core/modules/system/system.api.php
@@ -700,7 +700,7 @@ function hook_exit($destination = NULL) {
*/
function hook_js_alter(&$javascript) {
// Swap out jQuery to use an updated version of the library.
- $javascript['misc/jquery.js']['data'] = drupal_get_path('module', 'jquery_update') . '/jquery.js';
+ $javascript['core/misc/jquery.js']['data'] = drupal_get_path('module', 'jquery_update') . '/jquery.js';
}
/**
@@ -2059,10 +2059,10 @@ function hook_theme($existing, $type, $theme, $path) {
* 'variables' => array(
* 'account' => NULL,
* ),
- * 'template' => 'modules/user/user-profile',
- * 'file' => 'modules/user/user.pages.inc',
+ * 'template' => 'core/modules/user/user-profile',
+ * 'file' => 'core/modules/user/user.pages.inc',
* 'type' => 'module',
- * 'theme path' => 'modules/user',
+ * 'theme path' => 'core/modules/user',
* 'preprocess functions' => array(
* 0 => 'template_preprocess',
* 1 => 'template_preprocess_user_profile',
diff --git core/modules/system/system.install core/modules/system/system.install
index af02edc..9d55b3b 100644
--- core/modules/system/system.install
+++ core/modules/system/system.install
@@ -290,7 +290,7 @@ function system_requirements($phase) {
}
$description .= ' ' . $t('You can run cron manually.', array('@cron' => url('admin/reports/status/run-cron')));
- $description .= '
' . $t('To run cron from outside the site, go to !cron', array('!cron' => url($base_url . '/cron.php', array('external' => TRUE, 'query' => array('cron_key' => variable_get('cron_key', 'drupal'))))));
+ $description .= '
' . $t('To run cron from outside the site, go to !cron', array('!cron' => url($base_url . '/core/cron.php', array('external' => TRUE, 'query' => array('cron_key' => variable_get('cron_key', 'drupal'))))));
$requirements['cron'] = array(
'title' => $t('Cron maintenance tasks'),
@@ -383,7 +383,7 @@ function system_requirements($phase) {
if (max($updates) > $default) {
$requirements['update']['severity'] = REQUIREMENT_ERROR;
$requirements['update']['value'] = $t('Out of date');
- $requirements['update']['description'] = $t('Some modules have database schema updates to install. You should run the database update script immediately.', array('@update' => base_path() . 'update.php'));
+ $requirements['update']['description'] = $t('Some modules have database schema updates to install. You should run the database update script immediately.', array('@update' => base_path() . 'core/update.php'));
break;
}
}
@@ -456,7 +456,7 @@ function system_requirements($phase) {
}
// Test Unicode library
- include_once DRUPAL_ROOT . '/includes/unicode.inc';
+ include_once DRUPAL_ROOT . '/core/includes/unicode.inc';
$requirements = array_merge($requirements, unicode_requirements());
if ($phase == 'runtime') {
diff --git core/modules/system/system.js core/modules/system/system.js
index 7062549..86e338c 100644
--- core/modules/system/system.js
+++ core/modules/system/system.js
@@ -119,7 +119,7 @@ Drupal.behaviors.dateTime = {
Drupal.behaviors.poweredByPreview = {
attach: function (context, settings) {
$('#edit-color, #edit-size').change(function () {
- var path = settings.basePath + 'misc/' + $('#edit-color').val() + '-' + $('#edit-size').val() + '.png';
+ var path = settings.basePath + 'core/misc/' + $('#edit-color').val() + '-' + $('#edit-size').val() + '.png';
$('img.powered-by-preview').attr('src', path);
});
}
diff --git core/modules/system/system.module core/modules/system/system.module
index 6537671..38f19bb 100644
--- core/modules/system/system.module
+++ core/modules/system/system.module
@@ -101,14 +101,14 @@ function system_help($path, $arg) {
$output = '' . t('Download additional contributed modules to extend Drupal\'s functionality.', array('@modules' => 'http://drupal.org/project/modules')) . '
';
if (module_exists('update')) {
if (update_manager_access()) {
- $output .= '' . t('Regularly review and install available updates to maintain a secure and current site. Always run the update script each time a module is updated.', array('@update-php' => $base_url . '/update.php', '@updates' => url('admin/reports/updates'))) . '
';
+ $output .= '' . t('Regularly review and install available updates to maintain a secure and current site. Always run the update script each time a module is updated.', array('@update-php' => $base_url . '/core/update.php', '@updates' => url('admin/reports/updates'))) . '
';
}
else {
- $output .= '' . t('Regularly review available updates to maintain a secure and current site. Always run the update script each time a module is updated.', array('@update-php' => $base_url . '/update.php', '@updates' => url('admin/reports/updates'))) . '
';
+ $output .= '' . t('Regularly review available updates to maintain a secure and current site. Always run the update script each time a module is updated.', array('@update-php' => $base_url . '/core/update.php', '@updates' => url('admin/reports/updates'))) . '
';
}
}
else {
- $output .= '' . t('Regularly review available updates to maintain a secure and current site. Always run the update script each time a module is updated. Enable the Update manager module to update and install modules and themes.', array('@update-php' => $base_url . '/update.php')) . '
';
+ $output .= '' . t('Regularly review available updates to maintain a secure and current site. Always run the update script each time a module is updated. Enable the Update manager module to update and install modules and themes.', array('@update-php' => $base_url . '/core/update.php')) . '
';
}
return $output;
case 'admin/modules/uninstall':
@@ -121,7 +121,7 @@ function system_help($path, $arg) {
case 'admin/config/development/maintenance':
global $user;
if ($user->uid == 1) {
- return '' . t('If you are upgrading to a newer version of Drupal or upgrading contributed modules or themes, you may need to run the update script.', array('@update-php' => $base_url . '/update.php')) . '
';
+ return '' . t('If you are upgrading to a newer version of Drupal or upgrading contributed modules or themes, you may need to run the update script.', array('@update-php' => $base_url . '/core/update.php')) . '
';
}
break;
case 'admin/config/system/actions':
@@ -1065,7 +1065,7 @@ function _system_batch_theme() {
// Retrieve the current state of the batch.
$batch = &batch_get();
if (!$batch && isset($_REQUEST['id'])) {
- require_once DRUPAL_ROOT . '/includes/batch.inc';
+ require_once DRUPAL_ROOT . '/core/includes/batch.inc';
$batch = batch_load($_REQUEST['id']);
}
// Use the same theme as the page that started the batch.
@@ -1084,7 +1084,7 @@ function system_library() {
'website' => 'http://api.drupal.org/api/drupal/includes--ajax.inc/group/ajax/7',
'version' => VERSION,
'js' => array(
- 'misc/ajax.js' => array('group' => JS_LIBRARY, 'weight' => 2),
+ 'core/misc/ajax.js' => array('group' => JS_LIBRARY, 'weight' => 2),
),
'dependencies' => array(
array('system', 'drupal.progress'),
@@ -1096,7 +1096,7 @@ function system_library() {
'title' => 'Drupal batch API',
'version' => VERSION,
'js' => array(
- 'misc/batch.js' => array('group' => JS_DEFAULT, 'cache' => FALSE),
+ 'core/misc/batch.js' => array('group' => JS_DEFAULT, 'cache' => FALSE),
),
'dependencies' => array(
array('system', 'drupal.progress'),
@@ -1108,7 +1108,7 @@ function system_library() {
'title' => 'Drupal progress indicator',
'version' => VERSION,
'js' => array(
- 'misc/progress.js' => array('group' => JS_DEFAULT, 'cache' => FALSE),
+ 'core/misc/progress.js' => array('group' => JS_DEFAULT, 'cache' => FALSE),
),
);
@@ -1117,7 +1117,7 @@ function system_library() {
'title' => 'Drupal form library',
'version' => VERSION,
'js' => array(
- 'misc/form.js' => array('group' => JS_LIBRARY, 'weight' => 1),
+ 'core/misc/form.js' => array('group' => JS_LIBRARY, 'weight' => 1),
),
);
@@ -1126,7 +1126,7 @@ function system_library() {
'title' => 'Drupal states',
'version' => VERSION,
'js' => array(
- 'misc/states.js' => array('group' => JS_LIBRARY, 'weight' => 1),
+ 'core/misc/states.js' => array('group' => JS_LIBRARY, 'weight' => 1),
),
);
@@ -1135,7 +1135,7 @@ function system_library() {
'title' => 'Drupal collapsible fieldset',
'version' => VERSION,
'js' => array(
- 'misc/collapse.js' => array('group' => JS_DEFAULT),
+ 'core/misc/collapse.js' => array('group' => JS_DEFAULT),
),
'dependencies' => array(
// collapse.js relies on drupalGetSummary in form.js
@@ -1148,7 +1148,7 @@ function system_library() {
'title' => 'Drupal resizable textarea',
'version' => VERSION,
'js' => array(
- 'misc/textarea.js' => array('group' => JS_DEFAULT),
+ 'core/misc/textarea.js' => array('group' => JS_DEFAULT),
),
);
@@ -1157,7 +1157,7 @@ function system_library() {
'title' => 'Drupal autocomplete',
'version' => VERSION,
'js' => array(
- 'misc/autocomplete.js' => array('group' => JS_DEFAULT),
+ 'core/misc/autocomplete.js' => array('group' => JS_DEFAULT),
),
);
@@ -1167,7 +1167,7 @@ function system_library() {
'website' => 'http://jquery.com',
'version' => '1.4.4',
'js' => array(
- 'misc/jquery.js' => array('group' => JS_LIBRARY, 'weight' => -20),
+ 'core/misc/jquery.js' => array('group' => JS_LIBRARY, 'weight' => -20),
),
);
@@ -1177,7 +1177,7 @@ function system_library() {
'website' => 'http://plugins.jquery.com/project/once',
'version' => '1.2',
'js' => array(
- 'misc/jquery.once.js' => array('group' => JS_LIBRARY, 'weight' => -19),
+ 'core/misc/jquery.once.js' => array('group' => JS_LIBRARY, 'weight' => -19),
),
);
@@ -1187,7 +1187,7 @@ function system_library() {
'website' => 'http://malsup.com/jquery/form/',
'version' => '2.52',
'js' => array(
- 'misc/jquery.form.js' => array(),
+ 'core/misc/jquery.form.js' => array(),
),
'dependencies' => array(
array('system', 'jquery.cookie'),
@@ -1200,7 +1200,7 @@ function system_library() {
'website' => 'http://benalman.com/projects/jquery-bbq-plugin/',
'version' => '1.2.1',
'js' => array(
- 'misc/jquery.ba-bbq.js' => array(),
+ 'core/misc/jquery.ba-bbq.js' => array(),
),
);
@@ -1210,10 +1210,10 @@ function system_library() {
'website' => 'http://drupal.org/node/323112',
'version' => '1.0',
'js' => array(
- 'misc/vertical-tabs.js' => array(),
+ 'core/misc/vertical-tabs.js' => array(),
),
'css' => array(
- 'misc/vertical-tabs.css' => array(),
+ 'core/misc/vertical-tabs.css' => array(),
),
'dependencies' => array(
// Vertical tabs relies on drupalGetSummary in form.js
@@ -1227,10 +1227,10 @@ function system_library() {
'website' => 'http://code.google.com/p/farbtastic/',
'version' => '1.2',
'js' => array(
- 'misc/farbtastic/farbtastic.js' => array(),
+ 'core/misc/farbtastic/farbtastic.js' => array(),
),
'css' => array(
- 'misc/farbtastic/farbtastic.css' => array(),
+ 'core/misc/farbtastic/farbtastic.css' => array(),
),
);
@@ -1240,7 +1240,7 @@ function system_library() {
'website' => 'http://plugins.jquery.com/project/cookie',
'version' => '1.0',
'js' => array(
- 'misc/jquery.cookie.js' => array(),
+ 'core/misc/jquery.cookie.js' => array(),
),
);
@@ -1250,11 +1250,11 @@ function system_library() {
'website' => 'http://jqueryui.com',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.core.min.js' => array('group' => JS_LIBRARY, 'weight' => -11),
+ 'core/misc/ui/jquery.ui.core.min.js' => array('group' => JS_LIBRARY, 'weight' => -11),
),
'css' => array(
- 'misc/ui/jquery.ui.core.css' => array(),
- 'misc/ui/jquery.ui.theme.css' => array(),
+ 'core/misc/ui/jquery.ui.core.css' => array(),
+ 'core/misc/ui/jquery.ui.theme.css' => array(),
),
);
$libraries['ui.accordion'] = array(
@@ -1262,10 +1262,10 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/accordion/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.accordion.min.js' => array(),
+ 'core/misc/ui/jquery.ui.accordion.min.js' => array(),
),
'css' => array(
- 'misc/ui/jquery.ui.accordion.css' => array(),
+ 'core/misc/ui/jquery.ui.accordion.css' => array(),
),
'dependencies' => array(
array('system', 'ui.widget'),
@@ -1276,10 +1276,10 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/autocomplete/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.autocomplete.min.js' => array(),
+ 'core/misc/ui/jquery.ui.autocomplete.min.js' => array(),
),
'css' => array(
- 'misc/ui/jquery.ui.autocomplete.css' => array(),
+ 'core/misc/ui/jquery.ui.autocomplete.css' => array(),
),
'dependencies' => array(
array('system', 'ui.widget'),
@@ -1291,10 +1291,10 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/button/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.button.min.js' => array(),
+ 'core/misc/ui/jquery.ui.button.min.js' => array(),
),
'css' => array(
- 'misc/ui/jquery.ui.button.css' => array(),
+ 'core/misc/ui/jquery.ui.button.css' => array(),
),
'dependencies' => array(
array('system', 'ui.widget'),
@@ -1305,10 +1305,10 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/datepicker/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.datepicker.min.js' => array(),
+ 'core/misc/ui/jquery.ui.datepicker.min.js' => array(),
),
'css' => array(
- 'misc/ui/jquery.ui.datepicker.css' => array(),
+ 'core/misc/ui/jquery.ui.datepicker.css' => array(),
),
'dependencies' => array(
array('system', 'ui'),
@@ -1319,10 +1319,10 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/dialog/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.dialog.min.js' => array(),
+ 'core/misc/ui/jquery.ui.dialog.min.js' => array(),
),
'css' => array(
- 'misc/ui/jquery.ui.dialog.css' => array(),
+ 'core/misc/ui/jquery.ui.dialog.css' => array(),
),
'dependencies' => array(
array('system', 'ui.widget'),
@@ -1338,7 +1338,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/draggable/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.draggable.min.js' => array(),
+ 'core/misc/ui/jquery.ui.draggable.min.js' => array(),
),
'dependencies' => array(
array('system', 'ui.widget'),
@@ -1350,7 +1350,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/droppable/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.droppable.min.js' => array(),
+ 'core/misc/ui/jquery.ui.droppable.min.js' => array(),
),
'dependencies' => array(
array('system', 'ui.widget'),
@@ -1363,7 +1363,7 @@ function system_library() {
'website' => 'http://docs.jquery.com/UI/Mouse',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.mouse.min.js' => array(),
+ 'core/misc/ui/jquery.ui.mouse.min.js' => array(),
),
'dependencies' => array(
array('system', 'ui.widget'),
@@ -1374,7 +1374,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/position/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.position.min.js' => array(),
+ 'core/misc/ui/jquery.ui.position.min.js' => array(),
),
);
$libraries['ui.progressbar'] = array(
@@ -1382,10 +1382,10 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/progressbar/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.progressbar.min.js' => array(),
+ 'core/misc/ui/jquery.ui.progressbar.min.js' => array(),
),
'css' => array(
- 'misc/ui/jquery.ui.progressbar.css' => array(),
+ 'core/misc/ui/jquery.ui.progressbar.css' => array(),
),
'dependencies' => array(
array('system', 'ui.widget'),
@@ -1396,10 +1396,10 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/resizable/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.resizable.min.js' => array(),
+ 'core/misc/ui/jquery.ui.resizable.min.js' => array(),
),
'css' => array(
- 'misc/ui/jquery.ui.resizable.css' => array(),
+ 'core/misc/ui/jquery.ui.resizable.css' => array(),
),
'dependencies' => array(
array('system', 'ui.widget'),
@@ -1411,10 +1411,10 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/selectable/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.selectable.min.js' => array(),
+ 'core/misc/ui/jquery.ui.selectable.min.js' => array(),
),
'css' => array(
- 'misc/ui/jquery.ui.selectable.css' => array(),
+ 'core/misc/ui/jquery.ui.selectable.css' => array(),
),
'dependencies' => array(
array('system', 'ui.widget'),
@@ -1426,10 +1426,10 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/slider/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.slider.min.js' => array(),
+ 'core/misc/ui/jquery.ui.slider.min.js' => array(),
),
'css' => array(
- 'misc/ui/jquery.ui.slider.css' => array(),
+ 'core/misc/ui/jquery.ui.slider.css' => array(),
),
'dependencies' => array(
array('system', 'ui.widget'),
@@ -1441,7 +1441,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/sortable/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.sortable.min.js' => array(),
+ 'core/misc/ui/jquery.ui.sortable.min.js' => array(),
),
'dependencies' => array(
array('system', 'ui.widget'),
@@ -1453,10 +1453,10 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/tabs/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.tabs.min.js' => array(),
+ 'core/misc/ui/jquery.ui.tabs.min.js' => array(),
),
'css' => array(
- 'misc/ui/jquery.ui.tabs.css' => array(),
+ 'core/misc/ui/jquery.ui.tabs.css' => array(),
),
'dependencies' => array(
array('system', 'ui.widget'),
@@ -1467,7 +1467,7 @@ function system_library() {
'website' => 'http://docs.jquery.com/UI/Widget',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.ui.widget.min.js' => array('group' => JS_LIBRARY, 'weight' => -10),
+ 'core/misc/ui/jquery.ui.widget.min.js' => array('group' => JS_LIBRARY, 'weight' => -10),
),
'dependencies' => array(
array('system', 'ui'),
@@ -1478,7 +1478,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/effect/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.effects.core.min.js' => array('group' => JS_LIBRARY, 'weight' => -9),
+ 'core/misc/ui/jquery.effects.core.min.js' => array('group' => JS_LIBRARY, 'weight' => -9),
),
);
$libraries['effects.blind'] = array(
@@ -1486,7 +1486,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/effect/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.effects.blind.min.js' => array(),
+ 'core/misc/ui/jquery.effects.blind.min.js' => array(),
),
'dependencies' => array(
array('system', 'effects'),
@@ -1497,7 +1497,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/effect/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.effects.bounce.min.js' => array(),
+ 'core/misc/ui/jquery.effects.bounce.min.js' => array(),
),
'dependencies' => array(
array('system', 'effects'),
@@ -1508,7 +1508,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/effect/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.effects.clip.min.js' => array(),
+ 'core/misc/ui/jquery.effects.clip.min.js' => array(),
),
'dependencies' => array(
array('system', 'effects'),
@@ -1519,7 +1519,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/effect/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.effects.drop.min.js' => array(),
+ 'core/misc/ui/jquery.effects.drop.min.js' => array(),
),
'dependencies' => array(
array('system', 'effects'),
@@ -1530,7 +1530,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/effect/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.effects.explode.min.js' => array(),
+ 'core/misc/ui/jquery.effects.explode.min.js' => array(),
),
'dependencies' => array(
array('system', 'effects'),
@@ -1541,7 +1541,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/effect/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.effects.fade.min.js' => array(),
+ 'core/misc/ui/jquery.effects.fade.min.js' => array(),
),
'dependencies' => array(
array('system', 'effects'),
@@ -1552,7 +1552,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/effect/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.effects.fold.min.js' => array(),
+ 'core/misc/ui/jquery.effects.fold.min.js' => array(),
),
'dependencies' => array(
array('system', 'effects'),
@@ -1563,7 +1563,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/effect/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.effects.highlight.min.js' => array(),
+ 'core/misc/ui/jquery.effects.highlight.min.js' => array(),
),
'dependencies' => array(
array('system', 'effects'),
@@ -1574,7 +1574,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/effect/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.effects.pulsate.min.js' => array(),
+ 'core/misc/ui/jquery.effects.pulsate.min.js' => array(),
),
'dependencies' => array(
array('system', 'effects'),
@@ -1585,7 +1585,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/effect/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.effects.scale.min.js' => array(),
+ 'core/misc/ui/jquery.effects.scale.min.js' => array(),
),
'dependencies' => array(
array('system', 'effects'),
@@ -1596,7 +1596,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/effect/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.effects.shake.min.js' => array(),
+ 'core/misc/ui/jquery.effects.shake.min.js' => array(),
),
'dependencies' => array(
array('system', 'effects'),
@@ -1607,7 +1607,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/effect/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.effects.slide.min.js' => array(),
+ 'core/misc/ui/jquery.effects.slide.min.js' => array(),
),
'dependencies' => array(
array('system', 'effects'),
@@ -1618,7 +1618,7 @@ function system_library() {
'website' => 'http://jqueryui.com/demos/effect/',
'version' => '1.8.7',
'js' => array(
- 'misc/ui/jquery.effects.transfer.min.js' => array(),
+ 'core/misc/ui/jquery.effects.transfer.min.js' => array(),
),
'dependencies' => array(
array('system', 'effects'),
@@ -1786,7 +1786,7 @@ function system_authorized_get_url(array $options = array()) {
$options['https'] = TRUE;
// We prefix with $base_url so we get a full path even if clean URLs are
// disabled.
- return url($base_url . '/authorize.php', $options);
+ return url($base_url . '/core/authorize.php', $options);
}
/**
@@ -1844,7 +1844,7 @@ function system_filetransfer_info() {
'title' => t('FTP'),
'class' => 'FileTransferFTP',
'file' => 'ftp.inc',
- 'file path' => 'includes/filetransfer',
+ 'file path' => 'core/includes/filetransfer',
'weight' => 0,
);
}
@@ -1856,7 +1856,7 @@ function system_filetransfer_info() {
'title' => t('SSH'),
'class' => 'FileTransferSSH',
'file' => 'ssh.inc',
- 'file path' => 'includes/filetransfer',
+ 'file path' => 'core/includes/filetransfer',
'weight' => 20,
);
}
@@ -1997,7 +1997,7 @@ function system_user_timezone(&$form, &$form_state) {
if (!isset($account->timezone) && $account->uid == $user->uid && empty($form_state['input']['timezone'])) {
$form['timezone']['#description'] = t('Your time zone setting will be automatically detected if possible. Confirm the selection and click save.');
$form['timezone']['timezone']['#attributes'] = array('class' => array('timezone-detect'));
- drupal_add_js('misc/timezone.js');
+ drupal_add_js('core/misc/timezone.js');
}
}
@@ -3511,7 +3511,7 @@ function system_date_format_types() {
* Implements hook_date_formats().
*/
function system_date_formats() {
- include_once DRUPAL_ROOT . '/includes/date.inc';
+ include_once DRUPAL_ROOT . '/core/includes/date.inc';
return system_default_date_formats();
}
diff --git core/modules/system/system.test core/modules/system/system.test
index ae69d1f..eca2a18 100644
--- core/modules/system/system.test
+++ core/modules/system/system.test
@@ -583,17 +583,17 @@ class CronRunTestCase extends DrupalWebTestCase {
global $base_url;
// Run cron anonymously without any cron key.
- $this->drupalGet($base_url . '/cron.php', array('external' => TRUE));
+ $this->drupalGet($base_url . '/core/cron.php', array('external' => TRUE));
$this->assertResponse(403);
// Run cron anonymously with a random cron key.
$key = $this->randomName(16);
- $this->drupalGet($base_url . '/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key)));
+ $this->drupalGet($base_url . '/core/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key)));
$this->assertResponse(403);
// Run cron anonymously with the valid cron key.
$key = variable_get('cron_key', 'drupal');
- $this->drupalGet($base_url . '/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key)));
+ $this->drupalGet($base_url . '/core/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key)));
$this->assertResponse(200);
}
@@ -1406,16 +1406,16 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase {
$this->drupalPost('admin/appearance', $edit, t('Save configuration'));
$this->drupalGet('admin/config');
- $this->assertRaw('themes/seven', t('Administration theme used on an administration page.'));
+ $this->assertRaw('core/themes/seven', t('Administration theme used on an administration page.'));
$this->drupalGet('node/' . $this->node->nid);
- $this->assertRaw('themes/stark', t('Site default theme used on node page.'));
+ $this->assertRaw('core/themes/stark', t('Site default theme used on node page.'));
$this->drupalGet('node/add');
- $this->assertRaw('themes/seven', t('Administration theme used on the add content page.'));
+ $this->assertRaw('core/themes/seven', t('Administration theme used on the add content page.'));
$this->drupalGet('node/' . $this->node->nid . '/edit');
- $this->assertRaw('themes/seven', t('Administration theme used on the edit content page.'));
+ $this->assertRaw('core/themes/seven', t('Administration theme used on the edit content page.'));
// Disable the admin theme on the node admin pages.
$edit = array(
@@ -1424,10 +1424,10 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase {
$this->drupalPost('admin/appearance', $edit, t('Save configuration'));
$this->drupalGet('admin/config');
- $this->assertRaw('themes/seven', t('Administration theme used on an administration page.'));
+ $this->assertRaw('core/themes/seven', t('Administration theme used on an administration page.'));
$this->drupalGet('node/add');
- $this->assertRaw('themes/stark', t('Site default theme used on the add content page.'));
+ $this->assertRaw('core/themes/stark', t('Site default theme used on the add content page.'));
// Reset to the default theme settings.
variable_set('theme_default', 'bartik');
@@ -1438,10 +1438,10 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase {
$this->drupalPost('admin/appearance', $edit, t('Save configuration'));
$this->drupalGet('admin');
- $this->assertRaw('themes/bartik', t('Site default theme used on administration page.'));
+ $this->assertRaw('core/themes/bartik', t('Site default theme used on administration page.'));
$this->drupalGet('node/add');
- $this->assertRaw('themes/bartik', t('Site default theme used on the add content page.'));
+ $this->assertRaw('core/themes/bartik', t('Site default theme used on the add content page.'));
}
}
@@ -1820,7 +1820,7 @@ class UpdateScriptFunctionalTest extends DrupalWebTestCase {
function setUp() {
parent::setUp();
- $this->update_url = $GLOBALS['base_url'] . '/update.php';
+ $this->update_url = $GLOBALS['base_url'] . '/core/update.php';
$this->update_user = $this->drupalCreateUser(array('administer software updates'));
}
@@ -1847,7 +1847,7 @@ class UpdateScriptFunctionalTest extends DrupalWebTestCase {
// Access the update page as user 1.
$user1 = user_load(1);
$user1->pass_raw = user_password();
- require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
+ require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'core/includes/password.inc');
$user1->pass = user_hash_password(trim($user1->pass_raw));
db_query("UPDATE {users} SET pass = :pass WHERE uid = :uid", array(':pass' => $user1->pass, ':uid' => $user1->uid));
$this->drupalLogin($user1);
diff --git core/modules/system/system.updater.inc core/modules/system/system.updater.inc
index 0df1ad9..84c1752 100644
--- core/modules/system/system.updater.inc
+++ core/modules/system/system.updater.inc
@@ -52,8 +52,8 @@ class ModuleUpdater extends Updater implements DrupalUpdaterInterface {
* Return available database schema updates one a new version is installed.
*/
public function getSchemaUpdates() {
- require_once DRUPAL_ROOT . '/includes/install.inc';
- require_once DRUPAL_ROOT . '/includes/update.inc';
+ require_once DRUPAL_ROOT . '/core/includes/install.inc';
+ require_once DRUPAL_ROOT . '/core/includes/update.inc';
if (_update_get_project_type($project) != 'module') {
return array();
diff --git core/modules/translation/translation.pages.inc core/modules/translation/translation.pages.inc
index 102d1b8..ae54a43 100644
--- core/modules/translation/translation.pages.inc
+++ core/modules/translation/translation.pages.inc
@@ -12,7 +12,7 @@
* Node object.
*/
function translation_node_overview($node) {
- include_once DRUPAL_ROOT . '/includes/language.inc';
+ include_once DRUPAL_ROOT . '/core/includes/language.inc';
if ($node->tnid) {
// Already part of a set, grab that set.
diff --git core/modules/update/update.authorize.inc core/modules/update/update.authorize.inc
index f4be44e..44fce05 100644
--- core/modules/update/update.authorize.inc
+++ core/modules/update/update.authorize.inc
@@ -211,7 +211,7 @@ function update_authorize_update_batch_finished($success, $results) {
// Since we're doing an update of existing code, always add a task for
// running update.php.
$results['tasks'][] = t('Your modules have been downloaded and updated.');
- $results['tasks'][] = t('Run database updates', array('@update' => base_path() . 'update.php'));
+ $results['tasks'][] = t('Run database updates', array('@update' => base_path() . 'core/update.php'));
// Unset the variable since it is no longer needed.
unset($_SESSION['maintenance_mode']);
diff --git core/modules/update/update.module core/modules/update/update.module
index 1008964..e7a05c0 100644
--- core/modules/update/update.module
+++ core/modules/update/update.module
@@ -661,10 +661,10 @@ function update_verify_update_archive($project, $archive_file, $directory) {
// Make sure this isn't a tarball of Drupal core.
if (
file_exists("$directory/$project/index.php")
- && file_exists("$directory/$project/update.php")
- && file_exists("$directory/$project/includes/bootstrap.inc")
- && file_exists("$directory/$project/modules/node/node.module")
- && file_exists("$directory/$project/modules/system/system.module")
+ && file_exists("$directory/$project/core/update.php")
+ && file_exists("$directory/$project/core/includes/bootstrap.inc")
+ && file_exists("$directory/$project/core/modules/node/node.module")
+ && file_exists("$directory/$project/core/modules/system/system.module")
) {
return array(
'no-core' => t('Automatic updating of Drupal core is not supported. See the upgrade guide for information on how to update Drupal core manually.', array('@upgrade-guide' => 'http://drupal.org/upgrade')),
diff --git core/modules/update/update.report.inc core/modules/update/update.report.inc
index 8e9dbae..7e066c5 100644
--- core/modules/update/update.report.inc
+++ core/modules/update/update.report.inc
@@ -57,25 +57,25 @@ function theme_update_report($variables) {
switch ($project['status']) {
case UPDATE_CURRENT:
$class = 'ok';
- $icon = theme('image', array('path' => 'misc/watchdog-ok.png', 'alt' => t('ok'), 'title' => t('ok')));
+ $icon = theme('image', array('path' => 'core/misc/watchdog-ok.png', 'alt' => t('ok'), 'title' => t('ok')));
break;
case UPDATE_UNKNOWN:
case UPDATE_FETCH_PENDING:
case UPDATE_NOT_FETCHED:
$class = 'unknown';
- $icon = theme('image', array('path' => 'misc/watchdog-warning.png', 'alt' => t('warning'), 'title' => t('warning')));
+ $icon = theme('image', array('path' => 'core/misc/watchdog-warning.png', 'alt' => t('warning'), 'title' => t('warning')));
break;
case UPDATE_NOT_SECURE:
case UPDATE_REVOKED:
case UPDATE_NOT_SUPPORTED:
$class = 'error';
- $icon = theme('image', array('path' => 'misc/watchdog-error.png', 'alt' => t('error'), 'title' => t('error')));
+ $icon = theme('image', array('path' => 'core/misc/watchdog-error.png', 'alt' => t('error'), 'title' => t('error')));
break;
case UPDATE_NOT_CHECKED:
case UPDATE_NOT_CURRENT:
default:
$class = 'warning';
- $icon = theme('image', array('path' => 'misc/watchdog-warning.png', 'alt' => t('warning'), 'title' => t('warning')));
+ $icon = theme('image', array('path' => 'core/misc/watchdog-warning.png', 'alt' => t('warning'), 'title' => t('warning')));
break;
}
diff --git core/modules/user/user.install core/modules/user/user.install
index 0967818..52a943b 100644
--- core/modules/user/user.install
+++ core/modules/user/user.install
@@ -413,7 +413,7 @@ function user_update_7000(&$sandbox) {
$sandbox['user_count'] = db_query("SELECT COUNT(uid) FROM {users}")->fetchField();
}
else {
- require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
+ require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'core/includes/password.inc');
// Hash again all current hashed passwords.
$has_rows = FALSE;
// Update this many per page load.
diff --git core/modules/user/user.module core/modules/user/user.module
index 7f22f7c..fc524a0 100644
--- core/modules/user/user.module
+++ core/modules/user/user.module
@@ -406,7 +406,7 @@ function user_save($account, $edit = array(), $category = 'account') {
try {
if (!empty($edit['pass'])) {
// Allow alternate password hashing schemes.
- require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
+ require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'core/includes/password.inc');
$edit['pass'] = user_hash_password(trim($edit['pass']));
// Abort if the hashing failed and returned FALSE.
if (!$edit['pass']) {
@@ -1171,7 +1171,7 @@ function user_validate_current_pass(&$form, &$form_state) {
// form values like password_confirm that have their own validation
// that prevent them from being empty if they are changed.
if ((strlen(trim($form_state['values'][$key])) > 0) && ($form_state['values'][$key] != $account->$key)) {
- require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
+ require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'core/includes/password.inc');
$current_pass_failed = empty($form_state['values']['current_pass']) || !user_check_password($form_state['values']['current_pass'], $account);
if ($current_pass_failed) {
form_set_error('current_pass', t("Your current password is missing or incorrect; it's required to change the %name.", array('%name' => $name)));
@@ -2171,7 +2171,7 @@ function user_authenticate($name, $password) {
$account = user_load_by_name($name);
if ($account) {
// Allow alternate password hashing schemes.
- require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
+ require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'core/includes/password.inc');
if (user_check_password($password, $account)) {
// Successful authentication.
$uid = $account->uid;
diff --git core/modules/user/user.test core/modules/user/user.test
index 3c453a8..53c3c3a 100644
--- core/modules/user/user.test
+++ core/modules/user/user.test
@@ -375,7 +375,7 @@ class UserLoginTestCase extends DrupalWebTestCase {
*/
function testPasswordRehashOnLogin() {
// Load password hashing API.
- require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
+ require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'core/includes/password.inc');
// Set initial $count_log2 to the default, DRUPAL_HASH_COUNT.
variable_set('password_count_log2', DRUPAL_HASH_COUNT);
// Create a new user and authenticate.
@@ -482,7 +482,7 @@ class UserCancelTestCase extends DrupalWebTestCase {
function testUserCancelUid1() {
// Update uid 1's name and password to we know it.
$password = user_password();
- require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
+ require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'core/includes/password.inc');
$account = array(
'name' => 'user1',
'pass' => user_hash_password(trim($password)),
diff --git core/scripts/cron-curl.sh core/scripts/cron-curl.sh
index 9b168ab..71f06b9 100644
--- core/scripts/cron-curl.sh
+++ core/scripts/cron-curl.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-curl --silent --compressed http://example.com/cron.php
+curl --silent --compressed http://example.com/core/cron.php
diff --git core/scripts/cron-lynx.sh core/scripts/cron-lynx.sh
index 904667a..36880d2 100644
--- core/scripts/cron-lynx.sh
+++ core/scripts/cron-lynx.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-/usr/bin/lynx -source http://example.com/cron.php > /dev/null 2>&1
+/usr/bin/lynx -source http://example.com/core/cron.php > /dev/null 2>&1
diff --git core/scripts/drupal.sh core/scripts/drupal.sh
index 5d064f5..cf17e68 100755
--- core/scripts/drupal.sh
+++ core/scripts/drupal.sh
@@ -44,7 +44,7 @@ All arguments are long options.
i.e. if URI is set to http://default/bar/foo.php
and bar/foo.php exists, this script will be executed without
bootstrapping Drupal. To execute Drupal's cron.php, specify
- http://default/cron.php as the URI.
+ http://default/core/cron.php as the URI.
To run this script without --root argument invoke it from the root directory
diff --git core/scripts/password-hash.sh core/scripts/password-hash.sh
index 004421a..66fcb26 100755
--- core/scripts/password-hash.sh
+++ core/scripts/password-hash.sh
@@ -78,10 +78,11 @@ while ($param = array_shift($_SERVER['argv'])) {
}
}
+chdir('../..');
define('DRUPAL_ROOT', getcwd());
-include_once DRUPAL_ROOT . '/includes/password.inc';
-include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
+include_once DRUPAL_ROOT . '/core/includes/password.inc';
+include_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
foreach ($passwords as $password) {
print("\npassword: $password \t\thash: ". user_hash_password($password) ."\n");
diff --git core/scripts/run-tests.sh core/scripts/run-tests.sh
index 2cfbcac..9d907fc 100755
--- core/scripts/run-tests.sh
+++ core/scripts/run-tests.sh
@@ -139,7 +139,8 @@ All arguments are long options.
--class Run tests identified by specific class names, instead of group names.
--file Run tests identified by specific file names, instead of group names.
- Specify the path and the extension (i.e. 'modules/user/user.test').
+ Specify the path and the extension
+ (i.e. 'core/modules/user/user.test').
--xml
@@ -302,9 +303,9 @@ function simpletest_script_init($server_software) {
}
}
- chdir(realpath(dirname(__FILE__) . '/..'));
+ chdir(realpath(dirname(__FILE__) . '/../..'));
define('DRUPAL_ROOT', getcwd());
- require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
+ require_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
}
/**
diff --git core/themes/seven/template.php core/themes/seven/template.php
index 5be459b..abff770 100644
--- core/themes/seven/template.php
+++ core/themes/seven/template.php
@@ -100,14 +100,14 @@ function seven_tablesort_indicator($variables) {
*/
function seven_css_alter(&$css) {
// Use Seven's vertical tabs style instead of the default one.
- if (isset($css['misc/vertical-tabs.css'])) {
- $css['misc/vertical-tabs.css']['data'] = drupal_get_path('theme', 'seven') . '/vertical-tabs.css';
+ if (isset($css['core/misc/vertical-tabs.css'])) {
+ $css['core/misc/vertical-tabs.css']['data'] = drupal_get_path('theme', 'seven') . '/vertical-tabs.css';
}
- if (isset($css['misc/vertical-tabs-rtl.css'])) {
- $css['misc/vertical-tabs-rtl.css']['data'] = drupal_get_path('theme', 'seven') . '/vertical-tabs-rtl.css';
+ if (isset($css['core/misc/vertical-tabs-rtl.css'])) {
+ $css['core/misc/vertical-tabs-rtl.css']['data'] = drupal_get_path('theme', 'seven') . '/vertical-tabs-rtl.css';
}
// Use Seven's jQuery UI theme style instead of the default one.
- if (isset($css['misc/ui/jquery.ui.theme.css'])) {
- $css['misc/ui/jquery.ui.theme.css']['data'] = drupal_get_path('theme', 'seven') . '/jquery.ui.theme.css';
+ if (isset($css['core/misc/ui/jquery.ui.theme.css'])) {
+ $css['core/misc/ui/jquery.ui.theme.css']['data'] = drupal_get_path('theme', 'seven') . '/jquery.ui.theme.css';
}
}
diff --git core/update.php core/update.php
index 785c50b..11d822a 100644
--- core/update.php
+++ core/update.php
@@ -1,15 +1,10 @@
Front page';
$links[] = 'Administration pages';
return $links;
@@ -340,12 +343,12 @@ ini_set('display_errors', FALSE);
// We prepare a minimal bootstrap for the update requirements check to avoid
// reaching the PHP memory limit.
-require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
-require_once DRUPAL_ROOT . '/includes/update.inc';
-require_once DRUPAL_ROOT . '/includes/common.inc';
-require_once DRUPAL_ROOT . '/includes/file.inc';
-require_once DRUPAL_ROOT . '/includes/entity.inc';
-require_once DRUPAL_ROOT . '/includes/unicode.inc';
+require_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
+require_once DRUPAL_ROOT . '/core/includes/update.inc';
+require_once DRUPAL_ROOT . '/core/includes/common.inc';
+require_once DRUPAL_ROOT . '/core/includes/file.inc';
+require_once DRUPAL_ROOT . '/core/includes/entity.inc';
+require_once DRUPAL_ROOT . '/core/includes/unicode.inc';
update_prepare_d7_bootstrap();
// Temporarily disable configurable timezones so the upgrade process uses the
@@ -365,12 +368,12 @@ $conf['configurable_timezones'] = $configurable_timezones;
// configuration).
$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : '';
if (empty($op) && update_access_allowed()) {
- require_once DRUPAL_ROOT . '/includes/install.inc';
- require_once DRUPAL_ROOT . '/modules/system/system.install';
+ require_once DRUPAL_ROOT . '/core/includes/install.inc';
+ require_once DRUPAL_ROOT . '/core/modules/system/system.install';
// Load module basics.
- include_once DRUPAL_ROOT . '/includes/module.inc';
- $module_list['system']['filename'] = 'modules/system/system.module';
+ include_once DRUPAL_ROOT . '/core/includes/module.inc';
+ $module_list['system']['filename'] = 'core/modules/system/system.module';
module_list(TRUE, FALSE, FALSE, $module_list);
drupal_load('module', 'system');
@@ -388,14 +391,14 @@ if (empty($op) && update_access_allowed()) {
update_check_requirements();
// Redirect to the update information page if all requirements were met.
- install_goto('update.php?op=info');
+ install_goto('core/update.php?op=info');
}
// update_fix_d7_requirements() needs to run before bootstrapping beyond path.
// So bootstrap to DRUPAL_BOOTSTRAP_LANGUAGE then include unicode.inc.
drupal_bootstrap(DRUPAL_BOOTSTRAP_LANGUAGE);
-include_once DRUPAL_ROOT . '/includes/unicode.inc';
+include_once DRUPAL_ROOT . '/core/includes/unicode.inc';
update_fix_d7_requirements();
@@ -411,8 +414,8 @@ ini_set('display_errors', TRUE);
// Only proceed with updates if the user is allowed to run them.
if (update_access_allowed()) {
- include_once DRUPAL_ROOT . '/includes/install.inc';
- include_once DRUPAL_ROOT . '/includes/batch.inc';
+ include_once DRUPAL_ROOT . '/core/includes/install.inc';
+ include_once DRUPAL_ROOT . '/core/includes/batch.inc';
drupal_load_updates();
update_fix_compatibility();
@@ -432,7 +435,7 @@ if (update_access_allowed()) {
case 'Apply pending updates':
if (isset($_GET['token']) && $_GET['token'] == drupal_get_token('update')) {
- update_batch($_POST['start'], $base_url . '/update.php?op=results', $base_url . '/update.php');
+ update_batch($_POST['start'], $base_url . '/core/update.php?op=results', $base_url . '/core/update.php');
break;
}
diff --git core/xmlrpc.php core/xmlrpc.php
index b202dc2..562aa81 100644
--- core/xmlrpc.php
+++ core/xmlrpc.php
@@ -5,14 +5,17 @@
* PHP page for handling incoming XML-RPC requests from clients.
*/
+// Change the directory to the Drupal root.
+chdir('..');
+
/**
* Root directory of Drupal installation.
*/
define('DRUPAL_ROOT', getcwd());
-include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
+include_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
-include_once DRUPAL_ROOT . '/includes/xmlrpc.inc';
-include_once DRUPAL_ROOT . '/includes/xmlrpcs.inc';
+include_once DRUPAL_ROOT . '/core/includes/xmlrpc.inc';
+include_once DRUPAL_ROOT . '/core/includes/xmlrpcs.inc';
xmlrpc_server(module_invoke_all('xmlrpc'));
diff --git index.php index.php
index 8b83199..b91fb1e 100644
--- index.php
+++ index.php
@@ -8,7 +8,7 @@
* prints the appropriate page.
*
* All Drupal code is released under the GNU General Public License.
- * See COPYRIGHT.txt and LICENSE.txt.
+ * See COPYRIGHT.txt and LICENSE.txt files in the "core" directory.
*/
/**
@@ -16,6 +16,6 @@
*/
define('DRUPAL_ROOT', getcwd());
-require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
+require_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
menu_execute_active_handler();
diff --git robots.txt robots.txt
index 490fa59..aaf51ba 100644
--- robots.txt
+++ robots.txt
@@ -19,24 +19,10 @@
User-agent: *
Crawl-delay: 10
# Directories
-Disallow: /includes/
-Disallow: /misc/
-Disallow: /modules/
-Disallow: /profiles/
-Disallow: /scripts/
-Disallow: /themes/
+Disallow: /core/
# Files
-Disallow: /CHANGELOG.txt
-Disallow: /cron.php
-Disallow: /INSTALL.mysql.txt
-Disallow: /INSTALL.pgsql.txt
-Disallow: /install.php
-Disallow: /INSTALL.txt
-Disallow: /LICENSE.txt
-Disallow: /MAINTAINERS.txt
-Disallow: /update.php
-Disallow: /UPGRADE.txt
-Disallow: /xmlrpc.php
+Disallow: /README.txt
+Disallow: /web.config
# Paths (clean URLs)
Disallow: /admin/
Disallow: /comment/reply/
diff --git sites/default/default.settings.php sites/default/default.settings.php
index 05cfdc4..f9f7210 100644
--- sites/default/default.settings.php
+++ sites/default/default.settings.php
@@ -315,7 +315,7 @@ ini_set('session.cookie_lifetime', 2000000);
* is explicitly set to maintenance mode through the administration page or when
* the database is inactive due to an error. It can be set through the
* 'maintenance_theme' key. The template file should also be copied into the
- * theme. It is located inside 'modules/system/maintenance-page.tpl.php'.
+ * theme. It is located inside 'core/modules/system/maintenance-page.tpl.php'.
* Note: This setting does not apply to installation and update pages.
*/
# $conf['maintenance_theme'] = 'bartik';