Author: sevein
Date: Thu Sep 17 12:29:03 2009
New Revision: 3375

Log:
Check for at least one digital object to import. Stop function when warning was 
set.

Modified:
   
trunk/apps/qubit/modules/digitalobject/actions/multiFileUploadAction.class.php

Modified: 
trunk/apps/qubit/modules/digitalobject/actions/multiFileUploadAction.class.php
==============================================================================
--- 
trunk/apps/qubit/modules/digitalobject/actions/multiFileUploadAction.class.php  
    Thu Sep 17 11:53:52 2009        (r3374)
+++ 
trunk/apps/qubit/modules/digitalobject/actions/multiFileUploadAction.class.php  
    Thu Sep 17 12:29:03 2009        (r3375)
@@ -88,6 +88,15 @@
     {
       $this->hasWarning = true;
       $this->warning = 'You must specify a valid parent object';
+      return;
+    }
+
+    // Check if there is at least one file
+    if (0 == count($request->getParameter('files')))
+    {
+      $this->hasWarning = true;
+      $this->warning = 'You must import at least one digital object';
+      return;
     }
 
     // Upload files

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to