Commit af7a3a8d authored by webchick's avatar webchick

Issue #1724252 by sun: Replace /sites/all/* with top-level directories.

parent aba77548
......@@ -38,8 +38,7 @@ More about configuration:
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
functionality:
* Download contributed modules to /modules to extend Drupal's functionality:
http://drupal.org/project/modules
* See also: "Developing for Drupal" for writing your own modules, below.
......@@ -52,8 +51,7 @@ themes. More themes are available for download, and you can also create your own
custom theme.
More about themes:
* Download contributed themes to sites/all/themes to modify Drupal's
appearance:
* Download contributed themes to /themes to modify Drupal's appearance:
http://drupal.org/project/themes
* Develop your own theme:
http://drupal.org/documentation/theme
......
......@@ -312,9 +312,9 @@ more at http://drupal.org/project/modules and http://drupal.org/project/themes
Do not mix downloaded or custom modules and themes with Drupal's core modules
and themes. Drupal's modules and themes are located in the top-level modules and
themes directories, while the modules and themes you add to Drupal are normally
placed in the sites/all/modules and sites/all/themes directories. If you run a
multisite installation, you can also place modules and themes in the
site-specific directories -- see the Multisite Configuration section, below.
placed in the /modules and /themes directories. If you run a multisite
installation, you can also place modules and themes in the site-specific
directories -- see the Multisite Configuration section, below.
Never edit Drupal's core modules and themes; instead, use the hooks available in
the Drupal API. To modify the behavior of Drupal, develop a module as described
......
......@@ -172,9 +172,9 @@ following the instructions in the INTRODUCTION section at the top of this file:
If you made modifications to files like .htaccess or robots.txt, you will
need to re-apply them from your backup, after the new files are in place.
10. If you uninstalled any modules, remove them from the sites/all/modules and
other sites/*/modules directories. Leave other modules in place, even though
they are incompatible with Drupal 8.x.
10. If you uninstalled any modules, remove them from the /modules and other
sites/*/modules directories. Leave other modules in place, even though they
are incompatible with Drupal 8.x.
11. Download the latest Drupal 8.x release from http://drupal.org to a
directory outside of your web root. Extract the archive and copy the files
......
......@@ -812,8 +812,8 @@ function drupal_settings_initialize() {
* configuration. For example, a module 'foo' may legally be be located
* in any of these three places:
*
* core/modules/foo/foo.module
* modules/foo/foo.module
* sites/all/modules/foo/foo.module
* sites/example.com/modules/foo/foo.module
*
* Calling drupal_get_filename('module', 'foo') will give you one of
......
......@@ -5130,7 +5130,7 @@ function drupal_cron_cleanup() {
* this function will search the site-wide modules directory (i.e., /modules/),
* your install profile's directory (i.e.,
* /profiles/your_site_profile/modules/), the all-sites directory (i.e.,
* /sites/all/modules/), and your site-specific directory (i.e.,
* /modules/), and your site-specific directory (i.e.,
* /sites/your_site_dir/modules/), in that order, and return information about
* all of the files ending in .module in those directories.
*
......@@ -5147,7 +5147,7 @@ function drupal_cron_cleanup() {
* @param string $directory
* The subdirectory name in which the files are found. For example,
* 'core/modules' will search in sub-directories of the /core/modules
* directory, sub-directories of /sites/all/modules/, etc.
* directory, sub-directories of /modules/, etc.
* @param string $key
* The key to be used for the associative array returned. Possible values are
* 'uri', for the file's URI; 'filename', for the basename of the file; and
......@@ -5173,10 +5173,10 @@ function drupal_system_listing($mask, $directory, $key = 'name', $min_depth = 1)
// Search for the directory in core.
$searchdir = array('core/' . $directory);
// The 'profiles' directory contains pristine collections of modules and
// The 'core/profiles' directory contains pristine collections of modules and
// themes as provided by a distribution. It is pristine in the same way that
// the 'core/modules' directory is pristine for core; users should avoid
// any modification by using the sites/all or sites/<domain> directories.
// any modification by using the top-level or sites/<domain> directories.
$profile = drupal_get_profile();
// For SimpleTest to be able to test modules packaged together with a
// distribution we need to include the profile of the parent site (in which
......@@ -5191,11 +5191,11 @@ function drupal_system_listing($mask, $directory, $key = 'name', $min_depth = 1)
// profile always has precedence.
$searchdir[] = drupal_get_path('profile', $profile) . '/' . $directory;
// For the case of searching for profiles, scan top-level directories.
// @todo Replace entire sites/all/$directory with this.
// Always search for contributed and custom extensions in top-level
// directories as well as sites/all/* directories. If the same extension is
// located in both directories, then the latter wins for legacy/historical
// reasons.
$searchdir[] = $directory;
// Always search sites/all/* as well as the global directories.
$searchdir[] = 'sites/all/' . $directory;
if (file_exists("$config/$directory")) {
......@@ -5215,7 +5215,7 @@ function drupal_system_listing($mask, $directory, $key = 'name', $min_depth = 1)
// The exception to this is if the later file is from a module or theme not
// compatible with Drupal core. This may occur during upgrades of Drupal
// core when new modules exist in core while older contrib modules with the
// same name exist in a directory such as sites/all/modules/.
// same name exist in a directory such as /modules.
foreach (array_intersect_key($files_to_add, $files) as $file_key => $file) {
// If it has no info file, then we just behave liberally and accept the
// new resource on the list for merging.
......
......@@ -389,7 +389,7 @@ function drupal_verify_profile($install_state) {
'title' => st('Required modules'),
'value' => st('Required modules not found.'),
'severity' => REQUIREMENT_ERROR,
'description' => st('The following modules are required but were not found. Move them into the appropriate modules subdirectory, such as <em>sites/all/modules</em>. Missing modules: !modules', array('!modules' => implode(', ', $modules))),
'description' => st('The following modules are required but were not found. Move them into the appropriate modules subdirectory, such as <em>/modules</em>. Missing modules: !modules', array('!modules' => implode(', ', $modules))),
);
}
return $requirements;
......
......@@ -19,11 +19,11 @@ class Module extends Updater implements UpdaterInterface {
* If the module is already installed, drupal_get_path() will return
* a valid path and we should install it there (although we need to use an
* absolute path, so we prepend DRUPAL_ROOT). If we're installing a new
* module, we always want it to go into sites/all/modules, since that's
* module, we always want it to go into /modules, since that's
* where all the documentation recommends users install their modules, and
* there's no way that can conflict on a multi-site installation, since
* the Update manager won't let you install a new module if it's already
* found on your system, and if there was a copy in sites/all, we'd see it.
* found on your system, and if there was a copy in the top-level we'd see it.
*
* @return string
* A directory path.
......@@ -33,7 +33,7 @@ public function getInstallDirectory() {
$relative_path = dirname($relative_path);
}
else {
$relative_path = 'sites/all/modules';
$relative_path = 'modules';
}
return DRUPAL_ROOT . '/' . $relative_path;
}
......
......@@ -19,11 +19,11 @@ class Theme extends Updater implements UpdaterInterface {
* If the theme is already installed, drupal_get_path() will return
* a valid path and we should install it there (although we need to use an
* absolute path, so we prepend DRUPAL_ROOT). If we're installing a new
* theme, we always want it to go into sites/all/themes, since that's
* theme, we always want it to go into /themes, since that's
* where all the documentation recommends users install their themes, and
* there's no way that can conflict on a multi-site installation, since
* the Update manager won't let you install a new theme if it's already
* found on your system, and if there was a copy in sites/all, we'd see it.
* found on your system, and if there was a copy in the top-level we'd see it.
*
* @return string
* A directory path.
......@@ -33,7 +33,7 @@ public function getInstallDirectory() {
$relative_path = dirname($relative_path);
}
else {
$relative_path = 'sites/all/themes';
$relative_path = 'themes';
}
return DRUPAL_ROOT . '/' . $relative_path;
}
......
......@@ -198,9 +198,9 @@ public function update(&$filetransfer, $overrides = array()) {
// Make sure the installation parent directory exists and is writable.
$this->prepareInstallDirectory($filetransfer, $args['install_dir']);
// Note: If the project is installed in sites/all, it will not be
// Note: If the project is installed in the top-level, it will not be
// deleted. It will be installed in sites/default as that will override
// the sites/all reference and not break other sites which are using it.
// the top-level reference and not break other sites which are using it.
if (is_dir($args['install_dir'] . '/' . $this->name)) {
// Remove the existing installed file.
$filetransfer->removeDirectory($args['install_dir'] . '/' . $this->name);
......
This directory is reserved for core module files. Custom or contributed modules
should be placed in their own subdirectory of the sites/all/modules directory.
For multisite installations, they can also be placed in a subdirectory under
/sites/{sitename}/modules/, where {sitename} is the name of your site (e.g.,
www.example.com). This will allow you to more easily update Drupal core files.
For more details, see: http://drupal.org/node/176043
This directory is reserved for core theme files. Custom or contributed themes
should be placed in their own subdirectory of the sites/all/themes directory.
For multisite installations, they can also be placed in a subdirectory under
/sites/{sitename}/themes/, where {sitename} is the name of your site (e.g.,
www.example.com). This will allow you to more easily update Drupal core files.
For more details, see: http://drupal.org/node/176043
......@@ -21,5 +21,5 @@ ABOUT DRUPAL THEMING
To learn how to build your own custom theme and override Drupal's default code,
see the Theming Guide: http://drupal.org/theme-guide
See the sites/all/themes/README.txt for more information on where to place your
See the themes/README.txt for more information on where to place your
custom themes to ensure easy maintenance and upgrades.
This directory should be used to place downloaded and custom modules, themes
and profiles which are common to all sites. Keeping contributed and custom
modules, themes, and profiles in the sites directory will aid in upgrading
Drupal core files. Place contributed and custom modules, themes, and profiles
in the sites/all/modules, sites/all/themes, and sites/all/profiles directories
respectively.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment