From c32962a36dbaaca1caebfa7b00299f20ea98bc30 Mon Sep 17 00:00:00 2001 From: milesw <milesw@453524.no-reply.drupal.org> Date: Wed, 27 Jun 2012 11:40:24 -0300 Subject: [PATCH] Issue #1454666: Fixing unlock feature to also work with locked imports. --- feeds.pages.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/feeds.pages.inc b/feeds.pages.inc index aec621d7..3a80bd33 100644 --- a/feeds.pages.inc +++ b/feeds.pages.inc @@ -219,13 +219,12 @@ function feeds_unlock_tab_form($form, &$form_state, $importer_id, $node = NULL) '#value' => feeds_source_status($source), ); $form = confirm_form($form, t('Unlock this importer?'), $form['#redirect'], '', t('Delete'), t('Cancel'), 'confirm feeds update'); - $progress = $source->progressClearing(); - if ($progress == FEEDS_BATCH_COMPLETE) { + if ($source->progressImporting() == FEEDS_BATCH_COMPLETE && $source->progressClearing() == FEEDS_BATCH_COMPLETE) { $form['source_locked'] = array( '#type' => 'markup', '#title' => t('Not Locked'), '#tree' => TRUE, - '#markup' => t('This Importer is not locked, therefor it cannot be unlocked.'), + '#markup' => t('This importer is not locked, therefore it cannot be unlocked.'), ); $form['actions']['submit']['#disabled'] = TRUE; $form['actions']['submit']['#value'] = t('Unlock (disabled)'); -- GitLab