C:/drupal/includes/install.inc File Reference

Go to the source code of this file.


Enumerations

enum  SCHEMA_UNINSTALLED
enum  SCHEMA_INSTALLED
enum  REQUIREMENT_INFO
enum  REQUIREMENT_OK
enum  REQUIREMENT_WARNING
enum  REQUIREMENT_ERROR
enum  FILE_EXIST
enum  FILE_READABLE
enum  FILE_WRITABLE
enum  FILE_EXECUTABLE
enum  FILE_NOT_EXIST
enum  FILE_NOT_READABLE
enum  FILE_NOT_WRITABLE
enum  FILE_NOT_EXECUTABLE

Functions

 drupal_load_updates ()
 drupal_get_schema_versions ($module)
 drupal_get_installed_schema_version ($module, $reset=FALSE, $array=FALSE)
 drupal_set_installed_schema_version ($module, $version)
 drupal_install_profile_name ()
 drupal_detect_baseurl ($file= 'install.php')
 drupal_detect_database_types ()
 drupal_rewrite_settings ($settings=array(), $prefix= '')
 drupal_get_install_files ($module_list=array())
 drupal_verify_profile ($profile, $locale)
 drupal_install_modules ($module_list=array())
 _drupal_install_module ($module)
 drupal_install_system ()
 drupal_uninstall_module ($module)
 drupal_verify_install_file ($file, $mask=NULL, $type= 'file')
 drupal_install_mkdir ($file, $mask, $message=TRUE)
 drupal_install_fix_file ($file, $mask, $message=TRUE)
 install_goto ($path)
 st ($string, $args=array())
 drupal_check_profile ($profile)
 drupal_requirements_severity (&$requirements)
 drupal_check_module ($module)


Enumeration Type Documentation

File permission check -- File is executable.

Definition at line 52 of file install.inc.

enum FILE_EXIST

File permission check -- File exists.

Definition at line 37 of file install.inc.

File permission check -- File is not executable.

Definition at line 72 of file install.inc.

File permission check -- File does not exist.

Definition at line 57 of file install.inc.

File permission check -- File is not readable.

Definition at line 62 of file install.inc.

File permission check -- File is not writable.

Definition at line 67 of file install.inc.

File permission check -- File is readable.

Definition at line 42 of file install.inc.

File permission check -- File is writable.

Definition at line 47 of file install.inc.

Requirement severity -- Error condition; abort installation.

Definition at line 32 of file install.inc.

Requirement severity -- Informational message only.

Definition at line 17 of file install.inc.

Requirement severity -- Requirement successfully met.

Definition at line 22 of file install.inc.

Requirement severity -- Warning condition; proceed but flag warning.

Definition at line 27 of file install.inc.

Indicates that a module has been installed.

Definition at line 12 of file install.inc.

Indicates that a module has not been installed yet.

Definition at line 7 of file install.inc.


Function Documentation

_drupal_install_module ( module  ) 

Callback to install an individual profile module.

Used during installation to install modules one at a time and then enable them, or to install a number of modules at one time from admin/build/modules.

Definition at line 393 of file install.inc.

References drupal_get_installed_schema_version(), drupal_get_schema_versions(), drupal_set_installed_schema_version(), module_invoke(), and module_load_install().

Referenced by _install_module_batch().

Here is the call graph for this function:

drupal_check_module ( module  ) 

Check a module's requirements.

Definition at line 767 of file install.inc.

References drupal_get_install_files(), drupal_requirements_severity(), drupal_set_message(), module_invoke(), and t().

Referenced by system_modules_submit().

Here is the call graph for this function:

drupal_check_profile ( profile  ) 

Check a profile's requirements.

Parameters:
profile Name of profile to check.

Definition at line 721 of file install.inc.

References $module_list, drupal_get_install_files(), drupal_required_modules(), and install_no_profile_error().

Referenced by install_check_requirements().

Here is the call graph for this function:

drupal_detect_baseurl ( file = 'install.php'  ) 

Auto detect the base_url with PHP predefined variables.

Parameters:
$file The name of the file calling this function so we can strip it out of the URI when generating the base_url.
Returns:
The auto-detected $base_url that should be configured in settings.php

Definition at line 186 of file install.inc.

drupal_detect_database_types (  ) 

Detect all databases supported by Drupal that are compiled into the current PHP installation.

Returns:
An array of database types compiled into PHP.

Definition at line 204 of file install.inc.

References $type.

Referenced by _install_settings_form_validate(), and install_settings_form().

drupal_get_install_files ( module_list = array()  ) 

Get list of all .install files.

Parameters:
$module_list An array of modules to search for their .install files.

Definition at line 304 of file install.inc.

References $module_list, and drupal_system_listing().

Referenced by drupal_check_module(), and drupal_check_profile().

Here is the call graph for this function:

drupal_get_installed_schema_version ( module,
reset = FALSE,
array = FALSE 
)

Returns the currently installed schema version for a module.

Parameters:
$module A module name.
$reset Set to TRUE after modifying the system table.
$array Set to TRUE if you want to get information about all modules in the system.
Returns:
The currently installed schema version.

Definition at line 124 of file install.inc.

References $result, $row, db_fetch_object(), and db_query().

Referenced by _drupal_install_module(), drupal_load_updates(), system_modules_submit(), update_fix_d6_requirements(), and update_script_selection_form().

Here is the call graph for this function:

drupal_get_schema_versions ( module  ) 

Returns an array of available schema versions for a module.

