update to D 7.17

Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy
2012-12-08 11:35:42 +01:00
parent 975d758599
commit 5396b3e2b5
284 changed files with 3674 additions and 1854 deletions

View File

@@ -1,5 +1,10 @@
<?php
/**
* @file
* API functions for installing modules and themes.
*/
/**
* Indicates that a module has not been installed yet.
*/
@@ -71,7 +76,7 @@ define('FILE_NOT_WRITABLE', 64);
define('FILE_NOT_EXECUTABLE', 128);
/**
* Initialize the update system by loading all installed module's .install files.
* Loads .install files for installed modules to initialize the update system.
*/
function drupal_load_updates() {
foreach (drupal_get_installed_schema_version(NULL, FALSE, TRUE) as $module => $schema_version) {
@@ -180,11 +185,11 @@ function drupal_set_installed_schema_version($module, $version) {
}
/**
* Loads the install profile, extracting its defined distribution name.
* Loads the installation profile, extracting its defined distribution name.
*
* @return
* The distribution name defined in the profile's .info file. Defaults to
* "Drupal" if none is explicitly provided by the install profile.
* "Drupal" if none is explicitly provided by the installation profile.
*
* @see install_profile_info()
*/
@@ -204,11 +209,12 @@ function drupal_install_profile_distribution_name() {
}
/**
* Auto detect the base_url with PHP predefined variables.
* Detects the base URL using the PHP $_SERVER variables.
*
* @param $file
* The name of the file calling this function so we can strip it out of
* the URI when generating the base_url.
*
* @return
* The auto-detected $base_url that should be configured in settings.php
*/
@@ -223,7 +229,7 @@ function drupal_detect_baseurl($file = 'install.php') {
}
/**
* Detect all supported databases that are compiled into PHP.
* Detects all supported databases that are compiled into PHP.
*
* @return
* An array of database types compiled into PHP.
@@ -239,7 +245,7 @@ function drupal_detect_database_types() {
}
/**
* Return all supported database installer objects that are compiled into PHP.
* Returns all supported database installer objects that are compiled into PHP.
*
* @return
* An array of database installer objects compiled into PHP.
@@ -576,7 +582,7 @@ class DatabaseTaskException extends Exception {
}
/**
* Replace values in settings.php with values in the submitted array.
* Replaces values in settings.php with values in the submitted array.
*
* @param $settings
* An array of settings that need to be updated.
@@ -654,10 +660,11 @@ function drupal_rewrite_settings($settings = array(), $prefix = '') {
}
/**
* Verify an install profile for installation.
* Verifies an installation profile for installation.
*
* @param $install_state
* An array of information about the current installation state.
*
* @return
* The list of modules to install.
*/
@@ -681,8 +688,8 @@ function drupal_verify_profile($install_state) {
$present_modules[] = $present_module->name;
}
// The install profile is also a module, which needs to be installed after all the other dependencies
// have been installed.
// The installation profile is also a module, which needs to be installed
// after all the other dependencies have been installed.
$present_modules[] = drupal_get_profile();
// Verify that all of the profile's required modules are present.
@@ -706,7 +713,7 @@ function drupal_verify_profile($install_state) {
}
/**
* Callback to install the system module.
* Installs the system module.
*
* Separated from the installation of other modules so core system
* functions can be made available while other modules are installed.
@@ -800,7 +807,7 @@ function drupal_uninstall_modules($module_list = array(), $uninstall_dependents
}
/**
* Verify the state of the specified file.
* Verifies the state of the specified file.
*
* @param $file
* The file to check for.
@@ -808,6 +815,7 @@ function drupal_uninstall_modules($module_list = array(), $uninstall_dependents
* An optional bitmask created from various FILE_* constants.
* @param $type
* The type of file. Can be file (default), dir, or link.
*
* @return
* TRUE on success or FALSE on failure. A message is set for the latter.
*/
@@ -879,7 +887,7 @@ function drupal_verify_install_file($file, $mask = NULL, $type = 'file') {
}
/**
* Create a directory with specified permissions.
* Creates a directory with the specified permissions.
*
* @param $file
* The name of the directory to create;
@@ -887,6 +895,7 @@ function drupal_verify_install_file($file, $mask = NULL, $type = 'file') {
* The permissions of the directory to create.
* @param $message
* (optional) Whether to output messages. Defaults to TRUE.
*
* @return
* TRUE/FALSE whether or not the directory was successfully created.
*/
@@ -918,7 +927,7 @@ function drupal_install_mkdir($file, $mask, $message = TRUE) {
}
/**
* Attempt to fix file permissions.
* Attempts to fix file permissions.
*
* The general approach here is that, because we do not know the security
* setup of the webserver, we apply our permission changes to all three
@@ -935,6 +944,7 @@ function drupal_install_mkdir($file, $mask, $message = TRUE) {
* The desired permissions for the file.
* @param $message
* (optional) Whether to output messages. Defaults to TRUE.
*
* @return
* TRUE/FALSE whether or not we were able to fix the file's permissions.
*/
@@ -1000,7 +1010,7 @@ function drupal_install_fix_file($file, $mask, $message = TRUE) {
}
/**
* Send the user to a different installer page.
* Sends the user to a different installer page.
*
* This issues an on-site HTTP redirect. Messages (and errors) are erased.
*
@@ -1078,7 +1088,7 @@ function drupal_requirements_url($severity) {
}
/**
* Functional equivalent of t(), used when some systems are not available.
* Translates a string when some systems are not available.
*
* Used during the install process, when database, theme, and localization
* system is possibly not yet available.
@@ -1138,12 +1148,12 @@ function st($string, array $args = array(), array $options = array()) {
}
/**
* Check an install profile's requirements.
* Checks an installation profile's requirements.
*
* @param $profile
* Name of install profile to check.
* Name of installation profile to check.
* @return
* Array of the install profile's requirements.
* Array of the installation profile's requirements.
*/
function drupal_check_profile($profile) {
include_once DRUPAL_ROOT . '/includes/file.inc';
@@ -1169,11 +1179,12 @@ function drupal_check_profile($profile) {
}
/**
* Extract highest severity from requirements array.
* Extracts the highest severity from the requirements array.
*
* @param $requirements
* An array of requirements, in the same format as is returned by
* hook_requirements().
*
* @return
* The highest severity in the array.
*/
@@ -1188,12 +1199,13 @@ function drupal_requirements_severity(&$requirements) {
}
/**
* Check a module's requirements.
* Checks a module's requirements.
*
* @param $module
* Machine name of module to check.
*
* @return
* TRUE/FALSE depending on the requirements are in place.
* TRUE or FALSE, depending on whether the requirements are met.
*/
function drupal_check_module($module) {
module_load_install($module);
@@ -1218,13 +1230,14 @@ function drupal_check_module($module) {
}
/**
* Retrieve info about an install profile from its .info file.
* Retrieves information about an installation profile from its .info file.
*
* The information stored in a profile .info file is similar to that stored in
* a normal Drupal module .info file. For example:
* - name: The real name of the install profile for display purposes.
* - name: The real name of the installation profile for display purposes.
* - description: A brief description of the profile.
* - dependencies: An array of shortnames of other modules this install profile requires.
* - dependencies: An array of shortnames of other modules that this install
* profile requires.
*
* Additional, less commonly-used information that can appear in a profile.info
* file but not in a normal Drupal module .info file includes: