diff scald_dailymotion.module @ 7:f3040f91b65d

Add a manual search / import form
author Franck Deroche <franck@defr.org>
date Tue, 20 Jul 2010 11:57:23 +0200
parents f0e59759c605
children da69ba21d0c3
line wrap: on
line diff
--- a/scald_dailymotion.module	Tue Jul 20 11:56:42 2010 +0200
+++ b/scald_dailymotion.module	Tue Jul 20 11:57:23 2010 +0200
@@ -51,6 +51,10 @@
     'scald_dailymotion_imports_table' => array(
       'arguments' => array('form' => NULL),
       'file' => 'scald_dailymotion.admin.inc'
+    ),
+    'scald_dailymotion_search_results_table' => array(
+      'arguments' => array('form' => NULL),
+      'file' => 'scald_dailymotion.pages.inc'
     )
   );
 }
@@ -59,7 +63,7 @@
  * Implements hook_perm.
  */
 function scald_dailymotion_perm() {
-  return array('administer dailymotion imports');
+  return array('administer dailymotion imports', 'import dailymotion videos');
 }
 
 /**
@@ -88,6 +92,14 @@
     'description' => 'Configure the videos that should be automatically imported from DailyMotion',
     'file' => 'scald_dailymotion.admin.inc'
   );
+  $items['dailymotion/search'] = array(
+    'title' => 'DailyMotion Video search',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('scald_dailymotion_search_form', 2),
+    'access arguments' => array('import dailymotion videos'),
+    'description' => 'Search for new videos to import into this site',
+    'file' => 'scald_dailymotion.pages.inc'
+  );
   return $items;
 }