From b77e7743bc2185c6ad2c07a9ec80ea85d86a0447 Mon Sep 17 00:00:00 2001 From: Alex Barth <alex_b@53995.no-reply.drupal.org> Date: Sun, 12 Sep 2010 02:16:45 +0000 Subject: [PATCH] Throw exception if object is disabled. --- includes/FeedsConfigurable.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/FeedsConfigurable.inc b/includes/FeedsConfigurable.inc index f94d5c0e..c152c7a9 100644 --- a/includes/FeedsConfigurable.inc +++ b/includes/FeedsConfigurable.inc @@ -77,13 +77,16 @@ abstract class FeedsConfigurable { } /** - * Determine whether this object is persistent. I. e. it is defined either - * in code or in the database. + * Determine whether this object is persistent and enabled. I. e. it is + * defined either in code or in the database and it is enabled. */ public function existing() { if ($this->export_type == FEEDS_EXPORT_NONE) { throw new FeedsNotExistingException(t('Object is not persistent.')); } + if ($this->disabled) { + throw new FeedsNotExistingException(t('Object is disabled.')); + } return $this; } -- GitLab