C:/drupal/update.php File Reference

Go to the source code of this file.


Enumerations

enum  MAINTENANCE_MODE

Functions

 db_add_column (&$ret, $table, $column, $type, $attributes=array())
 db_change_column (&$ret, $table, $column, $column_new, $type, $attributes=array())
 update_do_one ($module, $number, &$context)
 update_selection_page ()
 update_script_selection_form ()
 update_batch ()
 update_finished ($success, $results, $operations)
 update_results_page ()
 update_info_page ()
 update_access_denied_page ()
 update_create_batch_table ()
 update_fix_compatibility ()
 update_check_incompatibility ($name, $type= 'module')
 update_fix_d6_requirements ()
 update_task_list ($active=NULL)
 update_check_requirements ()

Variables

 $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : ''
 $module_list ['system']['filename'] = 'modules/system/system.module'
 $module_list ['filter']['filename'] = 'modules/filter/filter.module'
 $messages = drupal_set_message()
 exit
 break
case __pad0__
case __pad1__
case __pad2__
default __pad3__
 $output = _batch_page()


Detailed Description

Administrative page for handling updates from one Drupal version to another.

Point your browser to "http://www.example.com/update.php" and follow the instructions.

If you are not logged in as administrator, you will need to modify the access check statement inside your settings.php file. After finishing the upgrade, be sure to open settings.php again, and change it back to its original state!

Definition in file update.php.


Enumeration Type Documentation

Global flag to identify update.php run, and so avoid various unwanted operations, such as hook_init() and hook_exit() invokes, css/js preprocessing and translation, and solve some theming issues. This flag is checked on several places in Drupal code (not just update.php).

Definition at line 22 of file update.php.


Function Documentation

db_add_column ( &$  ret,
table,
column,
type,
attributes = array() 
)

Add a column to a database using syntax appropriate for PostgreSQL. Save result of SQL commands in $ret array.

Note: when you add a column with NOT NULL and you are not sure if there are already rows in the table, you MUST also add DEFAULT. Otherwise PostgreSQL won't work when the table is not empty, and db_add_column() will fail. To have an empty string as the default, you must use: 'default' => "''" in the $attributes array. If NOT NULL and DEFAULT are set the PostgreSQL version will set values of the added column in old rows to the DEFAULT value.

Parameters:
$ret Array to which results will be added.
$table Name of the table, without {}
$column Name of the column
$type Type of column
$attributes Additional optional attributes. Recognized attributes: not null => TRUE|FALSE default => NULL|FALSE|value (the value must be enclosed in '' marks)
Returns:
nothing, but modifies $ret parameter.

Definition at line 51 of file update.php.

References $attributes, and update_sql().

Here is the call graph for this function:

db_change_column ( &$  ret,
table,
column,
column_new,
type,
attributes = array() 
)

Change a column definition using syntax appropriate for PostgreSQL. Save result of SQL commands in $ret array.

Remember that changing a column definition involves adding a new column and dropping an old one. This means that any indices, primary keys and sequences from serial-type columns are dropped and might need to be recreated.

