summaryrefslogtreecommitdiff
path: root/modules/file/file.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/file/file.module')
-rw-r--r--modules/file/file.module22
1 files changed, 14 insertions, 8 deletions
diff --git a/modules/file/file.module b/modules/file/file.module
index f979a69fb..a9d35d518 100644
--- a/modules/file/file.module
+++ b/modules/file/file.module
@@ -56,7 +56,7 @@ function file_menu() {
/**
* Implements hook_element_info().
*
- * The managed file element may be used independently anywhere in Drupal.
+ * The managed file element may be used anywhere in Drupal.
*/
function file_element_info() {
$file_path = drupal_get_path('module', 'file');
@@ -317,7 +317,7 @@ function file_ajax_progress($key) {
}
/**
- * Determine the preferred upload progress implementation.
+ * Determines the preferred upload progress implementation.
*
* @return
* A string indicating which upload progress system is available. Either "apc"
@@ -570,7 +570,9 @@ function file_managed_file_validate(&$element, &$form_state) {
}
/**
- * Submit handler for upload and remove buttons of managed_file elements.
+ * Form submission handler for upload / remove buttons of managed_file elements.
+ *
+ * @see file_managed_file_process()
*/
function file_managed_file_submit($form, &$form_state) {
// Determine whether it was the upload or the remove button that was clicked,
@@ -611,10 +613,11 @@ function file_managed_file_submit($form, &$form_state) {
}
/**
- * Given a managed_file element, save any files that have been uploaded into it.
+ * Saves any files that have been uploaded into a managed_file element.
*
* @param $element
* The FAPI element whose values are being saved.
+ *
* @return
* The file object representing the file that was saved, or FALSE if no file
* was saved.
@@ -761,13 +764,14 @@ function theme_file_icon($variables) {
}
/**
- * Given a file object, create a URL to a matching icon.
+ * Creates a URL to the icon for a file object.
*
* @param $file
* A file object.
* @param $icon_directory
* (optional) A path to a directory of icons to be used for files. Defaults to
* the value of the "file_icon_directory" variable.
+ *
* @return
* A URL string to the icon, or FALSE if an appropriate icon cannot be found.
*/
@@ -779,13 +783,14 @@ function file_icon_url($file, $icon_directory = NULL) {
}
/**
- * Given a file object, create a path to a matching icon.
+ * Creates a path to the icon for a file object.
*
* @param $file
* A file object.
* @param $icon_directory
* (optional) A path to a directory of icons to be used for files. Defaults to
* the value of the "file_icon_directory" variable.
+ *
* @return
* A string to the icon as a local path, or FALSE if an appropriate icon could
* not be found.
@@ -831,10 +836,11 @@ function file_icon_path($file, $icon_directory = NULL) {
}
/**
- * Determine the generic icon MIME package based on a file's MIME type.
+ * Determines the generic icon MIME package based on a file's MIME type.
*
* @param $file
* A file object.
+ *
* @return
* The generic icon MIME package expected for this file.
*/
@@ -962,7 +968,7 @@ function file_icon_map($file) {
*/
/**
- * Gets a list of references to a file.
+ * Retrieves a list of references to a file.
*
* @param $file
* A file object.