From 7592053b042630a199be63ed23d7a4bf4c16a7e0 Mon Sep 17 00:00:00 2001 From: Silvio Date: Wed, 13 Oct 2010 11:05:39 -0300 Subject: Coding style --- mass_image_import.module | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/mass_image_import.module b/mass_image_import.module index 858fe0b..dfc2f48 100644 --- a/mass_image_import.module +++ b/mass_image_import.module @@ -83,7 +83,7 @@ function mass_image_import_types() { */ function mass_image_import_form_submit($form, &$form_state) { // Save form input. - $type = $form_state['values']['node_type']; + $type = $form_state['values']['node_type']; variable_set('mass_image_import_node_type', $type); // Setup batch configuration @@ -148,16 +148,16 @@ function mass_image_import_get_files() { return; } - // Get file names + // Get file names. $files = file_scan_directory($dirpath, '.*'); if (!$files) { return; } - // Sort + // Sort. ksort($files); - // Convert to indexed array + // Convert to indexed array. foreach ($files as $file) { $images[] = $file; } @@ -175,10 +175,12 @@ function mass_image_import_file($file, $type = 'image') { $dirpath = variable_get('image_import_path', ''); $origname = $file->basename; - // Assembly import data + // Assembly import data. $file_metadata_modules = module_implements('file_metadata'); + // Validate. $problems = image_import_validate_file($file); + // Allow other modules to supply metadata about the images being imported. // hook_file_metadata() may populate the $file properties 'title' and // 'description'. @@ -187,14 +189,14 @@ function mass_image_import_file($file, $type = 'image') { $function($file); } - // Build form + // Build form. if ($filepath = file_check_location($dirpath .'/'. $origname, $dirpath)) { $args = array( - 'node_type' => 'image', - 'title' => isset($file->title) ? $file->title : basename($file->name), - 'body' => isset($file->body) ? $file->body : basename($file->name), - 'filepath' => $filepath, - 'origname' => $origname, + 'node_type' => 'image', + 'title' => isset($file->title) ? $file->title : basename($file->name), + 'body' => isset($file->body) ? $file->body : basename($file->name), + 'filepath' => $filepath, + 'origname' => $origname, ); } -- cgit v1.2.3