Parameters:
$ret Array to which results will be added.
$table Name of the table, without {}
$column Name of the column to change
$column_new New name for the column (set to the same as $column if you don't want to change the name)
$type Type of column
$attributes Additional optional attributes. Recognized attributes: not null => TRUE|FALSE default => NULL|FALSE|value (with or without '', it won't be added)
Returns:
nothing, but modifies $ret parameter.

Definition at line 107 of file update.php.

References $attributes, and update_sql().

Here is the call graph for this function:

update_access_denied_page (  ) 

Definition at line 389 of file update.php.

References drupal_set_title().

Here is the call graph for this function:

update_batch (  ) 

Definition at line 263 of file update.php.

References $base_url, batch_process(), batch_set(), drupal_get_schema_versions(), and drupal_set_installed_schema_version().

Here is the call graph for this function:

update_check_incompatibility ( name,
type = 'module' 
)

Helper function to test compatibility of a module or theme.

Definition at line 450 of file update.php.

References $name, $type, and module_rebuild_cache().

Referenced by update_fix_compatibility(), and update_script_selection_form().

Here is the call graph for this function:

update_check_requirements (  ) 

Check update requirements and report any errors.

Definition at line 547 of file update.php.

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

Here is the call graph for this function:

update_create_batch_table (  ) 

Create the batch table.

This is part of the Drupal 5.x to 6.x migration.

Definition at line 405 of file update.php.

References db_create_table(), and db_table_exists().

Here is the call graph for this function:

update_do_one ( module,
number,
&$  context 
)

Perform one update and store the results which will later be displayed on the finished page.

An update function can force the current and all later updates for this module to abort by returning a $ret array with an element like: $ret['abort'] = array('success' => FALSE, 'query' => 'What went wrong'); The schema version will not be updated in this case, and all the aborted updates will continue to appear on update.php as updates that have not yet been run.

Parameters:
$module The module whose update will be run.
$number The update number to run.
$context The batch context array

Definition at line 155 of file update.php.

References check_plain(), and drupal_set_installed_schema_version().

Here is the call graph for this function:

update_finished ( success,
results,
operations 
)

Definition at line 291 of file update.php.

References $results, and drupal_flush_all_caches().

Here is the call graph for this function:

update_fix_compatibility (  ) 

Disable anything in the {system} table that is not compatible with the current version of Drupal core.

Definition at line 432 of file update.php.

References $result, db_fetch_object(), db_query(), name, update_check_incompatibility(), and update_sql().

Here is the call graph for this function:

update_fix_d6_requirements (  ) 

Perform Drupal 5.x to 6.x updates that are required for update.php to function properly.

This function runs when update.php is run the first time for 6.x, even before updates are selected or performed. It is important that if updates are not ultimately performed that no changes are made which make it impossible to continue using the prior version. Just adding columns is safe. However, renaming the system.description column to owner is not. Therefore, we add the system.owner column and leave it to system_update_6008() to copy the data from description and remove description. The same for renaming locales_target.locale to locales_target.language, which will be finished by locale_update_6002().

Definition at line 489 of file update.php.

References db_add_field(), db_create_table(), db_table_exists(), drupal_get_installed_schema_version(), variable_get(), and variable_set().

Here is the call graph for this function:

update_info_page (  ) 

Definition at line 366 of file update.php.

References $output, _drupal_flush_css_js(), base_path(), cache_clear_all(), db_table_exists(), drupal_set_title(), and update_task_list().

Here is the call graph for this function:

update_results_page (  ) 

Definition at line 300 of file update.php.

References $links, $output, base_path(), drupal_set_title(), module_exists(), theme(), and update_task_list().

Here is the call graph for this function:

update_script_selection_form (  ) 

Definition at line 203 of file update.php.

References drupal_get_installed_schema_version(), drupal_get_schema_versions(), drupal_map_assoc(), module_invoke(), and update_check_incompatibility().

Here is the call graph for this function:

update_selection_page (  ) 

Definition at line 191 of file update.php.

References $output, drupal_get_form(), drupal_set_title(), and update_task_list().

Here is the call graph for this function:

update_task_list ( active = NULL  ) 

Add the update task list to the current page.

Definition at line 532 of file update.php.

References drupal_set_content(), and theme().

Referenced by update_info_page(), update_results_page(), and update_selection_page().

Here is the call graph for this function:


Variable Documentation

$messages = drupal_set_message()

$module_list['filter']['filename'] = 'modules/filter/filter.module'

Definition at line 586 of file update.php.

$module_list['system']['filename'] = 'modules/system/system.module'

$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : ''

$output = _batch_page()

Definition at line 654 of file update.php.

Referenced by _aggregator_page_list(), _batch_page(), _batch_progress_page_js(), _batch_progress_page_nojs(), _locale_export_po(), _locale_export_po_generate(), _locale_translate_language_list(), _locale_translate_seek(), _password_base64_encode(), _password_crypt(), _password_generate_salt(), _theme_table_cell(), aggregator_page_categories(), aggregator_page_sources(), aggregator_view(), blog_page_last(), blog_page_user(), book_form_update(), comment_delete(), comment_reply(), contact_site_page(), contact_user_page(), dblog_event(), dblog_overview(), dblog_top(), drupal_eval(), drupal_get_css(), drupal_get_html_head(), drupal_get_js(), drupal_html_to_text(), drupal_random_bytes(), drupal_render_form(), filter_tips_long(), format_interval(), format_rss_channel(), format_rss_item(), format_xml_elements(), help_links_as_list(), help_main(), help_page(), image_get_available_toolkits(), install_change_settings(), install_select_locale(), install_tasks(), locale_languages_add_screen(), locale_translate_export_screen(), locale_translate_seek_screen(), menu_get_active_help(), menu_tree_output(), mime_header_encode(), node_add(), node_preview(), openid_redirect(), openid_user_identities(), path_admin_delete_confirm(), path_admin_edit(), path_admin_overview(), poll_page(), poll_votes(), profile_browse(), search_view(), statistics_node_tracker(), statistics_recent_hits(), statistics_top_pages(), statistics_top_referrers(), statistics_top_visitors(), statistics_user_tracker(), system_admin_menu_block_page(), system_batch_page(), system_ip_blocking(), system_logging_overview(), system_settings_overview(), system_sql(), taxonomy_term_page(), theme(), theme_admin_block(), theme_admin_block_content(), theme_admin_page(), theme_aggregator_categorize_items(), theme_aggregator_page_opml(), theme_aggregator_page_rss(), theme_blocks(), theme_box(), theme_comment_admin_overview(), theme_filter_admin_order(), theme_filter_admin_overview(), theme_filter_tips(), theme_form_element(), theme_indentation(), theme_item_list(), theme_links(), theme_locale_languages_overview_form(), theme_menu_local_tasks(), theme_menu_overview_form(), theme_node_add_list(), theme_node_admin_nodes(), theme_node_filter_form(), theme_node_filters(), theme_node_form(), theme_node_preview(), theme_pager_first(), theme_pager_last(), theme_pager_next(), theme_pager_previous(), theme_password(), theme_profile_admin_overview(), theme_progress_bar(), theme_radio(), theme_status_messages(), theme_status_report(), theme_system_admin_by_module(), theme_system_modules(), theme_system_modules_uninstall(), theme_system_theme_select_form(), theme_system_themes_form(), theme_table(), theme_task_list(), theme_taxonomy_overview_terms(), theme_taxonomy_term_page(), theme_textfield(), theme_trigger_display(), theme_update_report(), theme_update_version(), theme_user_admin_account(), theme_user_admin_new_role(), theme_user_admin_perm(), theme_user_filter_form(), theme_user_filters(), theme_username(), tracker_page(), trigger_assign(), update_info_page(), update_results_page(), update_selection_page(), and user_admin().

case __pad0__

Definition at line 640 of file update.php.

case __pad1__

Definition at line 644 of file update.php.

case __pad2__

Definition at line 648 of file update.php.

default __pad3__

Definition at line 653 of file update.php.

Definition at line 637 of file update.php.


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