/[drupal]/contributions/modules/audio/contrib/import/audio_import.pages.inc
ViewVC logotype

Diff of /contributions/modules/audio/contrib/import/audio_import.pages.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3, Sun Dec 21 22:23:41 2008 UTC revision 1.4, Sun May 10 19:15:23 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2    
3  // $Id: audio_import.pages.inc,v 1.2 2008/09/30 04:43:07 drewish Exp $  // $Id: audio_import.pages.inc,v 1.3 2008/12/21 22:23:41 drewish Exp $
4    
5    
6  function audio_import_validate_file($filepath) {  function audio_import_validate_file($file) {
7    $errors = array();    $errors = array();
8    // TODO add in some validation to ensure that we only import audio files...    // TODO add in some validation to ensure that we only import audio files...
9    return $errors;    return $errors;
# Line 86  function audio_import_form() { Line 86  function audio_import_form() {
86        );        );
87    
88        // If there were problems don't let them import it        // If there were problems don't let them import it
89        $problems = audio_import_validate_file($file->filename);        $problems = audio_import_validate_file($file);
90        if (count($problems)) {        if (count($problems)) {
91          $form['files']['import'][$index]['#type'] = 'item';          $form['files']['import'][$index]['#type'] = 'item';
92          $form['files']['errors'][$index] = array(          $form['files']['errors'][$index] = array(
# Line 94  function audio_import_form() { Line 94  function audio_import_form() {
94            '#value' => '<em>'. implode(' ', $problems) .'</em>',            '#value' => '<em>'. implode(' ', $problems) .'</em>',
95          );          );
96          unset($form['files']['title'][$index]);          unset($form['files']['title'][$index]);
97          unset($form['files']['caption'][$index]);          unset($form['files']['body'][$index]);
98        }        }
99      }      }
100    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.2