diff -u authorize.php authorize.php --- authorize.php 27 Oct 2009 10:02:26 -0000 +++ authorize.php 27 Oct 2009 19:19:33 -0000 @@ -3,10 +3,12 @@ /** * @file - * Administrative script where the site owner (the user actually owning the - * files on the webserver) can authorize certain file-related operations to - * proceed with elevated privileges, for example to deploy and upgrade modules - * or themes. Users should not visit this page directly, but instead use an + * Administrative script for running authorized file operations. + * + * Using this script, the site owner (the user actually owning the files on + * the webserver) can authorize certain file-related operations to proceed + * with elevated privileges, for example to deploy and upgrade modules or + * themes. Users should not visit this page directly, but instead use an * administrative user interface which knows how to redirect the user to this * script as part of a multistep process. This script actually performs the * selected operations without loading all of Drupal, to be able to more @@ -14,7 +16,9 @@ * global killswitch in settings.php ('allow_authorize_operations') and via * the 'administer software updates' permission. * - * @see system_authorized_run() + * There are helper functions for setting up an operation to run via this + * system in modules/system/system.module. For more information, see: + * @link authorize Authorized operation helper functions @endlink */ /** diff -u modules/system/system.module modules/system/system.module --- modules/system/system.module 27 Oct 2009 10:01:25 -0000 +++ modules/system/system.module 27 Oct 2009 18:58:36 -0000 @@ -1450,7 +1450,7 @@ } /** - * @defgroup authorized-operations Authorized operations + * @defgroup authorize Authorized operations * @{ * Because of the Update manager functionality included in Drupal core, there * is a mechanism for running operations with elevated file system privileges, @@ -1469,7 +1469,7 @@ * To run the operation, certain data must be saved into the SESSION, and then * the flow of control should be redirected to the authorize.php script. There * are two ways to do this, either to call system_authorized_run() directly, - * or to call system_authorized_setup() and then redirect to authorize.php, + * or to call system_authorized_init() and then redirect to authorize.php, * using the URL from system_authorized_get_url(). Redirecting yourself is * necessary when your authorized operation is being triggered by a form * submit handler, since calling drupal_goto() in a submit handler is a bad @@ -1510,9 +1510,9 @@ * @param $page_title * Optional string to use as the page title once redirected to authorize.php. * @return - * The path to authorize.php that the caller should redirect to. + * Nothing, this function just initializes variables in your session. */ -function system_authorized_setup($callback, $file, $arguments = array(), $page_title = NULL) { +function system_authorized_init($callback, $file, $arguments = array(), $page_title = NULL) { // First, figure out what file transfer backends the site supports, and put // all of those in the SESSION so that authorize.php has access to all of // them via the class autoloader, even without a full bootstrap. @@ -1541,15 +1541,15 @@ /** * Setup and invoke an operation using authorize.php. * - * @see system_authorized_setup + * @see system_authorized_init */ function system_authorized_run($callback, $file, $arguments = array(), $page_title = NULL) { - system_authorized_setup($callback, $file, $arguments, $page_title); + system_authorized_init($callback, $file, $arguments, $page_title); drupal_goto(system_authorized_get_url()); } /** - * @} End of "defgroup authorized-operations". + * @} End of "defgroup authorize". */ /** diff -u modules/update/update.manager.inc modules/update/update.manager.inc --- modules/update/update.manager.inc 27 Oct 2009 10:01:25 -0000 +++ modules/update/update.manager.inc 27 Oct 2009 18:50:44 -0000 @@ -396,10 +396,10 @@ * update, do so now. Otherwise, pull information about all the required * updates out of the SESSION, figure out what Updater class is needed for * each one, generate an array of update operations to perform, and hand it - * all off to system_authorized_setup(), then redirect to authorize.php. + * all off to system_authorized_init(), then redirect to authorize.php. * * @see update_authorize_run_update() - * @see system_authorized_setup() + * @see system_authorized_init() * @see system_authorized_get_url() */ function update_manager_confirm_update_form_submit($form, &$form_state) { @@ -442,7 +442,7 @@ // credentials and invoke update_authorize_run_update() indirectly with // whatever FileTransfer object authorize.php creates for us. else { - system_authorized_setup('update_authorize_run_update', drupal_get_path('module', 'update') . '/update.authorize.inc', array($updates)); + system_authorized_init('update_authorize_run_update', drupal_get_path('module', 'update') . '/update.authorize.inc', array($updates)); $form_state['redirect'] = system_authorized_get_url(); } } @@ -541,7 +541,7 @@ * location into the live site. * * @see update_authorize_run_install() - * @see system_authorized_setup() + * @see system_authorized_init() * @see system_authorized_get_url() */ function update_manager_install_form_submit($form, &$form_state) { @@ -623,7 +623,7 @@ // credentials and invoke update_authorize_run_install() indirectly with // whatever FileTransfer object authorize.php creates for us. else { - system_authorized_setup('update_authorize_run_install', drupal_get_path('module', 'update') . '/update.authorize.inc', $arguments); + system_authorized_init('update_authorize_run_install', drupal_get_path('module', 'update') . '/update.authorize.inc', $arguments); $form_state['redirect'] = system_authorized_get_url(); } }