Parameters:
$module A module name.
Returns:
If the module has updates, an array of available updates. Otherwise, FALSE.

Definition at line 94 of file install.inc.

Referenced by _drupal_install_module(), drupal_install_system(), update_batch(), and update_script_selection_form().

drupal_install_fix_file ( file,
mask,
message = TRUE 
)

Attempt 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 digits of the file permission (i.e. user, group and all).

To ensure that the values behave as expected (and numbers don't carry from one digit to the next) we do the calculation on the octal value using bitwise operations. This lets us remove, for example, 0222 from 0700 and get the correct value of 0500.

Parameters:
$file The name of the file with permissions to fix.
$mask The desired permissions for the file.
$message (optional) Whether to output messages. Defaults to TRUE.
Returns:
TRUE/FALSE whether or not we were able to fix the file's permissions.

Definition at line 604 of file install.inc.

Referenced by drupal_verify_install_file().

drupal_install_mkdir ( file,
mask,
message = TRUE 
)

Create a directory with specified permissions.

Parameters:
file The name of the directory to create;
mask The permissions of the directory to create.
$message (optional) Whether to output messages. Defaults to TRUE.
Returns:
TRUE/FALSE whether or not the directory was successfully created.

Definition at line 555 of file install.inc.

Referenced by drupal_verify_install_file().

drupal_install_modules ( module_list = array()  ) 

Calls the install function and updates the system table for a given list of modules.

Parameters:
module_list The modules to install.

Definition at line 363 of file install.inc.

References $module_list, module_enable(), and module_rebuild_cache().

Referenced by install_configure_form_submit(), DrupalWebTestCase::setUp(), and system_modules_submit().

Here is the call graph for this function:

drupal_install_profile_name (  ) 

Loads the profile definition, extracting the profile's defined name.

Returns:
The name defined in the profile's _profile_details() hook.

Definition at line 160 of file install.inc.

References $name.

Referenced by _install_settings_form_validate(), install_check_requirements(), install_settings_form(), and install_tasks().

drupal_install_system (  ) 

Callback to install the system module.

Separated from the installation of other modules so core system functions can be made available while other modules are installed.

Definition at line 409 of file install.inc.

References db_query(), drupal_bootstrap(), drupal_get_filename(), drupal_get_schema_versions(), module_invoke(), and module_rebuild_cache().

Referenced by install_main(), and DrupalWebTestCase::setUp().

Here is the call graph for this function:

drupal_load_updates (  ) 

Initialize the update system by loading all installed module's .install files.

Definition at line 77 of file install.inc.

References drupal_get_installed_schema_version(), and module_load_install().

Referenced by system_status().

Here is the call graph for this function:

drupal_requirements_severity ( &$  requirements  ) 

Extract highest severity from requirements array.

Definition at line 754 of file install.inc.

Referenced by drupal_check_module(), install_check_requirements(), system_status(), and update_check_requirements().

drupal_rewrite_settings ( settings = array(),
prefix = '' 
)

Read settings.php into a buffer line by line, changing values specified in $settings array, then over-writing the old settings.php file.

Parameters:
$settings An array of settings that need to be updated.

Definition at line 227 of file install.inc.

References conf_path(), drupal_set_message(), and st().

Referenced by install_settings_form_submit().

Here is the call graph for this function:

drupal_set_installed_schema_version ( module,
version 
)

Update the installed version information for a module.

Parameters:
$module A module name.
$version The new schema version.

Definition at line 150 of file install.inc.

References db_query().

Referenced by _drupal_install_module(), drupal_uninstall_module(), update_batch(), and update_do_one().

Here is the call graph for this function:

drupal_uninstall_module ( module  ) 

Calls the uninstall function and updates the system table for a given module.

Parameters:
$module The module to uninstall.

Definition at line 428 of file install.inc.

References $result, _menu_delete_item(), db_fetch_array(), db_query(), drupal_load(), drupal_set_installed_schema_version(), module_invoke(), and module_load_install().

Referenced by system_modules_uninstall_submit().

Here is the call graph for this function:

drupal_verify_install_file ( file,
mask = NULL,
type = 'file' 
)

Verify the state of the specified file.

Parameters:
$file The file to check for.
$mask An optional bitmask created from various FILE_* constants.
$type The type of file. Can be file (default), dir, or link.
Returns:
TRUE on success or FALSE on failure. A message is set for the latter.

Definition at line 475 of file install.inc.

References $return, $type, drupal_install_fix_file(), and drupal_install_mkdir().

Referenced by install_check_requirements(), and install_tasks().

Here is the call graph for this function:

drupal_verify_profile ( profile,
locale 
)

Verify a profile for installation.

Parameters:
profile Name of profile to verify.
locale Name of locale used (if any).
Returns:
The list of modules to install.

Definition at line 322 of file install.inc.

References $module_list, drupal_required_modules(), drupal_set_message(), drupal_system_listing(), install_no_profile_error(), and st().

Referenced by install_main(), and DrupalWebTestCase::setUp().

Here is the call graph for this function:

install_goto ( path  ) 

Send the user to a different installer page. This issues an on-site HTTP redirect. Messages (and errors) are erased.

Parameters:
$path An installer path.

Definition at line 668 of file install.inc.

References $base_url, and exit.

Referenced by db_set_active(), install_main(), and install_settings_form_submit().

st ( string,
args = array() 
)


Generated on Mon Jun 2 15:08:05 2008 for SimpleTest by  1.5.5