You are here

function smiley_import_form_submit in Smiley 7

Smileys import form submit.

File

./smiley.admin.inc, line 260
Smileys administrative pages.

Code

function smiley_import_form_submit($form, &$form_state) {
  $num_added = smiley_import($form_state['values']['status']);
  if ($num_added) {
    drupal_set_message(format_plural($num_added, '1 smiley has been added', '@count smiley has been added'));
  }
  else {
    drupal_set_message(t('There is no new smiles in directory <em>@folder</em>', array(
      '@folder' => variable_get('smiley_path', drupal_get_path('module', 'smiley') . '/packs'),
    )), 'warning');
  }
}