summaryrefslogtreecommitdiff
path: root/modules/update/update.fetch.inc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/update/update.fetch.inc')
-rw-r--r--modules/update/update.fetch.inc54
1 files changed, 33 insertions, 21 deletions
diff --git a/modules/update/update.fetch.inc b/modules/update/update.fetch.inc
index ee5d77b16..e1790c3f2 100644
--- a/modules/update/update.fetch.inc
+++ b/modules/update/update.fetch.inc
@@ -6,7 +6,11 @@
*/
/**
- * Callback to manually check the update status without cron.
+ * Page callback: Checks for updates and displays the update status report.
+ *
+ * Manually checks the update status without the use of cron.
+ *
+ * @see update_menu()
*/
function update_manual_status() {
_update_refresh();
@@ -25,7 +29,10 @@ function update_manual_status() {
}
/**
- * Process a step in the batch for fetching available update data.
+ * Batch callback: Processes a step in batch for fetching available update data.
+ *
+ * @param $context
+ * Reference to an array used for Batch API storage.
*/
function update_fetch_data_batch(&$context) {
$queue = DrupalQueue::get('update_fetch_tasks');
@@ -70,12 +77,12 @@ function update_fetch_data_batch(&$context) {
}
/**
- * Batch API callback when all fetch tasks have been completed.
+ * Batch callback: Performs actions when all fetch tasks have been completed.
*
* @param $success
- * Boolean indicating the success of the batch.
+ * TRUE if the batch operation was successful; FALSE if there were errors.
* @param $results
- * Associative array holding the results of the batch, including the key
+ * An associative array of results from the batch operation, including the key
* 'updated' which holds the total number of projects we fetched available
* update data for.
*/
@@ -96,7 +103,7 @@ function update_fetch_data_finished($success, $results) {
}
/**
- * Attempt to drain the queue of tasks for release history data to fetch.
+ * Attempts to drain the queue of tasks for release history data to fetch.
*/
function _update_fetch_data() {
$queue = DrupalQueue::get('update_fetch_tasks');
@@ -108,13 +115,14 @@ function _update_fetch_data() {
}
/**
- * Process a task to fetch available update data for a single project.
+ * Processes a task to fetch available update data for a single project.
*
- * Once the release history XML data is downloaded, it is parsed and saved
- * into the {cache_update} table in an entry just for that project.
+ * Once the release history XML data is downloaded, it is parsed and saved into
+ * the {cache_update} table in an entry just for that project.
*
* @param $project
* Associative array of information about the project to fetch data for.
+ *
* @return
* TRUE if we fetched parsable XML, otherwise FALSE.
*/
@@ -184,7 +192,7 @@ function _update_process_fetch_task($project) {
}
/**
- * Clear out all the cached available update data and initiate re-fetching.
+ * Clears out all the cached available update data and initiates re-fetching.
*/
function _update_refresh() {
module_load_include('inc', 'update', 'update.compare');
@@ -211,7 +219,7 @@ function _update_refresh() {
}
/**
- * Add a task to the queue for fetching release history data for a project.
+ * Adds a task to the queue for fetching release history data for a project.
*
* We only create a new fetch task if there's no task already in the queue for
* this particular project (based on 'fetch_task::' entries in the
@@ -219,8 +227,8 @@ function _update_refresh() {
*
* @param $project
* Associative array of information about a project as created by
- * update_get_projects(), including keys such as 'name' (short name),
- * and the 'info' array with data from a .info file for the project.
+ * update_get_projects(), including keys such as 'name' (short name), and the
+ * 'info' array with data from a .info file for the project.
*
* @see update_get_projects()
* @see update_get_available()
@@ -260,14 +268,17 @@ function _update_create_fetch_task($project) {
/**
* Generates the URL to fetch information about project updates.
*
- * This figures out the right URL to use, based on the project's .info file
- * and the global defaults. Appends optional query arguments when the site is
+ * This figures out the right URL to use, based on the project's .info file and
+ * the global defaults. Appends optional query arguments when the site is
* configured to report usage stats.
*
* @param $project
* The array of project information from update_get_projects().
* @param $site_key
- * The anonymous site key hash (optional).
+ * (optional) The anonymous site key hash. Defaults to an empty string.
+ *
+ * @return
+ * The URL for fetching information about updates to the specified project.
*
* @see update_fetch_data()
* @see _update_process_fetch_task()
@@ -293,10 +304,11 @@ function _update_build_fetch_url($project, $site_key = '') {
}
/**
- * Return the base of the URL to fetch available update data for a project.
+ * Returns the base of the URL to fetch available update data for a project.
*
* @param $project
* The array of project information from update_get_projects().
+ *
* @return
* The base of the URL used for fetching available update data. This does
* not include the path elements to specify a particular project, version,
@@ -309,10 +321,10 @@ function _update_get_fetch_url_base($project) {
}
/**
- * Perform any notifications that should be done once cron fetches new data.
+ * Performs any notifications that should be done once cron fetches new data.
*
- * This method checks the status of the site using the new data and depending
- * on the configuration of the site, notifies administrators via email if there
+ * This method checks the status of the site using the new data and, depending
+ * on the configuration of the site, notifies administrators via e-mail if there
* are new releases or missing security updates.
*
* @see update_requirements()
@@ -347,7 +359,7 @@ function _update_cron_notify() {
}
/**
- * Parse the XML of the Drupal release history info files.
+ * Parses the XML of the Drupal release history info files.
*
* @param $raw_xml
* A raw XML string of available release data for a given project.