From ecb0f39eb8463b832602e52cbb38ab845659b1d8 Mon Sep 17 00:00:00 2001
From: Alex Barth <alex_b@53995.no-reply.drupal.org>
Date: Thu, 28 Oct 2010 02:34:02 +0000
Subject: [PATCH] Clean up period selector.

---
 includes/FeedsImporter.inc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/includes/FeedsImporter.inc b/includes/FeedsImporter.inc
index b5c487d8..28b34ba0 100644
--- a/includes/FeedsImporter.inc
+++ b/includes/FeedsImporter.inc
@@ -274,12 +274,14 @@ class FeedsImporter extends FeedsConfigurable {
       '#default_value' => $config['content_type'],
     );
     $cron_required =  ' ' . l(t('Requires cron to be configured.'), 'http://drupal.org/cron', array('attributes' => array('target' => '_new')));
-    $period = drupal_map_assoc(array(0, 900, 1800, 3600, 10800, 21600, 43200, 86400, 259200, 604800, 2419200), 'format_interval');
+    $period = drupal_map_assoc(array(900, 1800, 3600, 10800, 21600, 43200, 86400, 259200, 604800, 2419200), 'format_interval');
     foreach ($period as &$p) {
       $p = t('Every !p', array('!p' => $p));
     }
-    $period[FEEDS_SCHEDULE_NEVER] = t('off');
-    $period[0] = t('As often as possible');
+    $period = array(
+      FEEDS_SCHEDULE_NEVER => t('Off'),
+      0 => t('As often as possible'),
+    ) + $period;
     $form['import_period'] = array(
       '#type' => 'select',
       '#title' => t('Periodic import'),
-- 
GitLab