Projet

Général

Profil

Révision feca1e4a

Ajouté par Assos Assos il y a presque 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/webform/webform.drush.inc
20 20
        'format' => 'The exporter format to use. Out-of-the-box this may be "delimited" or "excel".',
21 21
        'delimiter' => 'Delimiter between columns (defaults to site-wide setting). This option may need to be wrapped in quotes. i.e. --delimter="\t".',
22 22
        'components' => 'Comma-separated list of component IDs or form keys to include.' . "\n" .
23
                        'May also include "webform_serial", "webform_sid", "webform_time", "webform_complete_time", "webform_modified_time", "webform_draft", "webform_ip_address", "webform_uid", and "webform_username".',
23
        'May also include "webform_serial", "webform_sid", "webform_time", "webform_complete_time", "webform_modified_time", "webform_draft", "webform_ip_address", "webform_uid", and "webform_username".',
24 24
        'header-keys' => 'Integer -1 for none, 0 for label (default) or 1 for form key.',
25 25
        'select-keys' => 'Integer 0 or 1 value. Set to 1 to print select list values by their form keys instead of labels.',
26 26
        'select-format' => 'Set to "separate" (default) or "compact" to determine how select list values are exported.',
......
69 69
  module_load_include('inc', 'webform', 'includes/webform.components');
70 70
  module_load_include('inc', 'webform', 'includes/webform.report');
71 71

  
72

  
73 72
  // Pull in options from drush to override the defaults.
74 73
  $format = drush_get_option('format', 'delimited');
75 74
  $options = webform_results_download_default_options($node, $format);
......
88 87
      $component = $form_keys[$component];
89 88
    }
90 89
  }
91
  unset($component); // Drop PHP reference.
90
  // Drop PHP reference.
91
  unset($component);
92 92

  
93 93
  // Get the range options.
94 94
  unset($options['range']['range_type']);
......
126 126
        $options['range']['latest'] = 100;
127 127
      }
128 128
      break;
129

  
129 130
    case 'range':
130 131
    case 'range_serial':
131 132
      if (empty($options['range']['start'])) {
132 133
        $options['range']['start'] = 1;
133 134
      }
134 135
      break;
136

  
135 137
    case 'range_date':
136 138
      if (empty($options['range']['start_date'])) {
137 139
        $options['range']['start_date'] = "1/1/1970";
......
139 141
      break;
140 142
  }
141 143

  
142
  // Get the preferred completion type
144
  // Get the preferred completion type.
143 145
  $options['range']['completion_type'] = drush_get_option('completion-type', NULL);
144 146
  if (isset($options['range']['completion_type']) && !in_array($options['range']['completion_type'], array('finished', 'draft', 'all'))) {
145 147
    return drush_set_error('Unsupported completion-type. The available options are "finished", "draft", or "all".');
......
155 157

  
156 158
  // If no filename was specified, print the file and delete it.
157 159
  if (drush_get_option('file', FALSE) === FALSE) {
158
    drush_print(file_get_contents($options['file_name']));  // The @ makes it silent.
159
    @unlink($options['file_name']);  // Clean up, the @ makes it silent.
160
    // The @ makes it silent.
161
    drush_print(file_get_contents($options['file_name']));
162
    // Clean up, the @ makes it silent.
163
    @unlink($options['file_name']);
160 164
  }
161 165
}
162 166

  
......
179 183
    return drush_set_error('webform-clear cancelled.');
180 184
  }
181 185

  
182
  //module_load_include('inc', 'webform', 'includes/webform.submissions');
183
  //module_load_include('inc', 'webform', 'includes/webform.components');
186
  // @code
187
  // module_load_include('inc', 'webform', 'includes/webform.submissions');
188
  // module_load_include('inc', 'webform', 'includes/webform.components');
189
  // @endcode
184 190
  module_load_include('inc', 'webform', 'includes/webform.report');
185 191

  
186

  
187 192
  // Pull in option from drush to override the default.
188 193
  $batch_size = drush_get_option('batch-size', 10000);
189 194
  $count = 0;

Formats disponibles : Unified diff