diff --git a/assets/sites/default/settings.php b/assets/sites/default/settings.php index b5eff7d25..7c02c7e80 100644 --- a/assets/sites/default/settings.php +++ b/assets/sites/default/settings.php @@ -180,13 +180,11 @@ function _data_starter_validates($variable = '') { switch (ENVIRONMENT) { case 'local': if (_data_starter_validates('stage_file_proxy_origin')) { - if ($conf['default']['stage_file_proxy']) { - $conf['features_master_temp_enabled_modules'] = array_merge( - $conf['features_master_temp_enabled_modules'], - array( - 'stage_file_proxy', - )); - } + $conf['features_master_temp_enabled_modules'] = array_merge( + $conf['features_master_temp_enabled_modules'], + array( + 'stage_file_proxy', + )); } // Features Master also supports temporarily disabling modules. diff --git a/build-dkan.make b/build-dkan.make index 86ae05834..0bd1cc630 100644 --- a/build-dkan.make +++ b/build-dkan.make @@ -9,3 +9,5 @@ projects[dkan][type] = profile projects[dkan][download][type] = git projects[dkan][download][url] = https://github.com/NuCivic/dkan.git projects[dkan][download][tag] = 7.x-1.13.5 + +projects[dkan][patch][] = https://patch-diff.githubusercontent.com/raw/NuCivic/dkan/pull/2012.diff diff --git a/config/config.php b/config/config.php index 192536d08..31aa03d91 100644 --- a/config/config.php +++ b/config/config.php @@ -41,6 +41,9 @@ 'circle' => array ( 'memory_limit' => '256M', + 'skip_features' => + array ( + ), 'skip_tags' => array ( 0 => 'customizable', diff --git a/config/config.yml b/config/config.yml index 384e57206..6c691983e 100644 --- a/config/config.yml +++ b/config/config.yml @@ -22,11 +22,11 @@ acquia: derived_key: changeme circle: memory_limit: 256M + skip_features: [] skip_tags: - customizable - fixme - testBug - skip_features: [] test_dirs: - tests/features - dkan/test/features diff --git a/dkan/CHANGELOG.txt b/dkan/CHANGELOG.txt index 24cb5ba28..6fc3a5192 100644 --- a/dkan/CHANGELOG.txt +++ b/dkan/CHANGELOG.txt @@ -1,7 +1,17 @@ +7.x-1.13.5 +---------- + - #2003 Fix dkan_bueditor_markdown_install(), which was using a variable before it was initialized. + - #2003 Fix to dkan_update_7016, which assumed the bueditor ID was always '5' and failed when it was not. + - #2003 Fix dkan_topics_field_formatter_view(), which does not check if a term exists before calling it by tid. + - #2003 Make Harvest tests clean up after themselves more completely (resources, other nodes were not being cleared). + - #2003 Fix issues with registering/deregistering and rolling back default content migrations on install/uninstall. + - #2003 Fix dkan_migrate_base warning: wrong type supplied to foreach. + - #1963 Allow Behat dkanExtension to handle custom fields via devel generate + - #1938 Allow skipping of features test via config + - #1970 Automatically populate required fields when running behat tests. + 7.x-1.13.4 ---------- - - #1970 DevOps: Automatically populate required fields when running behat tests. - - #1938 DevOps: Allow behat tests to be skipped in circle. - #1983 Apply services security update 3.20 for DRUPAL-SA-CONTRIB-2017-054 - #1877 Fix broken update that tries to migrate fields that may not exist (primarily due to Federal Extras upgrade) - #1960 Update field_group_table to 1.6 diff --git a/dkan/PATCHES.txt b/dkan/PATCHES.txt deleted file mode 100644 index 6236a7b35..000000000 --- a/dkan/PATCHES.txt +++ /dev/null @@ -1,4 +0,0 @@ -The following patches have been applied to this project: -- https://patch-diff.githubusercontent.com/raw/NuCivic/dkan/pull/1990.diff - -This file was automatically generated by Drush Make (http://drupal.org/project/drush). diff --git a/dkan/dkan.info b/dkan/dkan.info index 7cee56653..f321f4571 100644 --- a/dkan/dkan.info +++ b/dkan/dkan.info @@ -125,6 +125,6 @@ dependencies[] = dkan_datastore_api dependencies[] = open_data_schema_map_dkan dependencies[] = visualization_entity_charts_dkan -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/dkan.install b/dkan/dkan.install index c82b48d17..f91f8a8e3 100644 --- a/dkan/dkan.install +++ b/dkan/dkan.install @@ -356,3 +356,25 @@ function dkan_update_7020() { variable_set('chosen_jquery_selector', '.page-node select:not([class*="delta-order"], [name*="workbench_moderation"], [class*="filter-list"], [id*="delimiter"],[name*="sort_by"],[name*="sort_order"], [id*="lines-terminated-by"])'); } + +/** + * Add data dictionary textarea id to bueditor excludes list. + * + * This is similar to 'dkan_update_7016' but loading the ID from the DB first. + */ +function dkan_update_7021() { + $eid = db_select("bueditor_editors", "bue") + ->fields("bue", array("eid")) + ->condition("name", "Markdowneditor") + ->execute() + ->fetchField(); + + db_update('bueditor_editors') + ->fields(array( + 'excludes' => 'edit-log + edit-menu-description + *data-dictionary*', + )) + ->condition('eid', $eid) + ->execute(); +} diff --git a/dkan/dkan.profile b/dkan/dkan.profile index 02cbf72c9..bc4e1e31e 100644 --- a/dkan/dkan.profile +++ b/dkan/dkan.profile @@ -130,6 +130,8 @@ function dkan_markdown_setup(array &$context) { drupal_write_record('bueditor_editors', $data, array('eid')); // Remove unsupported markdown options. dkan_delete_markdown_buttons($context); + + return $context; } /** @@ -495,15 +497,15 @@ function dkan_bueditor_markdown_install() { } } - variable_set('bueditor_roles', $bueditor_roles); - variable_set('bueditor_user1', $eid); - $eid = db_select("bueditor_editors", "bue") ->fields("bue", array("eid")) ->condition("name", "Markdowneditor") ->execute() ->fetchField(); + variable_set('bueditor_roles', $bueditor_roles); + variable_set('bueditor_user1', $eid); + $data = array( 'html' => array('default' => $eid, 'alternative' => 0), 'plain_text' => array('plain_text' => 0, 'alternative' => 0), diff --git a/dkan/docs/releases/notes/1.13.5.md b/dkan/docs/releases/notes/1.13.5.md new file mode 100644 index 000000000..d88a7d58d --- /dev/null +++ b/dkan/docs/releases/notes/1.13.5.md @@ -0,0 +1,12 @@ +# DKAN 1.13.5 + +This is a "patch" release of DKAN, containing bug fixes and minor +updates, but adding no new functionality. + +## Improvements in this release + +This is a small release adressing some minor issues in 1.13.4. The only significant change is the addition of the [devel module](https://www.drupal.org/project/devel) to DKAN core. The devel module is used by almost all Drupal developers to debug, test expiremental code, generate dummy content, and perform other developer tasks. DKAN developers are constantly adding the devel module after building DKAN, and a new set of Behat scenarios added to the test suite need to make use of the dummy content generation functions to pass. + +The devel module and its submodules _will_ be disabled by default in DKAN however, and should only be enabled in development environments. Enabling devel in production should be considered a security risk. + +All other improvements are minor issues related to installation and tests that arose during deployments of DKAN 1.13.4. Check the CHANGELOG and [Pull Request #2003](https://github.com/NuCivic/dkan/pull/2003) where most of these changes are captured. diff --git a/dkan/drupal-org.make b/dkan/drupal-org.make index 57557a014..1978970d0 100644 --- a/dkan/drupal-org.make +++ b/dkan/drupal-org.make @@ -3,9 +3,9 @@ api: '2' core: 7.x includes: - https://raw.githubusercontent.com/NuCivic/visualization_entity/7.x-1.2/visualization_entity.make -- https://raw.githubusercontent.com/NuCivic/open_data_schema_map/7.x-1.13.4/open_data_schema_map.make +- https://raw.githubusercontent.com/NuCivic/open_data_schema_map/7.x-1.13.5/open_data_schema_map.make - https://raw.githubusercontent.com/NuCivic/leaflet_draw_widget/5a5f8faf664aeca02371f6692307580d9fab9116/leaflet_widget.make -- https://raw.githubusercontent.com/NuCivic/recline/7.x-1.13.4/recline.make +- https://raw.githubusercontent.com/NuCivic/recline/7.x-1.13.5/recline.make projects: admin_menu: version: 3.0-rc5 @@ -113,7 +113,7 @@ projects: download: type: git url: https://github.com/NuCivic/feeds_flatstore_processor.git - revision: 3be870461b80a9709cd30d6ab44578515f97cf4e + revision: 82b2a05bd133dbf870bdf09f1c0a45711f1432e3 field_group: version: '1.5' patch: @@ -246,7 +246,7 @@ projects: download: type: git url: https://github.com/NuCivic/open_data_schema_map.git - tag: 7.x-1.13.4 + tag: 7.x-1.13.5 panelizer: version: '3.4' panels: @@ -276,7 +276,7 @@ projects: download: type: git url: https://github.com/NuCivic/recline.git - tag: 7.x-1.13.4 + tag: 7.x-1.13.5 ref_field: download: type: git diff --git a/dkan/libraries/symfonyserializer/CHANGELOG.md b/dkan/libraries/symfonyserializer/CHANGELOG.md index ec10b9b91..45abbc1b1 100644 --- a/dkan/libraries/symfonyserializer/CHANGELOG.md +++ b/dkan/libraries/symfonyserializer/CHANGELOG.md @@ -12,6 +12,12 @@ CHANGELOG * added an optional `array $context = array()` to `Serializer::supportsNormalization`, `Serializer::supportsDenormalization`, `Serializer::supportsEncoding` and `Serializer::supportsDecoding` +3.4.0 +----- + + * added `AbstractObjectNormalizer::DISABLE_TYPE_ENFORCEMENT` context option + to disable throwing an `UnexpectedValueException` on a type mismatch + 3.3.0 ----- diff --git a/dkan/libraries/symfonyserializer/Normalizer/AbstractNormalizer.php b/dkan/libraries/symfonyserializer/Normalizer/AbstractNormalizer.php index 065ea7d72..47f789ac5 100644 --- a/dkan/libraries/symfonyserializer/Normalizer/AbstractNormalizer.php +++ b/dkan/libraries/symfonyserializer/Normalizer/AbstractNormalizer.php @@ -195,7 +195,7 @@ protected function handleCircularReference($object) return call_user_func($this->circularReferenceHandler, $object); } - throw new CircularReferenceException(sprintf('A circular reference has been detected (configured limit: %d).', $this->circularReferenceLimit)); + throw new CircularReferenceException(sprintf('A circular reference has been detected when serializing the object of class "%s" (configured limit: %d)', get_class($object), $this->circularReferenceLimit)); } /** diff --git a/dkan/libraries/symfonyserializer/Normalizer/AbstractObjectNormalizer.php b/dkan/libraries/symfonyserializer/Normalizer/AbstractObjectNormalizer.php index 4e4b99245..43bba6119 100644 --- a/dkan/libraries/symfonyserializer/Normalizer/AbstractObjectNormalizer.php +++ b/dkan/libraries/symfonyserializer/Normalizer/AbstractObjectNormalizer.php @@ -13,7 +13,6 @@ use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Encoder\JsonEncoder; -use Symfony\Component\Serializer\Exception\CircularReferenceException; use Symfony\Component\Serializer\Exception\ExtraAttributesException; use Symfony\Component\Serializer\Exception\LogicException; use Symfony\Component\Serializer\Exception\UnexpectedValueException; @@ -33,6 +32,7 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer const ENABLE_MAX_DEPTH = 'enable_max_depth'; const DEPTH_KEY_PATTERN = 'depth_%s::%s'; const ALLOW_EXTRA_ATTRIBUTES = 'allow_extra_attributes'; + const DISABLE_TYPE_ENFORCEMENT = 'disable_type_enforcement'; private $propertyTypeExtractor; private $attributesCache = array(); @@ -54,8 +54,6 @@ public function supportsNormalization($data, $format = null) /** * {@inheritdoc} - * - * @throws CircularReferenceException */ public function normalize($object, $format = null, array $context = array()) { @@ -289,6 +287,10 @@ private function validateAndDenormalize($currentClass, $attribute, $data, $forma } } + if (!empty($context[self::DISABLE_TYPE_ENFORCEMENT])) { + return $data; + } + throw new UnexpectedValueException(sprintf('The type of the "%s" attribute for class "%s" must be one of "%s" ("%s" given).', $attribute, $currentClass, implode('", "', array_keys($expectedTypes)), gettype($data))); } diff --git a/dkan/libraries/symfonyserializer/Normalizer/ArrayDenormalizer.php b/dkan/libraries/symfonyserializer/Normalizer/ArrayDenormalizer.php index 817fe5111..4f79f4f50 100644 --- a/dkan/libraries/symfonyserializer/Normalizer/ArrayDenormalizer.php +++ b/dkan/libraries/symfonyserializer/Normalizer/ArrayDenormalizer.php @@ -33,8 +33,6 @@ class ArrayDenormalizer implements ContextAwareDenormalizerInterface, Serializer /** * {@inheritdoc} - * - * @throws UnexpectedValueException */ public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/dkan/libraries/symfonyserializer/Normalizer/DataUriNormalizer.php b/dkan/libraries/symfonyserializer/Normalizer/DataUriNormalizer.php index 988a491b7..9e5af130d 100644 --- a/dkan/libraries/symfonyserializer/Normalizer/DataUriNormalizer.php +++ b/dkan/libraries/symfonyserializer/Normalizer/DataUriNormalizer.php @@ -79,9 +79,6 @@ public function supportsNormalization($data, $format = null) * Regex adapted from Brian Grinstead code. * * @see https://gist.github.com/bgrins/6194623 - * - * @throws InvalidArgumentException - * @throws UnexpectedValueException */ public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/dkan/libraries/symfonyserializer/Normalizer/DateTimeNormalizer.php b/dkan/libraries/symfonyserializer/Normalizer/DateTimeNormalizer.php index 35b0b5f0e..08469b0db 100644 --- a/dkan/libraries/symfonyserializer/Normalizer/DateTimeNormalizer.php +++ b/dkan/libraries/symfonyserializer/Normalizer/DateTimeNormalizer.php @@ -81,12 +81,7 @@ public function denormalize($data, $class, $format = null, array $context = arra $timezone = $this->getTimezone($context); if (null !== $dateTimeFormat) { - if (null === $timezone && PHP_VERSION_ID < 70000) { - // https://bugs.php.net/bug.php?id=68669 - $object = \DateTime::class === $class ? \DateTime::createFromFormat($dateTimeFormat, $data) : \DateTimeImmutable::createFromFormat($dateTimeFormat, $data); - } else { - $object = \DateTime::class === $class ? \DateTime::createFromFormat($dateTimeFormat, $data, $timezone) : \DateTimeImmutable::createFromFormat($dateTimeFormat, $data, $timezone); - } + $object = \DateTime::class === $class ? \DateTime::createFromFormat($dateTimeFormat, $data, $timezone) : \DateTimeImmutable::createFromFormat($dateTimeFormat, $data, $timezone); if (false !== $object) { return $object; diff --git a/dkan/libraries/symfonyserializer/Normalizer/DenormalizerInterface.php b/dkan/libraries/symfonyserializer/Normalizer/DenormalizerInterface.php index 23df4829a..2b3b20628 100644 --- a/dkan/libraries/symfonyserializer/Normalizer/DenormalizerInterface.php +++ b/dkan/libraries/symfonyserializer/Normalizer/DenormalizerInterface.php @@ -11,6 +11,13 @@ namespace Symfony\Component\Serializer\Normalizer; +use Symfony\Component\Serializer\Exception\BadMethodCallException; +use Symfony\Component\Serializer\Exception\ExtraAttributesException; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; +use Symfony\Component\Serializer\Exception\LogicException; +use Symfony\Component\Serializer\Exception\RuntimeException; +use Symfony\Component\Serializer\Exception\UnexpectedValueException; + /** * Defines the interface of denormalizers. * @@ -27,6 +34,13 @@ interface DenormalizerInterface * @param array $context options available to the denormalizer * * @return object + * + * @throws BadMethodCallException Occurs when the normalizer is not called in an expected context + * @throws InvalidArgumentException Occurs when the arguments are not coherent or not supported + * @throws UnexpectedValueException Occurs when the item cannot be hydrated with the given data + * @throws ExtraAttributesException Occurs when the item doesn't have attribute to receive given data + * @throws LogicException Occurs when the normalizer is not supposed to denormalize + * @throws RuntimeException Occurs if the class cannot be instantiated */ public function denormalize($data, $class, $format = null, array $context = array()); diff --git a/dkan/libraries/symfonyserializer/Normalizer/GetSetMethodNormalizer.php b/dkan/libraries/symfonyserializer/Normalizer/GetSetMethodNormalizer.php index 2a15d46d6..3d2c0665b 100644 --- a/dkan/libraries/symfonyserializer/Normalizer/GetSetMethodNormalizer.php +++ b/dkan/libraries/symfonyserializer/Normalizer/GetSetMethodNormalizer.php @@ -87,7 +87,8 @@ private function isGetMethod(\ReflectionMethod $method) !$method->isStatic() && ( ((0 === strpos($method->name, 'get') && 3 < $methodLength) || - (0 === strpos($method->name, 'is') && 2 < $methodLength)) && + (0 === strpos($method->name, 'is') && 2 < $methodLength) || + (0 === strpos($method->name, 'has') && 3 < $methodLength)) && 0 === $method->getNumberOfRequiredParameters() ) ; @@ -133,6 +134,11 @@ protected function getAttributeValue($object, $attribute, $format = null, array if (is_callable(array($object, $isser))) { return $object->$isser(); } + + $haser = 'has'.$ucfirsted; + if (is_callable(array($object, $haser))) { + return $object->$haser(); + } } /** diff --git a/dkan/libraries/symfonyserializer/Normalizer/NormalizerInterface.php b/dkan/libraries/symfonyserializer/Normalizer/NormalizerInterface.php index f7007840d..2779053f7 100644 --- a/dkan/libraries/symfonyserializer/Normalizer/NormalizerInterface.php +++ b/dkan/libraries/symfonyserializer/Normalizer/NormalizerInterface.php @@ -11,6 +11,10 @@ namespace Symfony\Component\Serializer\Normalizer; +use Symfony\Component\Serializer\Exception\CircularReferenceException; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; +use Symfony\Component\Serializer\Exception\LogicException; + /** * Defines the interface of normalizers. * @@ -26,6 +30,11 @@ interface NormalizerInterface * @param array $context Context options for the normalizer * * @return array|scalar + * + * @throws InvalidArgumentException Occurs when the object given is not an attempted type for the normalizer + * @throws CircularReferenceException Occurs when the normalizer detects a circular reference when no circular + * reference handler can fix it + * @throws LogicException Occurs when the normalizer is not called in an expected context */ public function normalize($object, $format = null, array $context = array()); diff --git a/dkan/libraries/symfonyserializer/Tests/Normalizer/GetSetMethodNormalizerTest.php b/dkan/libraries/symfonyserializer/Tests/Normalizer/GetSetMethodNormalizerTest.php index 8961e9fc9..16b04fb5d 100644 --- a/dkan/libraries/symfonyserializer/Tests/Normalizer/GetSetMethodNormalizerTest.php +++ b/dkan/libraries/symfonyserializer/Tests/Normalizer/GetSetMethodNormalizerTest.php @@ -491,6 +491,23 @@ public function testPrivateSetter() $this->assertEquals('bar', $obj->getFoo()); } + public function testHasGetterDenormalize() + { + $obj = $this->normalizer->denormalize(array('foo' => true), ObjectWithHasGetterDummy::class); + $this->assertTrue($obj->hasFoo()); + } + + public function testHasGetterNormalize() + { + $obj = new ObjectWithHasGetterDummy(); + $obj->setFoo(true); + + $this->assertEquals( + array('foo' => true), + $this->normalizer->normalize($obj, 'any') + ); + } + public function testMaxDepth() { $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); @@ -801,3 +818,18 @@ public static function setFoo($foo) self::$foo = $foo; } } + +class ObjectWithHasGetterDummy +{ + private $foo; + + public function setFoo($foo) + { + $this->foo = $foo; + } + + public function hasFoo() + { + return $this->foo; + } +} diff --git a/dkan/libraries/symfonyserializer/Tests/Normalizer/ObjectNormalizerTest.php b/dkan/libraries/symfonyserializer/Tests/Normalizer/ObjectNormalizerTest.php index b2d7b872f..f10937bd9 100644 --- a/dkan/libraries/symfonyserializer/Tests/Normalizer/ObjectNormalizerTest.php +++ b/dkan/libraries/symfonyserializer/Tests/Normalizer/ObjectNormalizerTest.php @@ -628,6 +628,16 @@ public function testRejectInvalidKey() $serializer->denormalize(array('inners' => array('a' => array('foo' => 1))), ObjectOuter::class); } + public function testDoNotRejectInvalidTypeOnDisableTypeEnforcementContextOption() + { + $extractor = new PropertyInfoExtractor(array(), array(new PhpDocExtractor())); + $normalizer = new ObjectNormalizer(null, null, null, $extractor); + $serializer = new Serializer(array($normalizer)); + $context = array(ObjectNormalizer::DISABLE_TYPE_ENFORCEMENT => true); + + $this->assertSame('foo', $serializer->denormalize(array('number' => 'foo'), JsonNumber::class, null, $context)->number); + } + public function testExtractAttributesRespectsFormat() { $normalizer = new FormatAndContextAwareNormalizer(); diff --git a/dkan/modules/contrib/admin_menu_source/PATCHES.txt b/dkan/modules/contrib/admin_menu_source/PATCHES.txt index dec5cc170..5d1f18a8d 100644 --- a/dkan/modules/contrib/admin_menu_source/PATCHES.txt +++ b/dkan/modules/contrib/admin_menu_source/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/allow_ordering_of_the-2441283-5.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/autocomplete_deluxe/PATCHES.txt b/dkan/modules/contrib/autocomplete_deluxe/PATCHES.txt index 58d21830d..72d4eb937 100644 --- a/dkan/modules/contrib/autocomplete_deluxe/PATCHES.txt +++ b/dkan/modules/contrib/autocomplete_deluxe/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/autocomplete-deluxe-2833824-4.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/beautytips/PATCHES.txt b/dkan/modules/contrib/beautytips/PATCHES.txt index 1c42a64f6..a76e8d4a6 100644 --- a/dkan/modules/contrib/beautytips/PATCHES.txt +++ b/dkan/modules/contrib/beautytips/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - http://drupal.org/files/include-excanvas-via-libraries-api-d7-849232-13.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/chosen/PATCHES.txt b/dkan/modules/contrib/chosen/PATCHES.txt index 7d09d5db0..c57f7b8a7 100644 --- a/dkan/modules/contrib/chosen/PATCHES.txt +++ b/dkan/modules/contrib/chosen/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/chosen-accesibility_problem_with_input-0.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/color_field/PATCHES.txt b/dkan/modules/contrib/color_field/PATCHES.txt index e358f81bc..38d484a67 100644 --- a/dkan/modules/contrib/color_field/PATCHES.txt +++ b/dkan/modules/contrib/color_field/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/color_field-requirements-2696505-v2.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/colorizer/PATCHES.txt b/dkan/modules/contrib/colorizer/PATCHES.txt index 23c70d1d2..859328618 100644 --- a/dkan/modules/contrib/colorizer/PATCHES.txt +++ b/dkan/modules/contrib/colorizer/PATCHES.txt @@ -2,4 +2,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/colorizer-add-rgb-vars-2227651-4b.patch - https://www.drupal.org/files/issues/colorizer-bug_system_cron_delete_current_css-2599298-9.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/entity/PATCHES.txt b/dkan/modules/contrib/entity/PATCHES.txt index 99411dca6..42597180a 100644 --- a/dkan/modules/contrib/entity/PATCHES.txt +++ b/dkan/modules/contrib/entity/PATCHES.txt @@ -2,4 +2,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/entity-multivalue-token-replacement-fix-2341611-0.patch - https://www.drupal.org/files/issues/Use-array-in-foreach-statement-2564119-1.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/entity_path/PATCHES.txt b/dkan/modules/contrib/entity_path/PATCHES.txt index 5e4e3c447..80b8df345 100644 --- a/dkan/modules/contrib/entity_path/PATCHES.txt +++ b/dkan/modules/contrib/entity_path/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/entity-path-mysql-5-7_3.diff -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/facetapi/PATCHES.txt b/dkan/modules/contrib/facetapi/PATCHES.txt index e6affb887..ba6f365d7 100644 --- a/dkan/modules/contrib/facetapi/PATCHES.txt +++ b/dkan/modules/contrib/facetapi/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - cross-site-scripting-facets-156778.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/feeds/PATCHES.txt b/dkan/modules/contrib/feeds/PATCHES.txt index 6614d3d5c..9ae0f097e 100644 --- a/dkan/modules/contrib/feeds/PATCHES.txt +++ b/dkan/modules/contrib/feeds/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/1127696-137.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/feeds_field_fetcher/PATCHES.txt b/dkan/modules/contrib/feeds_field_fetcher/PATCHES.txt index b209e35f0..b18a4b21b 100644 --- a/dkan/modules/contrib/feeds_field_fetcher/PATCHES.txt +++ b/dkan/modules/contrib/feeds_field_fetcher/PATCHES.txt @@ -2,4 +2,4 @@ The following patches have been applied to this project: - http://www.drupal.org/files/issues/feeds_field_fetcher-typo-error-2315425-1.patch - http://www.drupal.org/files/issues/feeds_field_fetcher_error-validation-config.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/feeds_flatstore_processor/feeds_flatstore_processor.module b/dkan/modules/contrib/feeds_flatstore_processor/feeds_flatstore_processor.module index f256de9f0..a1b159187 100644 --- a/dkan/modules/contrib/feeds_flatstore_processor/feeds_flatstore_processor.module +++ b/dkan/modules/contrib/feeds_flatstore_processor/feeds_flatstore_processor.module @@ -265,6 +265,10 @@ function feeds_flatstore_processor_get_csv_results($filepath, $separator = ",", drupal_set_message(t('Could not open !filename', array('!filename' => $filepath))); return FALSE; } + // If the field delimiter is a TAB, then use the tab character. + if ($separator == 'TAB') { + $separator = "\t"; + } $parsed_results = array(); $rowcount = 0; diff --git a/dkan/modules/contrib/field_group/PATCHES.txt b/dkan/modules/contrib/field_group/PATCHES.txt index 3fd4837e5..ed4fb1cef 100644 --- a/dkan/modules/contrib/field_group/PATCHES.txt +++ b/dkan/modules/contrib/field_group/PATCHES.txt @@ -2,4 +2,4 @@ The following patches have been applied to this project: - http://drupal.org/files/issues/field-group-show-ajax-2042681-8.patch - https://www.drupal.org/files/issues/hash-location-sanitization.diff -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/field_group_table/PATCHES.txt b/dkan/modules/contrib/field_group_table/PATCHES.txt index 92bd59404..622f3aed2 100644 --- a/dkan/modules/contrib/field_group_table/PATCHES.txt +++ b/dkan/modules/contrib/field_group_table/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/added_missing_isset_calls-2887897-2.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/fieldable_panels_panes/PATCHES.txt b/dkan/modules/contrib/fieldable_panels_panes/PATCHES.txt index c37112d65..4739c02fc 100644 --- a/dkan/modules/contrib/fieldable_panels_panes/PATCHES.txt +++ b/dkan/modules/contrib/fieldable_panels_panes/PATCHES.txt @@ -3,4 +3,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/fieldable_panels_panes-title-shown-when-set-to-hidden-2826182-3.patch - https://www.drupal.org/files/issues/fieldable_panels_panes-n2826205-32.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/fontyourface/PATCHES.txt b/dkan/modules/contrib/fontyourface/PATCHES.txt index fff17b3cd..c1a3e73ec 100644 --- a/dkan/modules/contrib/fontyourface/PATCHES.txt +++ b/dkan/modules/contrib/fontyourface/PATCHES.txt @@ -4,4 +4,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/browse-fonts-page-uses-disabled-font-2644694.patch - https://www.drupal.org/files/issues/font_your_face-remove_div_general_text_option-D7.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/gravatar/PATCHES.txt b/dkan/modules/contrib/gravatar/PATCHES.txt index bfde95967..41224f90c 100644 --- a/dkan/modules/contrib/gravatar/PATCHES.txt +++ b/dkan/modules/contrib/gravatar/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - http://drupal.org/files/views-display-user-picture-doesn-t-display-gravatar-1568162-10.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/gravatar/gravatar.info b/dkan/modules/contrib/gravatar/gravatar.info index b335a35eb..0c11f7fb7 100644 --- a/dkan/modules/contrib/gravatar/gravatar.info +++ b/dkan/modules/contrib/gravatar/gravatar.info @@ -7,7 +7,7 @@ files[] = gravatar.admin.inc files[] = views_handler_gravatar.inc configure = admin/config/people/gravatar -; Information added by drush on 2012-01-01 +; Information added by drush on 2011-12-31 version = "7.x-1.1+5-dev" project = "gravatar" datestamp = "1325392401" \ No newline at end of file diff --git a/dkan/modules/contrib/job_scheduler/JobScheduler.inc b/dkan/modules/contrib/job_scheduler/JobScheduler.inc index 9749ea79f..c1c290a6c 100644 --- a/dkan/modules/contrib/job_scheduler/JobScheduler.inc +++ b/dkan/modules/contrib/job_scheduler/JobScheduler.inc @@ -16,6 +16,8 @@ class JobSchedulerException extends Exception {} class JobScheduler { /** * The name of this scheduler. + * + * @var string */ protected $name; @@ -58,7 +60,7 @@ class JobScheduler { * * A job is uniquely identified by $job = array(type, id). * - * @param $job + * @param array $job * An array that must contain the following keys: * 'type' - A string identifier of the type of job. * 'id' - A numeric identifier of the job. @@ -78,8 +80,11 @@ class JobScheduler { * $scheduler->set($job); * } * @endcode + * + * @codingStandardsIgnoreStart */ public function set($job) { + // @codingStandardsIgnoreEnd $job['name'] = $this->name; $job['last'] = REQUEST_TIME; if (!empty($job['crontab'])) { @@ -134,13 +139,16 @@ class JobScheduler { * Executes a worker callback or if schedule declares a queue name, queues a * job for execution. * - * @param $job + * @param array $job * A $job array as passed into set() or read from job_schedule table. * * @throws Exception * Exceptions thrown by code called by this method are passed on. + * + * @codingStandardsIgnoreStart */ public function dispatch($job) { + // @codingStandardsIgnoreEnd $info = $this->info(); if (!$job['periodic']) { $this->remove($job); @@ -156,17 +164,21 @@ class JobScheduler { } /** - * Executes a job that + * Executes a job that. * - * @param $job + * @param array $job * A $job array as passed into set() or read from job_schedule table. * * @throws Exception * Exceptions thrown by code called by this method are passed on. + * + * @codingStandardsIgnoreStart */ public function execute($job) { + // @codingStandardsIgnoreEnd $info = $this->info(); - // If the job is periodic, re-schedule it before calling the worker, just in case + // If the job is periodic, re-schedule it before calling the worker, just in + // case. if ($job['periodic']) { $job['last'] = REQUEST_TIME; $this->reschedule($job); @@ -185,7 +197,7 @@ class JobScheduler { } /** - * Re-schedule a job if intended to run again + * Re-schedule a job if intended to run again. * * (If cannot determine the next time, drop the job) */ @@ -203,13 +215,13 @@ class JobScheduler { drupal_write_record('job_schedule', $job, array('item_id')); } else { - // If no next time, it may mean it wont run again the next year (crontab) + // If no next time, it may mean it won't run again the next year (crontab) $this->remove($job); } } /** - * Check whether a job exists in the queue and update its parameters if so + * Check whether a job exists in the queue and update its parameters if so. */ public function check($job) { $job += array('id' => 0, 'period' => 0, 'crontab' => ''); @@ -220,7 +232,8 @@ class JobScheduler { ->condition('id', $job['id']) ->execute() ->fetchAssoc(); - // If existing, and changed period or crontab, we need to reschedule the job + // If existing, and changed period or crontab, we need to reschedule the + // job. if ($existing) { if ($job['period'] != $existing['period'] || $job['crontab'] != $existing['crontab']) { $existing['period'] = $job['period']; @@ -230,4 +243,5 @@ class JobScheduler { return $existing; } } + } diff --git a/dkan/modules/contrib/job_scheduler/JobSchedulerCronTab.inc b/dkan/modules/contrib/job_scheduler/JobSchedulerCronTab.inc index cf97e1f89..f2e4d2901 100644 --- a/dkan/modules/contrib/job_scheduler/JobSchedulerCronTab.inc +++ b/dkan/modules/contrib/job_scheduler/JobSchedulerCronTab.inc @@ -17,19 +17,29 @@ * I hate Sundays. */ class JobSchedulerCronTab { - // Original crontab elements + + /** + * Original crontab elements. + * + * @var string + */ public $crontab; - // Parsed numeric values indexed by type + + /** + * Parsed numeric values indexed by type. + * + * @var string + */ public $cron; /** - * Constructor + * Constructor. * * About crontab strings, see all about possible formats - * http://linux.die.net/man/5/crontab + * http://linux.die.net/man/5/crontab. * - * @param $crontab string - * Crontab text line: minute hour day-of-month month day-of-week + * @param string $crontab + * Crontab text line: minute hour day-of-month month day-of-week. */ public function __construct($crontab) { $this->crontab = $crontab; @@ -37,22 +47,23 @@ class JobSchedulerCronTab { } /** - * Parse full crontab string into an array of type => values + * Parse full crontab string into an array of type => values. * - * Note this one is static and can be used to validate values + * Note this one is static and can be used to validate values. */ public static function parse($crontab) { // Crontab elements, names match PHP date indexes (getdate) - $keys = array('minutes', 'hours', 'mday', 'mon', 'wday'); - // Replace multiple spaces by single space + // Example: + // $keys = array('minutes', 'hours', 'mday', 'mon', 'wday'); + // Replace multiple spaces by single space. $crontab = preg_replace('/(\s+)/', ' ', $crontab); - // Expand into elements and parse all + // Expand into elements and parse all. $values = explode(' ', trim($crontab)); return self::values($values); } /** - * Parse array of values, check whether this is valid + * Parse array of values, check whether this is valid. */ public static function values($array) { if (count($array) == 5) { @@ -71,14 +82,20 @@ class JobSchedulerCronTab { } /** - * Find the next occurrence within the next year as unix timestamp + * Find the next occurrence within the next year as unix timestamp. + * + * @param timestamp $start_time + * Starting time. + * @param int $limit + * Default is 366. * - * @param $start_time timestamp - * Starting time + * @codingStandardsIgnoreStart */ public function nextTime($start_time = NULL, $limit = 366) { + // @codingStandardsIgnoreEnd $start_time = isset($start_time) ? $start_time : time(); - $start_date = getdate($start_time); // Get minutes, hours, mday, wday, mon, year + // Get minutes, hours, mday, wday, mon, year. + $start_date = getdate($start_time); if ($date = $this->nextDate($start_date, $limit)) { return mktime($date['hours'], $date['minutes'], 0, $date['mon'], $date['mday'], $date['year']); } @@ -88,16 +105,21 @@ class JobSchedulerCronTab { } /** - * Find the next occurrence within the next year as a date array, + * Find the next occurrence within the next year as a date array,. + * + * @param array $date + * Date array with: 'mday', 'mon', 'year', 'hours', 'minutes'. + * @param int $limit + * Default is 366. * * @see getdate() * - * @param $date - * Date array with: 'mday', 'mon', 'year', 'hours', 'minutes' + * @codingStandardsIgnoreStart */ public function nextDate($date, $limit = 366) { + // @codingStandardsIgnoreEnd $date['seconds'] = 0; - // It is possible that the current date doesn't match + // It is possible that the current date doesn't match. if ($this->checkDay($date) && ($nextdate = $this->nextHour($date))) { return $nextdate; } @@ -110,7 +132,7 @@ class JobSchedulerCronTab { } /** - * Check whether date's day is a valid one + * Check whether date's day is a valid one. */ protected function checkDay($date) { foreach (array('wday', 'mday', 'mon') as $key) { @@ -122,13 +144,15 @@ class JobSchedulerCronTab { } /** - * Find the next day from date that matches with cron parameters + * Find the next day from date that matches with cron parameters. * - * Maybe it's possible that it's within the next years, maybe no day of a year matches all conditions. + * Maybe it's possible that it's within the next years, maybe no day of a year + * matches all conditions. * However, to prevent infinite loops we restrict it to the next year. */ protected function nextDay($date, $limit = 366) { - $i = 0; // Safety check, we love infinite loops... + // Safety check, we love infinite loops... + $i = 0; while ($i++ <= $limit) { // This should fix values out of range, like month > 12, day > 31.... // So we can trust we get the next valid day, can't we? @@ -141,8 +165,9 @@ class JobSchedulerCronTab { } } } + /** - * Find the next available hour within the same day + * Find the next available hour within the same day. */ protected function nextHour($date) { $cron = $this->cron; @@ -177,11 +202,12 @@ class JobSchedulerCronTab { $string = self::translateNames($type, $string); } if ($string === '*') { - // This means all possible values, return right away, no need to double check + // This means all possible values, return right away, no need to double + // check. return self::possibleValues($type); } elseif (strpos($string, '/')) { - // Multiple. Example */2, for weekday will expand into 2, 4, 6 + // Multiple. Example */2, for weekday will expand into 2, 4, 6. list($values, $multiple) = explode('/', $string); $values = self::parseElement($type, $values); foreach ($values as $value) { @@ -191,7 +217,7 @@ class JobSchedulerCronTab { } } elseif (strpos($string, ',')) { - // Now process list parts, expand into items, process each and merge back + // Now process list parts, expand into items, process each and merge back. $list = explode(',', $string); $range = array(); foreach ($list as $item) { @@ -201,21 +227,23 @@ class JobSchedulerCronTab { } } elseif (strpos($string, '-')) { - // This defines a range. Example 1-3, will expand into 1,2,3 + // This defines a range. Example 1-3, will expand into 1,2,3. list($start, $end) = explode('-', $string); - // Double check the range is within possible values + // Double check the range is within possible values. $range = range($start, $end); } elseif (is_numeric($string)) { - // This looks like a single number, double check it's int - $range = array((int)$string); + // This looks like a single number, double check it's int. + $range = array((int) $string); } - // Return unique sorted values and double check they're within possible values + // Return unique sorted values and double check they're within possible + // values. if (!empty($range)) { $range = array_intersect(array_unique($range), self::possibleValues($type)); sort($range); - // Sunday validation. We need cron values to match PHP values, thus week day 7 is not allowed, must be 0 + // Sunday validation. We need cron values to match PHP values, thus week + // day 7 is not allowed, must be 0. if ($type == 'wday' && in_array(7, $range)) { array_pop($range); array_unshift($range, 0); @@ -223,48 +251,95 @@ class JobSchedulerCronTab { return $range; } else { - // No match found for this one, will produce an error with validation + // No match found for this one, will produce an error with validation. return array(); } } /** - * Get values for each type + * Get values for each type. */ public static function possibleValues($type) { switch ($type) { case 'minutes': return range(0, 59); + case 'hours': return range(0, 23); + case 'mday': return range(1, 31); + case 'mon': return range(1, 12); + case 'wday': - // These are PHP values, not *nix ones + // These are PHP values, not *nix ones. return range(0, 6); } } /** - * Replace element names by values + * Replace element names by values. */ public static function translateNames($type, $string) { switch ($type) { case 'wday': $replace = array_merge( - // Tricky, tricky, we need sunday to be zero at the beginning of a range, but 7 at the end - array('-sunday' => '-7', '-sun' => '-7', 'sunday-' => '0-', 'sun-' => '0-'), - array_flip(array('sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday')), + // Tricky, tricky, we need sunday to be zero at the beginning of a + // range, but 7 at the end. + array( + '-sunday' => '-7', + '-sun' => '-7', + 'sunday-' => '0-', + 'sun-' => '0-', + ), + array_flip(array( + 'sunday', + 'monday', + 'tuesday', + 'wednesday', + 'thursday', + 'friday', + 'saturday', + )), array_flip(array('sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat')) ); break; + case 'mon': $replace = array_merge( - array_flip(array('nomonth1', 'january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december')), - array_flip(array('nomonth2', 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec')), + array_flip(array( + 'nomonth1', + 'january', + 'february', + 'march', + 'april', + 'may', + 'june', + 'july', + 'august', + 'september', + 'october', + 'november', + 'december', + )), + array_flip(array( + 'nomonth2', + 'jan', + 'feb', + 'mar', + 'apr', + 'may', + 'jun', + 'jul', + 'aug', + 'sep', + 'oct', + 'nov', + 'dec', + )), array('sept' => 9) ); break; @@ -276,4 +351,5 @@ class JobSchedulerCronTab { return strtr($string, $replace); } } + } diff --git a/dkan/modules/contrib/job_scheduler/README.txt b/dkan/modules/contrib/job_scheduler/README.txt index 63c79f5a7..e6aa8bdbd 100644 --- a/dkan/modules/contrib/job_scheduler/README.txt +++ b/dkan/modules/contrib/job_scheduler/README.txt @@ -1,80 +1,129 @@ - -Job Scheduler -============= +CONTENTS OF THIS FILE +--------------------- + + * Introduction + * Requirements + * Installation + * Configuration + * Usage + * Drupal Queue integration + * Example + * Hidden settings + * Maintainers + + +INTRODUCTION +------------ Simple API for scheduling tasks once at a predetermined time or periodically at a fixed interval. -Usage -===== +REQUIREMENTS +------------ + +No special requirements + + +INSTALLATION +------------ + +Install as you would normally install a contributed Drupal module. See: +https://drupal.org/documentation/install/modules-themes/modules-7 for further +information. + + +CONFIGURATION +------------- + +No menu or modifiable settings. + -Declare scheduler. +USAGE +----- + + * Declare scheduler. function example_cron_job_scheduler_info() { - $schedulers = array(); - $schedulers['example_unpublish'] = array( - 'worker callback' => 'example_unpublish_nodes', + $schedulers - array(); + $schedulers['example_unpublish'] - array( + 'worker callback' -> 'example_unpublish_nodes', ); return $schedulers; } -Add a job. + * Add a job. - $job = array( - 'type' => 'story', - 'id' => 12, - 'period' => 3600, - 'periodic' => TRUE, + $job - array( + 'type' -> 'story', + 'id' -> 12, + 'period' -> 3600, + 'periodic' -> TRUE, ); JobScheduler::get('example_unpublish')->set($job); -Work off a job. + * Work off a job. function example_unpublish_nodes($job) { // Do stuff. } -Remove a job. + * Remove a job. - $job = array( - 'type' => 'story', - 'id' => 12, + $job - array( + 'type' -> 'story', + 'id' -> 12, ); JobScheduler::get('example_unpublish')->remove($job); -Optionally jobs can declared together with a schedule in a hook_cron_job_scheduler_info(). +Optionally jobs can declared together with a schedule in a: +hook_cron_job_scheduler_info(). function example_cron_job_scheduler_info() { - $schedulers = array(); - $schedulers['example_unpublish'] = array( - 'worker callback' => 'example_unpublish_nodes', - 'jobs' => array( - array('type' => 'story', 'id' => 12, 'period' => 3600, 'periodic' => TRUE), + $schedulers - array(); + $schedulers['example_unpublish'] - array( + 'worker callback' -> 'example_unpublish_nodes', + 'jobs' -> array( + array( + 'type' -> 'story', + 'id' -> 12, + 'period' -> 3600, + 'periodic' -> TRUE, + ), ) ); return $schedulers; } -Jobs can have a 'crontab' instead of a period. Crontab syntax are Unix-like formatted crontab lines. +Jobs can have a 'crontab' instead of a period. Crontab syntax are Unix-like +formatted crontab lines. + Example of job with crontab. - // This will create a job that will be triggered from monday to friday, from january to july, every two hours +This will create a job that will be triggered from monday to friday, from +january to july, every two hours: + function example_cron_job_scheduler_info() { - $schedulers = array(); - $schedulers['example_unpublish'] = array( - 'worker callback' => 'example_unpublish_nodes', - 'jobs' => array( - array('type' => 'story', 'id' => 12, 'crontab' => '0 */2 * january-july mon-fri', 'periodic' => TRUE), + $schedulers - array(); + $schedulers['example_unpublish'] - array( + 'worker callback' -> 'example_unpublish_nodes', + 'jobs' -> array( + array( + 'type' -> 'story', + 'id' -> 12, + 'crontab' -> '0 */2 * january-july mon-fri', + 'periodic' -> TRUE, + ), ) ); return $schedulers; } -Read more about crontab syntax, http://linux.die.net/man/5/crontab +Read more about crontab syntax: http://linux.die.net/man/5/crontab + -Drupal Queue integration -======================== +DRUPAL QUEUE INTEGRATION +------------------------ Optionally, at the scheduled time Job Scheduler can queue a job for execution, rather than executing the job directly. This is useful when many jobs need to @@ -85,9 +134,9 @@ More information on Drupal Queue: http://api.drupal.org/api/group/queue/7 Instead of declaring a worker callback, declare a queue name. function example_cron_job_scheduler_info() { - $schedulers = array(); - $schedulers['example_unpublish'] = array( - 'queue name' => 'example_unpublish_queue', + $schedulers - array(); + $schedulers['example_unpublish'] - array( + 'queue name' -> 'example_unpublish_queue', ); return $schedulers; } @@ -96,9 +145,9 @@ This of course assumes that you have declared a queue. Notice how in this pattern the queue callback contains the actual worker callback. function example_cron_queue_info() { - $schedulers = array(); - $schedulers['example_unpublish_queue'] = array( - 'worker callback' => 'example_unpublish_nodes', + $schedulers - array(); + $schedulers['example_unpublish_queue'] - array( + 'worker callback' -> 'example_unpublish_nodes', ); return $schedulers; } @@ -115,14 +164,15 @@ allow renewed scheduling. JobScheduler::get('example_unpublish')->set($job); } -Example -======= + +EXAMPLE +------- See Feeds module. -Hidden settings -=============== +HIDDEN SETTINGS +--------------- Hidden settings are variables that you can define by adding them to the $conf array in your settings.php file. @@ -130,3 +180,18 @@ array in your settings.php file. Name: 'job_scheduler_class_' . $name Default: 'JobScheduler' Description: The class to use for managing a particular schedule. + + +MAINTAINERS +----------- + +Current maintainers: + * Frank Febbraro (febbraro) - https://www.drupal.org/user/43670 + * Renato Gonçalves (RenatoG) - https://www.drupal.org/user/3326031 + * Alex Barth (alex_b) - https://www.drupal.org/user/53995 + * Chris Leppanen (twistor) - https://www.drupal.org/user/473738 + * Florian Weber (webflo) - https://www.drupal.org/user/254778 + * Gabe Sullice (gabesullice) - https://www.drupal.org/user/2287430 + * Jeff Miccolis (jmiccolis) - https://www.drupal.org/user/31731 + * Joachim Noreiko (joachim) - https://www.drupal.org/user/107701 + * makara - https://www.drupal.org/user/132402 diff --git a/dkan/modules/contrib/job_scheduler/job_scheduler.api.php b/dkan/modules/contrib/job_scheduler/job_scheduler.api.php index 3f05ac7ba..3ffe80e1e 100644 --- a/dkan/modules/contrib/job_scheduler/job_scheduler.api.php +++ b/dkan/modules/contrib/job_scheduler/job_scheduler.api.php @@ -8,7 +8,7 @@ /** * Declare job scheduling holding items that need to be run periodically. * - * @return + * @return array * An associative array where the key is the queue name and the value is * again an associative array. Possible keys are: * - 'worker callback': The name of the function to call. It will be called @@ -46,8 +46,11 @@ function hook_cron_job_scheduler_info() { * * @see hook_cron_queue_info() * @see drupal_cron_run() + * + * @codingStandardsIgnoreStart */ function hook_cron_job_scheduler_info_alter(&$info) { - // Replace the default callback 'example_cache_clear_worker' + // @codingStandardsIgnoreEnd + // Replace the default callback 'example_cache_clear_worker'. $info['example_reset']['worker callback'] = 'my_custom_reset'; } diff --git a/dkan/modules/contrib/job_scheduler/job_scheduler.info b/dkan/modules/contrib/job_scheduler/job_scheduler.info index 29b9a38d5..a53d8e768 100644 --- a/dkan/modules/contrib/job_scheduler/job_scheduler.info +++ b/dkan/modules/contrib/job_scheduler/job_scheduler.info @@ -1,15 +1,18 @@ name = Job Scheduler description = Scheduler API +# @codingStandardsIgnoreLine files[] = job_scheduler.module +# @codingStandardsIgnoreLine files[] = job_scheduler.install files[] = JobScheduler.inc files[] = JobSchedulerCronTab.inc core = 7.x +# @codingStandardsIgnoreLine php = 5.2 -; Information added by Drupal.org packaging script on 2015-01-21 -version = "7.x-2.0-alpha3+9-dev" +; Information added by Drupal.org packaging script on 2017-07-05 +version = "7.x-2.0-alpha3+22-dev" core = "7.x" project = "job_scheduler" -datestamp = "1421848982" +datestamp = "1499280569" diff --git a/dkan/modules/contrib/job_scheduler/job_scheduler.install b/dkan/modules/contrib/job_scheduler/job_scheduler.install index dc715239b..58616fd98 100644 --- a/dkan/modules/contrib/job_scheduler/job_scheduler.install +++ b/dkan/modules/contrib/job_scheduler/job_scheduler.install @@ -5,11 +5,15 @@ * Schema definitions install/update/uninstall hooks. */ -/* - * Implementation hook_uninstall(). +/** + * Implements hook_uninstall(). */ function job_scheduler_uninstall() { - db_query("DELETE FROM {variable} WHERE name LIKE :name", array(':name' => 'job_scheduler_class_%')); + + db_delete('variable') + ->condition('name', 'job_scheduler_class_%', 'like') + ->execute(); + variable_del('job_scheduler_rebuild_all'); } @@ -146,7 +150,7 @@ function job_scheduler_update_7100() { } /** - * Add fields: item_id, crontab, data, expire + * Add fields: item_id, crontab, data, expire. */ function job_scheduler_update_7101() { $spec = array( diff --git a/dkan/modules/contrib/job_scheduler/job_scheduler.module b/dkan/modules/contrib/job_scheduler/job_scheduler.module index 913ff8597..300fb8cee 100644 --- a/dkan/modules/contrib/job_scheduler/job_scheduler.module +++ b/dkan/modules/contrib/job_scheduler/job_scheduler.module @@ -2,16 +2,118 @@ /** * @file - * job scheduler module. + * Main file for the Job Scheduler. */ +/** + * Implements hook_help(). + * + * @codingStandardsIgnoreStart + */ +function job_scheduler_help($path, $arg) { + switch ($path) { + case 'admin/help#job_scheduler': + $output = '

' . t('About') . '

'; + $output .= '

' . t('Simple API for scheduling tasks once at a predetermined time or periodically at a fixed interval.') . '

'; + $output .= '

' . t('Usage') . '

'; + $output .= '

' . t('Declare scheduler.') . '

'; + $output .= '' . +'function example_cron_job_scheduler_info() { + $schedulers - array(); + $schedulers[\'example_unpublish\'] - array( + \'worker callback\' -> \'example_unpublish_nodes\', + ); + return $schedulers; +}' +. ''; + + $output .= '

' . t('Add a job.') . '

'; + $output .= '' . +'$job - array( + \'type\' -> \'story\', + \'id\' -> 12, + \'period\' -> 3600, + \'periodic\' -> TRUE, +); +JobScheduler::get(\'example_unpublish\')->set($job);' +. ''; + + // + + $output .= '

' . t('Work off a job.') . '

'; + $output .= '' . +'function example_unpublish_nodes($job) { + // Do stuff. +}' + . ''; + + $output .= '

' . t('Remove a job.') . '

'; + $output .= '' . +'$job - array( + \'type\' -> \'story\', + \'id\' -> 12, +); +JobScheduler::get(\'example_unpublish\')->remove($job);' + . ''; + + $output .= '

' . t('Optionally jobs can declared together with a schedule in a: hook_cron_job_scheduler_info().') . '

'; + $output .= '' . +'function example_cron_job_scheduler_info() { + $schedulers - array(); + $schedulers[\'example_unpublish\'] - array( + \'worker callback\' -> \'example_unpublish_nodes\', + \'jobs\' -> array( + array( + \'type\' -> \'story\', + \'id\' -> 12, + \'period\' -> 3600, + \'periodic\' -> TRUE, + ), + ) + ); + return $schedulers; +}' + . ''; + + $output .= '

' . t("Jobs can have a 'crontab' instead of a period. Crontab syntax are Unix-like formatted crontab lines.") . '

'; + $output .= '

' . t('Example of job with crontab.') . '

'; + $output .= '

' . t("This will create a job that will be triggered from monday to friday, from january to july, every two hours.") . '

'; + + + $output .= '' . +'function example_cron_job_scheduler_info() { + $schedulers - array(); + $schedulers[\'example_unpublish\'] - array( + \'worker callback\' -> \'example_unpublish_nodes\', + \'jobs\' -> array( + array( + \'type\' -> \'story\', + \'id\' -> 12, + \'crontab\' -> \'0 */2 * january-july mon-fri\', + \'periodic\' -> TRUE, + ), + ) + ); + return $schedulers; +}' +. ''; + + $output .= '

' . t('Read more about crontab syntax: @url_crontab_sintax', array('@url_crontab_sintax' => 'http://linux.die.net/man/5/crontab')) . '

'; + + + return $output; + } +} +// @codingStandardsIgnoreEnd + /** * Collects and returns scheduler info. * + * @param string $name + * Name of the schedule. + * * @see hook_cron_job_scheduler_info() * - * @param $name - * Name of the schedule * @return array * Information for the schedule if $name, all the information if not */ @@ -54,15 +156,14 @@ function job_scheduler_cron() { // Query and dispatch scheduled jobs. // Process a maximum of 200 jobs in a maximum of 30 seconds. $start = time(); - $total = - $failed = 0; + $total = $failed = 0; $jobs = db_select('job_schedule', NULL, array('fetch' => PDO::FETCH_ASSOC)) - ->fields('job_schedule') - ->condition('scheduled', 0) - ->condition('next', REQUEST_TIME, '<=') - ->orderBy('next', 'ASC') - ->range(0, 200) - ->execute(); + ->fields('job_schedule') + ->condition('scheduled', 0) + ->condition('next', REQUEST_TIME, '<=') + ->orderBy('next', 'ASC') + ->range(0, 200) + ->execute(); foreach ($jobs as $job) { $job['data'] = unserialize($job['data']); try { @@ -71,7 +172,7 @@ function job_scheduler_cron() { catch (Exception $e) { watchdog('job_scheduler', $e->getMessage(), array(), WATCHDOG_ERROR); $failed++; - // Drop jobs that have caused exceptions + // Drop jobs that have caused exceptions. JobScheduler::get($job['name'])->remove($job); } $total++; @@ -105,7 +206,7 @@ function job_scheduler_modules_disabled($modules) { } /** - * Rebuild scheduled information after enable/disable modules + * Rebuild scheduled information after enable/disable modules. * * @todo What should we do about missing ones when disabling their module? */ @@ -114,10 +215,9 @@ function job_scheduler_rebuild_all() { } /** - * Rebuild a single scheduler + * Rebuild a single scheduler. */ -function job_scheduler_rebuild_scheduler($name, $info = NULL) { - $info = $info ? $info : job_scheduler_info($name); +function job_scheduler_rebuild_scheduler($name, $info) { if (!empty($info['jobs'])) { $scheduler = JobScheduler::get($name); foreach ($info['jobs'] as $job) { @@ -136,11 +236,12 @@ function job_scheduler_rebuild_scheduler($name, $info = NULL) { */ function job_scheduler_cron_queue_info() { $queue = array(); - foreach (job_scheduler_info() as $name => $info) { + foreach (job_scheduler_info() as $info) { if (!empty($info['jobs']) && !empty($info['queue name'])) { $queue[$info['queue name']] = array( 'worker callback' => 'job_scheduler_cron_queue_worker', - 'time' => 60, // Some reasonable default as we don't know + // Some reasonable default as we don't know. + 'time' => 60, ); } } @@ -148,10 +249,12 @@ function job_scheduler_cron_queue_info() { } /** - * Execute job worker from queue + * Execute job worker from queue. * - * Providing our own worker has the advantage that we can reschedule the job or take care of cleanup - * Note that as we run the execute() action, the job won't be queued again this time. + * Providing our own worker has the advantage that we can reschedule the job or + * take care of cleanup + * Note that as we run the execute() action, the job won't be queued again this + * time. */ function job_scheduler_cron_queue_worker($job) { try { @@ -159,7 +262,7 @@ function job_scheduler_cron_queue_worker($job) { } catch (Exception $e) { watchdog('job_scheduler', $e->getMessage(), array(), WATCHDOG_ERROR); - // Drop jobs that have caused exceptions + // Drop jobs that have caused exceptions. JobScheduler::get($job['name'])->remove($job); } } diff --git a/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/README.md b/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/README.md index b7d36fc5a..1ff269776 100644 --- a/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/README.md +++ b/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/README.md @@ -1,11 +1,62 @@ -Drupal Module: Job Scheduler Trigger -==================================== +CONTENTS OF THIS FILE +--------------------- + + * Introduction + * Requirements + * Installation + * Configuration + * Maintainers + + +INTRODUCTION +------------ + Extension for Job Scheduler to create timed periodic triggers. -This module provides a simple UI to configure trigger name and crontab. We provide no actions, though actions created -by other modules can be set to be triggered with these timers. +This module provides a simple UI to configure trigger name and crontab. +We provide no actions, though actions created by other modules can be set to be +triggered with these timers. Trigger type: job_scheduler -Hook names will be created on the fly for configured triggers as: job_scheduler_1, job_scheduler_2, etc... +Hook names will be created on the fly for configured triggers as: +job_scheduler_1, job_scheduler_2, etc... Jose A. Reyero, http://www.developmentseed.org + + +REQUIREMENTS +------------ + +Requires the following modules: + + * Job Scheduler (https://drupal.org/project/job_scheduler) + * Trigger (https://drupal.org/project/trigger) + + +INSTALLATION +------------ + +Install as you would normally install a contributed Drupal module. See: +https://drupal.org/documentation/install/modules-themes/modules-7 for further +information. + + +CONFIGURATION +------------- + +No menu or modifiable settings. + + +MAINTAINERS +----------- + +Current maintainers: + * Frank Febbraro (febbraro) - https://www.drupal.org/user/43670 + * Renato Gonçalves (RenatoG) - https://www.drupal.org/user/3326031 + * Alex Barth (alex_b) - https://www.drupal.org/user/53995 + * Chris Leppanen (twistor) - https://www.drupal.org/user/473738 + * Florian Weber (webflo) - https://www.drupal.org/user/254778 + * Gabe Sullice (gabesullice) - https://www.drupal.org/user/2287430 + * Jeff Miccolis (jmiccolis) - https://www.drupal.org/user/31731 + * Joachim Noreiko (joachim) - https://www.drupal.org/user/107701 + * makara - https://www.drupal.org/user/132402 diff --git a/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.admin.inc b/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.admin.inc index 584f662ed..24ad95e67 100644 --- a/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.admin.inc +++ b/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.admin.inc @@ -2,7 +2,11 @@ /** * @file - * Job Scheduler Trigger admin pages + * Job Scheduler Trigger admin pages. + */ + +/** + * Admin Overview. */ function job_scheduler_trigger_admin_overview() { $base_path = 'admin/config/system/job_scheduler'; @@ -52,13 +56,18 @@ function job_scheduler_trigger_admin_overview() { return $form; } - /** - * Edit form for a trigger + * Edit form for a trigger. */ function job_scheduler_trigger_edit_form($form, &$form_state, $trigger) { if (!$trigger) { - $trigger = (object)array('trid' => NULL, 'title' => t('New trigger'), 'crontab' => '* * * * *', 'status' => 0, 'last' => 0); + $trigger = (object) array( + 'trid' => NULL, + 'title' => t('New trigger'), + 'crontab' => '* * * * *', + 'status' => 0, + 'last' => 0, + ); } $form['trigger'] = array('#tree' => TRUE); $form['trigger']['trid'] = array('#type' => 'value', '#value' => $trigger->trid); @@ -84,16 +93,16 @@ function job_scheduler_trigger_edit_form($form, &$form_state, $trigger) { '#description' => t('When enabled, a trigger will be created with this crontab and jobs will be scheduled for it. Check everything is OK before enabling the trigger.'), ); $form['trigger']['last'] = array( - '#type' => 'item', - '#title' => t('Last triggered'), - '#markup' => format_date($trigger->last), + '#type' => 'item', + '#title' => t('Last triggered'), + '#markup' => format_date($trigger->last), ); if ($trigger->trid && $trigger->crontab) { $next = job_scheduler_trigger_next_time($trigger->crontab); $form['trigger']['next'] = array( - '#type' => 'item', - '#title' => t('Next trigger'), - '#markup' => $next ? format_date($next) : t('Never in the next year.'), + '#type' => 'item', + '#title' => t('Next trigger'), + '#markup' => $next ? format_date($next) : t('Never in the next year.'), ); } $form['buttons']['update'] = array('#type' => 'submit', '#value' => t('Save')); @@ -106,7 +115,7 @@ function job_scheduler_trigger_edit_form($form, &$form_state, $trigger) { } /** - * Validate trigger + * Validate trigger. */ function job_scheduler_trigger_edit_form_validate($form, &$form_state) { $trigger = $form_state['values']['trigger']; @@ -118,14 +127,14 @@ function job_scheduler_trigger_edit_form_validate($form, &$form_state) { } /** - * Submit trigger + * Submit trigger. */ function job_scheduler_trigger_edit_form_submit($form, &$form_state) { $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : ''; $trigger = $form_state['values']['trigger']; if ($op == t('Save')) { if (empty($trigger['trid'])) { - // Create and then assign trigger name and create trigger + // Create and then assign trigger name and create trigger. drupal_write_record('job_scheduler_trigger', $trigger); $trigger['hook'] = 'job_scheduler_' . $trigger['trid']; drupal_write_record('job_scheduler_trigger', $trigger, 'trid'); @@ -149,7 +158,7 @@ function job_scheduler_trigger_edit_form_submit($form, &$form_state) { } /** - * Quick calculate next time cron + * Quick calculate next time cron. */ function job_scheduler_trigger_next_time($crontab) { $crontab = new JobSchedulerCronTab($crontab); diff --git a/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.info b/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.info index 007ba2877..db5081be0 100644 --- a/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.info +++ b/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.info @@ -1,13 +1,14 @@ name = Job Scheduler Trigger description = Creates scheduler triggers that fire up at certain days, times core = 7.x +# @codingStandardsIgnoreLine php = 5.2 dependencies[] = job_scheduler dependencies[] = trigger - -; Information added by Drupal.org packaging script on 2015-01-21 -version = "7.x-2.0-alpha3+9-dev" +configure = admin/config/system/job_scheduler +; Information added by Drupal.org packaging script on 2017-07-05 +version = "7.x-2.0-alpha3+22-dev" core = "7.x" project = "job_scheduler" -datestamp = "1421848982" +datestamp = "1499280569" diff --git a/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.install b/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.install index 594b67fd5..fa43d5a87 100644 --- a/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.install +++ b/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.install @@ -1,13 +1,18 @@ 'Schedule of triggers to be created.', 'fields' => array( - 'trid' => array( + 'trid' => array( 'description' => 'Primary Key: unique trigger id.', 'type' => 'serial', 'unsigned' => TRUE, diff --git a/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.module b/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.module index f969dc274..7004af27f 100644 --- a/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.module +++ b/dkan/modules/contrib/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.module @@ -2,7 +2,7 @@ /** * @file - * job scheduler module. + * Job scheduler module. */ /** @@ -11,10 +11,12 @@ function job_scheduler_trigger_help($path, $arg) { switch ($path) { case 'admin/structure/trigger/job_scheduler': - // The first line is the very same text trigger module provides. Do not edit. + // The first line is the very same text trigger module provides. Do not + // edit. $output = '

' . t('Triggers are events on your site, such as new content being added or a user logging in. The Trigger module associates these triggers with actions (functional tasks), such as unpublishing content containing certain keywords or e-mailing an administrator. The Actions settings page contains a list of existing actions and provides the ability to create and configure advanced actions (actions requiring configuration, such as an e-mail address or a list of banned words).', array('@url' => url('admin/config/system/actions'))) . '

'; $output .= '

' . t('Below you can assign actions to run on a periodic basis. To create more triggers of this type use the Job Scheduler configuration page.', array('@url' => url('admin/config/system/job_scheduler'))) . '

'; return $output; + case 'admin/config/system/job_scheduler': $output = '

' . t('You can create any number of jobs that are triggered depending on a crontab.') . '

'; $output .= '

' . t('To set actions for these triggers, go to the Job Scheduler Triggers page.', array('@url' => url('admin/structure/trigger/job_scheduler'))) . '

'; @@ -23,7 +25,7 @@ function job_scheduler_trigger_help($path, $arg) { } /** - * Implementation of hook_menu() + * Implements hook_menu(). */ function job_scheduler_trigger_menu() { $items['admin/config/system/job_scheduler'] = array( @@ -34,7 +36,7 @@ function job_scheduler_trigger_menu() { 'file' => 'job_scheduler_trigger.admin.inc', ); $items['admin/config/system/job_scheduler/add'] = array( - 'title' => 'Trigger scheduler', + 'title' => 'Add a new trigger', 'description' => 'Configure timely triggers', 'page callback' => 'drupal_get_form', 'page arguments' => array('job_scheduler_trigger_edit_form', NULL), @@ -53,7 +55,7 @@ function job_scheduler_trigger_menu() { } /** - * Implementation of hook_trigger_info(). + * Implements hook_trigger_info(). */ function job_scheduler_trigger_trigger_info() { $triggers = array(); @@ -67,12 +69,17 @@ function job_scheduler_trigger_trigger_info() { } /** - * Implementation of hook_job_scheduler_info() + * Implements hook_job_scheduler_info(). */ function job_scheduler_trigger_cron_job_scheduler_info() { foreach (job_scheduler_trigger_list() as $trigger) { if ($trigger->status) { - $jobs[$trigger->trid] = array('id' => $trigger->trid, 'type' => $trigger->hook, 'crontab' => $trigger->crontab, 'periodic' => TRUE); + $jobs[$trigger->trid] = array( + 'id' => $trigger->trid, + 'type' => $trigger->hook, + 'crontab' => $trigger->crontab, + 'periodic' => TRUE, + ); } } if (!empty($jobs)) { @@ -85,7 +92,7 @@ function job_scheduler_trigger_cron_job_scheduler_info() { } /** - * Get job list for job scheduler + * Get job list for job scheduler. */ function job_scheduler_trigger_list() { return db_select('job_scheduler_trigger', 't') @@ -95,10 +102,10 @@ function job_scheduler_trigger_list() { } /** - * Fire up a scheduled trigger + * Fire up a scheduled trigger. */ function job_scheduler_trigger_worker($job) { - // Mark last time triggered for the records + // Mark last time triggered for the records. db_update('job_scheduler_trigger') ->fields(array('last' => REQUEST_TIME)) ->condition('trid', $job['id']) @@ -109,14 +116,14 @@ function job_scheduler_trigger_worker($job) { 'hook' => $job['type'], 'job' => $job, ); - // Scheduler's object is the job from job_scheduler - $object = (object)$job; + // Scheduler's object is the job from job_scheduler. + $object = (object) $job; actions_do(array_keys($aids), $object, $context); } } /** - * Menu loader + * Menu loader. */ function job_scheduler_trigger_load($trid) { return db_select('job_scheduler_trigger', 't') diff --git a/dkan/modules/contrib/markdowneditor/PATCHES.txt b/dkan/modules/contrib/markdowneditor/PATCHES.txt index 417541ed5..a51fede20 100644 --- a/dkan/modules/contrib/markdowneditor/PATCHES.txt +++ b/dkan/modules/contrib/markdowneditor/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - http://drupal.org/files/remove-dsm-from-hook-install-2045225-1.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/media/PATCHES.txt b/dkan/modules/contrib/media/PATCHES.txt index 6ad8b7f90..7121143d5 100644 --- a/dkan/modules/contrib/media/PATCHES.txt +++ b/dkan/modules/contrib/media/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/media_dialog_appears_2272567-32.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/media_vimeo/PATCHES.txt b/dkan/modules/contrib/media_vimeo/PATCHES.txt index 804e03144..2a840b039 100644 --- a/dkan/modules/contrib/media_vimeo/PATCHES.txt +++ b/dkan/modules/contrib/media_vimeo/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/no_exception_handling-2446199-1.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/migrate/PATCHES.txt b/dkan/modules/contrib/migrate/PATCHES.txt index 19ab8babf..5a859a715 100644 --- a/dkan/modules/contrib/migrate/PATCHES.txt +++ b/dkan/modules/contrib/migrate/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/migrate-append-map-messages-1989492-10.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/og/PATCHES.txt b/dkan/modules/contrib/og/PATCHES.txt index 7044974c7..6d8858a79 100644 --- a/dkan/modules/contrib/og/PATCHES.txt +++ b/dkan/modules/contrib/og/PATCHES.txt @@ -3,4 +3,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/og_actions-bug-vbo-delete.patch - https://www.drupal.org/files/issues/og-missing-permission-roles-2301831-1.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_ckan/open_data_schema_ckan.info b/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_ckan/open_data_schema_ckan.info index 04baa1126..2af335b40 100644 --- a/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_ckan/open_data_schema_ckan.info +++ b/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_ckan/open_data_schema_ckan.info @@ -6,6 +6,6 @@ dependencies[] = features dependencies[] = open_data_schema_map dependencies[] = pathauto -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_dcat/open_data_schema_dcat.info b/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_dcat/open_data_schema_dcat.info index 99e9a8c9c..05f7771e3 100644 --- a/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_dcat/open_data_schema_dcat.info +++ b/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_dcat/open_data_schema_dcat.info @@ -7,6 +7,6 @@ dependencies[] = open_data_schema_map dependencies[] = open_data_schema_map_xml_output dependencies[] = pathauto -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_map_xml_output/open_data_schema_map_xml_output.info b/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_map_xml_output/open_data_schema_map_xml_output.info index 7732a055c..a3135a148 100644 --- a/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_map_xml_output/open_data_schema_map_xml_output.info +++ b/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_map_xml_output/open_data_schema_map_xml_output.info @@ -4,6 +4,6 @@ core = 7.x package = Open Data dependencies[] = open_data_schema_map -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_pod/open_data_schema_pod.info b/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_pod/open_data_schema_pod.info index d855c2555..75e6952b4 100644 --- a/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_pod/open_data_schema_pod.info +++ b/dkan/modules/contrib/open_data_schema_map/modules/open_data_schema_pod/open_data_schema_pod.info @@ -5,6 +5,6 @@ package = Open Data dependencies[] = features dependencies[] = open_data_schema_map -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/contrib/open_data_schema_map/open_data_schema_map.info b/dkan/modules/contrib/open_data_schema_map/open_data_schema_map.info index 833f413e3..9ac2f6399 100644 --- a/dkan/modules/contrib/open_data_schema_map/open_data_schema_map.info +++ b/dkan/modules/contrib/open_data_schema_map/open_data_schema_map.info @@ -9,6 +9,6 @@ dependencies[] = token files[] = open_data_schema_map.features.inc files[] = test/open_data_schema_map_api.test -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/contrib/panopoly_widgets/PATCHES.txt b/dkan/modules/contrib/panopoly_widgets/PATCHES.txt index bf183e7d7..5a7c73e15 100644 --- a/dkan/modules/contrib/panopoly_widgets/PATCHES.txt +++ b/dkan/modules/contrib/panopoly_widgets/PATCHES.txt @@ -3,4 +3,4 @@ The following patches have been applied to this project: - panopoly_widgets_add_jquery_ui_tabs.patch - panopoly_widgets_overrides_OOB.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/recline/recline.info b/dkan/modules/contrib/recline/recline.info index 6dec4fd80..7635a4bac 100644 --- a/dkan/modules/contrib/recline/recline.info +++ b/dkan/modules/contrib/recline/recline.info @@ -7,6 +7,6 @@ dependencies[] = file scripts[] = js/jsondataview.js scripts[] = js/restdataview.js -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/contrib/ref_field/PATCHES.txt b/dkan/modules/contrib/ref_field/PATCHES.txt index 848a256fc..16dcfbc1f 100644 --- a/dkan/modules/contrib/ref_field/PATCHES.txt +++ b/dkan/modules/contrib/ref_field/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/ref_field-delete-insert-warning-2360019-5.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/remote_file_source/PATCHES.txt b/dkan/modules/contrib/remote_file_source/PATCHES.txt index 794f70b52..407fd3007 100644 --- a/dkan/modules/contrib/remote_file_source/PATCHES.txt +++ b/dkan/modules/contrib/remote_file_source/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/remote_file_source-location-content-dist_1.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/rules/PATCHES.txt b/dkan/modules/contrib/rules/PATCHES.txt index 5d5310796..4d9b0842e 100644 --- a/dkan/modules/contrib/rules/PATCHES.txt +++ b/dkan/modules/contrib/rules/PATCHES.txt @@ -2,4 +2,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/2406863_rules-7-x-2.10-configurable_rules_stampede_protection-126.patch - https://www.drupal.org/files/issues/rules_init_and_cache-2851567-8.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/uuidreference/PATCHES.txt b/dkan/modules/contrib/uuidreference/PATCHES.txt index 51027c5fc..7c765bf02 100644 --- a/dkan/modules/contrib/uuidreference/PATCHES.txt +++ b/dkan/modules/contrib/uuidreference/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/uuidreference-alternative_to_module_invoke_all_implementation_for_query_alter_hook-238875-0.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/views_autocomplete_filters/PATCHES.txt b/dkan/modules/contrib/views_autocomplete_filters/PATCHES.txt index 85fee513b..b04596a6c 100644 --- a/dkan/modules/contrib/views_autocomplete_filters/PATCHES.txt +++ b/dkan/modules/contrib/views_autocomplete_filters/PATCHES.txt @@ -2,4 +2,4 @@ The following patches have been applied to this project: - http://www.drupal.org/files/issues/views_autocomplete_filters-cache-2374709-2.patch - http://www.drupal.org/files/issues/views_autocomplete_filters-content-pane-2317351-4.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/contrib/workbench_moderation/PATCHES.txt b/dkan/modules/contrib/workbench_moderation/PATCHES.txt index 0e15b3485..f6115ed18 100644 --- a/dkan/modules/contrib/workbench_moderation/PATCHES.txt +++ b/dkan/modules/contrib/workbench_moderation/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/workbench_moderation-install-warnings-2360973-3.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/dkan/modules/dkan/dkan_data_dashboard/dkan_data_dashboard.info b/dkan/modules/dkan/dkan_data_dashboard/dkan_data_dashboard.info index aca64658a..c9e253d79 100644 --- a/dkan/modules/dkan/dkan_data_dashboard/dkan_data_dashboard.info +++ b/dkan/modules/dkan/dkan_data_dashboard/dkan_data_dashboard.info @@ -31,6 +31,6 @@ features[views_view][] = data_dashboards features[views_view][] = front_page_dashboards_list features_exclude[dependencies][dkan_topics] = dkan_topics -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/dkan_data_story/dkan_data_story.info b/dkan/modules/dkan/dkan_data_story/dkan_data_story.info index 9528beb1c..8a91899a8 100644 --- a/dkan/modules/dkan/dkan_data_story/dkan_data_story.info +++ b/dkan/modules/dkan/dkan_data_story/dkan_data_story.info @@ -56,6 +56,6 @@ features_exclude[dependencies][strongarm] = strongarm features_exclude[dependencies][taxonomy] = taxonomy no autodetect = 1 -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/dkan_dataset/dkan_dataset.info b/dkan/modules/dkan/dkan_dataset/dkan_dataset.info index 6d022a222..77e91a661 100644 --- a/dkan/modules/dkan/dkan_dataset/dkan_dataset.info +++ b/dkan/modules/dkan/dkan_dataset/dkan_dataset.info @@ -34,6 +34,6 @@ features[features_api][] = api:2 features[variable][] = pathauto_node_dataset_pattern features[variable][] = pathauto_node_resource_pattern -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_content_types/dkan_dataset_content_types.info b/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_content_types/dkan_dataset_content_types.info index 578643325..0a3664685 100644 --- a/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_content_types/dkan_dataset_content_types.info +++ b/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_content_types/dkan_dataset_content_types.info @@ -126,6 +126,6 @@ features_exclude[dependencies][dkan_featured_topics] = dkan_featured_topics features_exclude[field_base][og_group_ref] = og_group_ref features_exclude[field_instance][node-dataset-og_group_ref] = node-dataset-og_group_ref -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_groups/dkan_dataset_groups.info b/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_groups/dkan_dataset_groups.info index ab3acdba1..61af2ca4c 100644 --- a/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_groups/dkan_dataset_groups.info +++ b/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_groups/dkan_dataset_groups.info @@ -78,6 +78,6 @@ features[views_view][] = front_page_group_list features[views_view][] = group_block features[views_view][] = groups_page -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_rest_api/dkan_dataset_rest_api.info b/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_rest_api/dkan_dataset_rest_api.info index 08722c894..471f58f24 100644 --- a/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_rest_api/dkan_dataset_rest_api.info +++ b/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_rest_api/dkan_dataset_rest_api.info @@ -11,6 +11,6 @@ features[features_api][] = api:2 features[services_endpoint][] = dkan_dataset_api mtime = 1417998121 -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_voting/dkan_dataset_voting.info b/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_voting/dkan_dataset_voting.info index 6db9e3938..01ba018d0 100644 --- a/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_voting/dkan_dataset_voting.info +++ b/dkan/modules/dkan/dkan_dataset/modules/dkan_dataset_voting/dkan_dataset_voting.info @@ -18,6 +18,6 @@ features[field_instance][] = node-dataset-field_rating features[variable][] = ajax_comments_node_types features[variable][] = ajax_comments_notify -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/dkan_datastore/dkan_datastore.info b/dkan/modules/dkan/dkan_datastore/dkan_datastore.info index 977c0e557..fe7a46350 100644 --- a/dkan/modules/dkan/dkan_datastore/dkan_datastore.info +++ b/dkan/modules/dkan/dkan_datastore/dkan_datastore.info @@ -23,6 +23,6 @@ files[] = includes/Datastore.inc files[] = includes/DkanDatastore.inc files[] = includes/DkanDatastoreFastImport.inc -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/dkan_datastore/modules/dkan_datastore_api/dkan_datastore_api.info b/dkan/modules/dkan/dkan_datastore/modules/dkan_datastore_api/dkan_datastore_api.info index cf9df65fb..45821ac83 100644 --- a/dkan/modules/dkan/dkan_datastore/modules/dkan_datastore_api/dkan_datastore_api.info +++ b/dkan/modules/dkan/dkan_datastore/modules/dkan_datastore_api/dkan_datastore_api.info @@ -4,6 +4,6 @@ package = DKAN API core = 7.x dependencies[] = services -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/dkan_datastore/modules/dkan_datastore_fast_import/dkan_datastore_fast_import.info b/dkan/modules/dkan/dkan_datastore/modules/dkan_datastore_fast_import/dkan_datastore_fast_import.info index fa1a18b90..b6241c87f 100644 --- a/dkan/modules/dkan/dkan_datastore/modules/dkan_datastore_fast_import/dkan_datastore_fast_import.info +++ b/dkan/modules/dkan/dkan_datastore/modules/dkan_datastore_fast_import/dkan_datastore_fast_import.info @@ -4,6 +4,6 @@ core = 7.x package = DKAN dependencies[] = dkan_datastore -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/dkan_fixtures/modules/dkan_default_content/dkan_default_content.install b/dkan/modules/dkan/dkan_fixtures/modules/dkan_default_content/dkan_default_content.install index c783218c9..0e3e70aa4 100644 --- a/dkan/modules/dkan/dkan_fixtures/modules/dkan_default_content/dkan_default_content.install +++ b/dkan/modules/dkan/dkan_fixtures/modules/dkan_default_content/dkan_default_content.install @@ -60,29 +60,47 @@ function dkan_default_content_import_default_pages() { * Removes all the generated content and disables all enabled migrations. */ function dkan_default_content_disable() { - // Rollback Data Dashboards. - $migration = Migration::getInstance('dkan_default_content_data_dashboards'); - $migration->processRollback(); - // Rollback Data Stories. - $migration = Migration::getInstance('dkan_default_content_data_stories'); - $migration->processRollback(); - // Rollback Visualization Entities. - $migration = Migration::getInstance('dkan_default_content_visualization_entities'); - $migration->processRollback(); - // Rollback Datasets. - $migration = Migration::getInstance('dkan_default_content_datasets'); - $migration->processRollback(); - // Rollback Resources. - $migration = Migration::getInstance('dkan_default_content_resources'); - $migration->processRollback(); - // Rollback Groups. - $migration = Migration::getInstance('dkan_default_content_groups'); - $migration->processRollback(); - // Disable Mirations. - dkan_default_content_migrations_disable(); + // Rollback Default Content Migrations. + $migrations = migrate_migrations(); - // Clear message queue. - drupal_get_messages('status', TRUE); - drupal_get_messages('warning', TRUE); - drupal_set_message('The default content was removed.'); + foreach ($migrations as $name => $migration) { + if (strpos($name, 'dkan_default_content_') !== 0) { + continue; + } + if ($migration) { + $migration->processRollback(); + } + else { + drupal_watchdog( + 'dkan_default_content', + "You are attempting to disable a non existent migration: %migration", array( + '%migration' => $migration, + )); + } + } +} + +/** + * Implements hook_uninstall(). + * + * De-register the dkan_default_content migrations on uninstall. + */ +function dkan_default_content_uninstall() { + $migrations = migrate_migrations(); + + foreach ($migrations as $name => $migration) { + if (strpos($name, 'dkan_default_content_') !== 0) { + continue; + } + if ($migration) { + Migration::deregisterMigration($name); + } + else { + drupal_watchdog( + 'dkan_default_content', + "You are attempting to deregister a non existent migration: %migration", array( + '%migration' => $migration, + )); + } + } } diff --git a/dkan/modules/dkan/dkan_fixtures/modules/dkan_default_content/dkan_default_content.module b/dkan/modules/dkan/dkan_fixtures/modules/dkan_default_content/dkan_default_content.module index 51b18a009..acad8ee0d 100644 --- a/dkan/modules/dkan/dkan_fixtures/modules/dkan_default_content/dkan_default_content.module +++ b/dkan/modules/dkan/dkan_fixtures/modules/dkan_default_content/dkan_default_content.module @@ -58,15 +58,3 @@ function dkan_default_content_migrate_api() { function dkan_default_content_dkan_fixtures_register() { return 'dkan_default_content'; } - -/** - * Deregisters migrations. - */ -function dkan_default_content_migrations_disable() { - Migration::deregisterMigration('dkan_default_content_datasets'); - Migration::deregisterMigration('dkan_default_content_resources'); - Migration::deregisterMigration('dkan_default_content_groups'); - Migration::deregisterMigration('dkan_default_content_visualization_entities'); - Migration::deregisterMigration('dkan_default_content_data_stories'); - Migration::deregisterMigration('dkan_default_content_data_dashboards'); -} diff --git a/dkan/modules/dkan/dkan_migrate_base/dkan_migrate_base.module b/dkan/modules/dkan/dkan_migrate_base/dkan_migrate_base.module index 12d0dc5b3..86e4b0aa6 100644 --- a/dkan/modules/dkan/dkan_migrate_base/dkan_migrate_base.module +++ b/dkan/modules/dkan/dkan_migrate_base/dkan_migrate_base.module @@ -89,7 +89,7 @@ function dkan_migrate_base_create_resource_list_items($endpoint, $file_name) { $dataset_json = $dataset_response->data; } $dataset_data = drupal_json_decode($dataset_json); - $resources = $dataset_data['result']['resources']; + $resources = (array) $dataset_data['result']['resources']; foreach ($resources as $key => $resource) { $resource_ids['result'][] = $resource['id']; } diff --git a/dkan/modules/dkan/dkan_sitewide/dkan_sitewide.info b/dkan/modules/dkan/dkan_sitewide/dkan_sitewide.info index 1a72a1cd1..bbcfbd3c3 100644 --- a/dkan/modules/dkan/dkan_sitewide/dkan_sitewide.info +++ b/dkan/modules/dkan/dkan_sitewide/dkan_sitewide.info @@ -53,6 +53,6 @@ features[variable][] = user_picture_style features[variable][] = user_pictures features[views_view][] = popular_tags -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/dkan_sitewide/modules/dkan_sitewide_panelizer/dkan_sitewide_panelizer.info b/dkan/modules/dkan/dkan_sitewide/modules/dkan_sitewide_panelizer/dkan_sitewide_panelizer.info index 2f3562cd6..c5bc6ff35 100644 --- a/dkan/modules/dkan/dkan_sitewide/modules/dkan_sitewide_panelizer/dkan_sitewide_panelizer.info +++ b/dkan/modules/dkan/dkan_sitewide/modules/dkan_sitewide_panelizer/dkan_sitewide_panelizer.info @@ -18,6 +18,6 @@ features[variable][] = panelizer_node:page_allowed_types features[variable][] = panelizer_node:page_allowed_types_default features[variable][] = panelizer_node:page_default -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/dkan_topics/dkan_topics.info b/dkan/modules/dkan/dkan_topics/dkan_topics.info index 781785416..849bb360a 100755 --- a/dkan/modules/dkan/dkan_topics/dkan_topics.info +++ b/dkan/modules/dkan/dkan_topics/dkan_topics.info @@ -58,6 +58,6 @@ features_exclude[dependencies][dkan_topics] = dkan_topics no autodetect = 1 project path = profiles/dkan/modules/dkan -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/dkan_topics/dkan_topics.module b/dkan/modules/dkan/dkan_topics/dkan_topics.module index 85c922a1a..269893d26 100755 --- a/dkan/modules/dkan/dkan_topics/dkan_topics.module +++ b/dkan/modules/dkan/dkan_topics/dkan_topics.module @@ -65,7 +65,7 @@ function dkan_topics_preprocess_menu_link(&$variables) { $css = ''; foreach ($submenu as $child) { if (isset($child['#href'])) { - $url = explode("/", $child['#href']); + $url = explode("/", $child['#href']); // Prepare term to match menu class. $term = strtolower($child['#title']); $term = str_replace(array('\\', '/', '[', ' '), '-', $term); @@ -176,6 +176,12 @@ function dkan_topics_field_formatter_view($entity_type, $entity, $field, $instan // Custom formatter for topic field. foreach ($items as $delta => $item) { $term = taxonomy_term_load($item['tid']); + if (!$term) { + watchdog('dkan_topics', "Attempt to load missing taxonomy term id: %tid", array( + '%tid' => $item['tid'], + ), WATCHDOG_NOTICE); + continue; + } $url = $base_url . '/search/field_topic/' . pathauto_cleanstring($term->name) . '-' . $term->tid; // Gather icon values if font icon is used. $icons = field_get_items('taxonomy_term', $term, 'field_topic_icon'); diff --git a/dkan/modules/dkan/dkan_topics/modules/dkan_default_topics/dkan_default_topics.info b/dkan/modules/dkan/dkan_topics/modules/dkan_default_topics/dkan_default_topics.info index 5a8ca29eb..6189eeb54 100755 --- a/dkan/modules/dkan/dkan_topics/modules/dkan_default_topics/dkan_default_topics.info +++ b/dkan/modules/dkan/dkan_topics/modules/dkan_default_topics/dkan_default_topics.info @@ -6,6 +6,6 @@ dependencies[] = dkan_topics dependencies[] = taxonomy_fixtures dependencies[] = taxonomy -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/dkan_workflow/dkan_workflow.info b/dkan/modules/dkan/dkan_workflow/dkan_workflow.info index a30b30c20..5548b6161 100644 --- a/dkan/modules/dkan/dkan_workflow/dkan_workflow.info +++ b/dkan/modules/dkan/dkan_workflow/dkan_workflow.info @@ -46,6 +46,6 @@ features[workbench_moderation_transitions][] = published:needs_review features_exclude[dependencies][ctools] = ctools features_exclude[dependencies][dkan_dataset_content_types] = dkan_dataset_content_types -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/open_data_federal_extras/open_data_federal_extras.info b/dkan/modules/dkan/open_data_federal_extras/open_data_federal_extras.info index aa24a25dd..300e352f5 100644 --- a/dkan/modules/dkan/open_data_federal_extras/open_data_federal_extras.info +++ b/dkan/modules/dkan/open_data_federal_extras/open_data_federal_extras.info @@ -28,6 +28,6 @@ features[field_instance][] = node-dataset-field_odfe_investment_uii features[field_instance][] = node-dataset-field_odfe_program_code features[field_instance][] = node-dataset-field_odfe_system_of_records -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/modules/dkan/open_data_schema_map_dkan/open_data_schema_map_dkan.info b/dkan/modules/dkan/open_data_schema_map_dkan/open_data_schema_map_dkan.info index 480d47cd9..14f197920 100644 --- a/dkan/modules/dkan/open_data_schema_map_dkan/open_data_schema_map_dkan.info +++ b/dkan/modules/dkan/open_data_schema_map_dkan/open_data_schema_map_dkan.info @@ -22,6 +22,6 @@ features[open_data_schema_apis][] = dcat_ap_v1_1_dataset features[open_data_schema_apis][] = dcat_v1_1 features[open_data_schema_apis][] = dcat_v1_1_json -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/dkan/test/dkanextension/src/Drupal/DKANExtension/Context/DatasetContext.php b/dkan/test/dkanextension/src/Drupal/DKANExtension/Context/DatasetContext.php index 52c94dcae..76f672c08 100644 --- a/dkan/test/dkanextension/src/Drupal/DKANExtension/Context/DatasetContext.php +++ b/dkan/test/dkanextension/src/Drupal/DKANExtension/Context/DatasetContext.php @@ -36,6 +36,8 @@ public function __construct() { 'attest quality' => 'field_hhs_attestation_quality', 'bureau code' => 'field_odfe_bureau_code', 'license' => 'field_license', + 'doi' => 'field_doi', + 'citation' => 'field_citation', ), array( 'moderation', diff --git a/dkan/test/dkanextension/src/Drupal/DKANExtension/Context/HarvestSourceContext.php b/dkan/test/dkanextension/src/Drupal/DKANExtension/Context/HarvestSourceContext.php index 8f2bf42da..cc5b5eb83 100644 --- a/dkan/test/dkanextension/src/Drupal/DKANExtension/Context/HarvestSourceContext.php +++ b/dkan/test/dkanextension/src/Drupal/DKANExtension/Context/HarvestSourceContext.php @@ -7,6 +7,7 @@ use Behat\Gherkin\Node\PyStringNode; use Behat\Gherkin\Node\TableNode; use Behat\Behat\Hook\Scope\AfterScenarioScope; +use Behat\Behat\Hook\Scope\BeforeScenarioScope; use Behat\Behat\Hook\Scope\BeforeFeatureScope; use Behat\Behat\Hook\Scope\AfterFeatureScope; @@ -95,25 +96,61 @@ public function theHarvestSourceIsHarvested($machine_name) { } /** - * @AfterScenario @harvest_rollback - */ - public function harvestRollback(AfterScenarioScope $event) - { + * @BeforeScenario @harvest + */ + public function harvestSetup(BeforeScenarioScope $event) { + $user = user_load_by_name("sitemanager"); + $sources = array( + "source_one" => "Source one", + "source_two" => "Source two", + ); + + foreach ($sources as $machine_name => $title) { + $user = user_load_by_name("sitemanager"); + $entity = array('type' => 'harvest_source'); + $entity = entity_create('node', $entity); + $wrapper = entity_metadata_wrapper('node', $entity); + $wrapper->title = $title; + $wrapper->status = 1; + $wrapper->field_dkan_harveset_type = 'datajson_v1_1_json'; + $wrapper->field_dkan_harvest_source_uri = 'http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json'; + $wrapper->field_dkan_harvest_machine_name = array( + 'human' => $title, + 'machine' => $machine_name, + ); + if ($user) { + $wrapper->author = $user->uid; + } + if ($machine_name == 'source_two') { + $wrapper->status = 0; + } + $wrapper->save(); + } + } + + /** + * @AfterScenario @harvest + */ + public function harvestTeardown(AfterScenarioScope $event) { $migrations = migrate_migrations(); - $harvest_migrations = array(); + foreach ($migrations as $name => $migration) { - if(strpos($name , 'dkan_harvest') === 0) { + if (strpos($name, 'dkan_harvest') === 0) { $migration = \Migration::getInstance($name); - $migration->processRollback(); + if ($migration) { + $migration->processRollback(); + } } } + + module_load_include('inc', 'devel_generate', 'devel_generate'); + devel_generate_content_kill(array('node_types' => array('harvest_source'))); } /** * @Then the content :content_title should be :status */ - public function theContentShouldBe($content_title, $status) - { + public function theContentShouldBe($content_title, $status) { // Get content by title. $query = new \EntityFieldQuery(); $result = $query->entityCondition('entity_type', 'node') @@ -130,7 +167,8 @@ public function theContentShouldBe($content_title, $status) $content_id = current($content_ids); $content = node_load($content_id, NULL, TRUE); $content_wrapper = entity_metadata_wrapper('node', $content); - } else { + } + else { if ($status != 'deleted') { throw new \Exception("Content with title '$content_title' was not found."); } @@ -144,18 +182,22 @@ public function theContentShouldBe($content_title, $status) throw new \Exception("The status of the content is not '$status'"); } break; + case 'unpublished': if ($content_wrapper->status->value() != NODE_NOT_PUBLISHED) { throw new \Exception("The status of the content is not '$status'"); } break; + case 'orphaned': if (!$content_wrapper->field_orphan->value()) { throw new \Exception("The status of the content is not '$status'"); } break; + default: break; } } + } diff --git a/dkan/test/dkanextension/src/Drupal/DKANExtension/Context/ServicesContext.php b/dkan/test/dkanextension/src/Drupal/DKANExtension/Context/ServicesContext.php index 4aed627bf..a22720bc8 100644 --- a/dkan/test/dkanextension/src/Drupal/DKANExtension/Context/ServicesContext.php +++ b/dkan/test/dkanextension/src/Drupal/DKANExtension/Context/ServicesContext.php @@ -43,6 +43,8 @@ class ServicesContext extends RawDKANContext { 'attest quality' => 'field_hhs_attestation_quality[und]', 'bureau code' => 'field_odfe_bureau_code[und]', 'license' => 'field_license[und][select]', + 'doi' => 'field_doi[und][0][value]', + 'citation' => 'field_citation[und][0][value]', ), ); diff --git a/dkan/test/features/dataset.author.feature b/dkan/test/features/dataset.author.feature index 0153edcb9..e62ab22a7 100644 --- a/dkan/test/features/dataset.author.feature +++ b/dkan/test/features/dataset.author.feature @@ -64,7 +64,7 @@ Feature: Dataset Features | Resource 05 | | Katie | Yes | Dataset 08 | | | Resource 06 | Group 02 | Katie | Yes | Dataset 09 | | - @noworkflow + @noworkflow @dataset_author_1 Scenario: Create dataset as content creator Given I am logged in as "Katie" And I am on "Add Dataset" page @@ -76,7 +76,7 @@ Feature: Dataset Features And I press "Next: Add data" Then I should see "Test Dataset has been created" - @noworkflow + @noworkflow @dataset_author_2 Scenario: Save using Additional Info Given I am logged in as a user with the "content creator" role And I am on "Add Dataset" page diff --git a/dkan/test/features/dkan_harvest.feature b/dkan/test/features/dkan_harvest.feature index 5c5fdf0c2..fc5452845 100644 --- a/dkan/test/features/dkan_harvest.feature +++ b/dkan/test/features/dkan_harvest.feature @@ -1,6 +1,11 @@ # time:3m30.05s @harvest_rollback @disablecaptcha Feature: Dkan Harvest + Background: + Given pages: + | name | url | + | Source one | /harvest_source/source-one | + | Source two | /harvest_source/source-two | @api @javascript Scenario: As a site manager I should be able to add a harvest source. @@ -45,15 +50,11 @@ Feature: Dkan Harvest | role | | authenticated user | - @api + @api @harvest Scenario: As a site manager I should see only the published harvest sources listed on the harvest dashboard. Given users: | name | mail | roles | | Site manager | admin@fakeemail.com | site manager | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site manager | Yes | - | Source two | source_two | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site manager | No | And pages: | name | url | | Harvest Dashboard | /admin/dkan/harvest/dashboard | @@ -62,15 +63,11 @@ Feature: Dkan Harvest Then I should see the text "Source one" And I should not see the text "Source two" - @api @javascript + @api @javascript @harvest Scenario: Delete all associated content when a Source is deleted Given users: | name | mail | status | roles | | Site manager | admin@fakeemail.com | 1 | site manager | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site manager | Yes | - And The "source_one" source is harvested And I am logged in as "Site manager" When I am on "admin/content" @@ -83,17 +80,14 @@ Feature: Dkan Harvest And I press "Delete Sources" And I wait for the batch job to finish Then I should see "Harvest Source Source one has been deleted." + And I wait for "3" seconds And the content "Gold Prices in London 1950-2008 (Monthly) Harvest" should be "deleted" - @api @javascript + @api @javascript @harvest Scenario: Unpublish and mark as orphan all associated content when a Source is deleted Given users: | name | mail | status | roles | | Site manager | admin@fakeemail.com | 1 | site manager | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site Manager | Yes | - And The "source_one" source is harvested And I am logged in as "Site manager" When I am on the "Source one" page @@ -107,15 +101,11 @@ Feature: Dkan Harvest And the content "Gold Prices in London 1950-2008 (Monthly) Harvest" should be "unpublished" And the content "Gold Prices in London 1950-2008 (Monthly) Harvest" should be "orphaned" - @api @javascript + @api @javascript @harvest Scenario: Keep published but mark as orphan all associated content when a Source is deleted Given users: | name | mail | status | roles | | Site Manager | admin@fakeemail.com | 1 | site manager | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site Manager | Yes | - And The "source_one" source is harvested And I am logged in as "Site Manager" When I am on the "Source one" page @@ -129,14 +119,11 @@ Feature: Dkan Harvest And the content "Gold Prices in London 1950-2008 (Monthly) Harvest" should be "published" And the content "Gold Prices in London 1950-2008 (Monthly) Harvest" should be "orphaned" - @api + @api @harvest Scenario: As a user I should have access to see harvest information into dataset node. Given users: | name | mail | roles | | Site Manager | admin@fakeemail.com | site manager | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site Manager | Yes | And I am logged in as a "Site Manager" And I am on the "Source one" page Given The "source_one" source is harvested @@ -150,14 +137,11 @@ Feature: Dkan Harvest And I should see "2016-06-22" in the "Release Date" row And I should see "2016-08-02" in the "Modified Date" row - @api + @api @harvest Scenario: As a user I should have access to see harvest preview information. Given users: | name | mail | roles | | Site Manager | admin@fakeemail.com | site manager | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site Manager | Yes | And I am logged in as a "Site Manager" And I am on the "Source one" page Given The "source_one" source is harvested @@ -167,14 +151,11 @@ Feature: Dkan Harvest And I should see the text "Harvest now" And I should see the text "Florida Bike Lanes Harvest" - @api + @api @harvest Scenario: As a user I should be able to refresh the preview on the Harvest Source. Given users: | name | mail | roles | | Site Manager | admin@fakeemail.com | site manager | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site Manager | Yes | And I am logged in as a "Site Manager" And I am on the "Source one" page Given The "source_one" source is harvested @@ -187,14 +168,11 @@ Feature: Dkan Harvest And I should see the text "Preview" - @api + @api @harvest Scenario Outline: As a user I should have access to the Event log tab on the Harvest Source. Given users: | name | mail | roles | | Site Manager | admin@fakeemail.com | site manager | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site Manager | Yes | And I am logged in as a "" And I am on the "Source one" page Given The "source_one" source is harvested @@ -209,14 +187,11 @@ Feature: Dkan Harvest | role | | site manager | - @api + @api @harvest Scenario Outline: As a user I should see a list of imported datasets on the Harvest Source page. Given users: | name | mail | roles | | Site manager | admin@fakeemail.com | site manager | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site manager | Yes | And The "source_one" source is harvested And I am logged in as a "" And I am on the "Source one" page @@ -227,14 +202,11 @@ Feature: Dkan Harvest | role | | site manager | - @api + @api @harvest Scenario Outline: As user I should see a list of imported datasets in the harvest administration dashboard Given users: | name | mail | roles | | Site manager | admin@fakeemail.com | site manager | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site manager | Yes | And pages: | name | url | | Harvest Dashboard Datasets | /admin/dkan/harvest/dashboard/datasets | @@ -248,14 +220,11 @@ Feature: Dkan Harvest | role | | site manager | - @api @javascript + @api @javascript @harvest Scenario Outline: As user I want to filter harvested datasets by orphan status in the harvest administration dashboard Given users: | name | mail | roles | | Site manager | admin@fakeemail.com | site manager | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site manager | Yes | And pages: | name | url | | Harvest Dashboard Datasets | /admin/dkan/harvest/dashboard/datasets | @@ -270,14 +239,11 @@ Feature: Dkan Harvest | role | | site manager | - @api @javascript + @api @javascript @harvest Scenario Outline: As user I want to filter harvested datasets by post date in the harvest administration dashboard Given users: | name | mail | roles | | Site manager | admin@fakeemail.com | site manager | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site manager | Yes | And pages: | name | url | | Harvest Dashboard Datasets | /admin/dkan/harvest/dashboard/datasets | @@ -296,14 +262,11 @@ Feature: Dkan Harvest | role | | site manager | - @api @javascript + @api @javascript @harvest Scenario Outline: As user I want to filter harvested datasets by updated date in the harvest administration dashboard Given users: | name | mail | roles | | Site manager | admin@fakeemail.com | site manager | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site manager | Yes | And pages: | name | url | | Harvest Dashboard Datasets | /admin/dkan/harvest/dashboard/datasets | @@ -325,14 +288,11 @@ Feature: Dkan Harvest | role | | site manager | - @api @javascript + @api @javascript @harvest Scenario Outline: As user I want to delete harvested datasets in the harvest administration dashboard Given users: | name | mail | roles | | Site manager | admin@fakeemail.com | site manager | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Site manager | Yes | And pages: | name | url | | Harvest Dashboard Datasets | /admin/dkan/harvest/dashboard/datasets | diff --git a/dkan/test/features/workflow.feature b/dkan/test/features/workflow.feature index 849edf1f2..6b877d233 100644 --- a/dkan/test/features/workflow.feature +++ b/dkan/test/features/workflow.feature @@ -444,15 +444,11 @@ Feature: And I click "Edit" Then the checkbox "editor" should be checked - @api @javascript @harvest_rollback + @api @javascript @harvest Scenario: Check harvested datasets are published by default even when dkan_workflow is enabled. Given users: | name | mail | status | roles | | Administrator | admin@fakeemail.com | 1 | administrator | - And harvest sources: - | title | machine name | source uri | type | author | published | - | Source one | source_one | http://s3.amazonaws.com/dkan-default-content-files/files/data_harvest.json | datajson_v1_1_json | Administrator | Yes | - And The "source_one" source is harvested And the content "Gold Prices in London 1950-2008 (Monthly) Harvest" should be "published" diff --git a/dkan/themes/nuboot_radix/nuboot_radix.info b/dkan/themes/nuboot_radix/nuboot_radix.info index 8307a0e4e..c67b8ebb2 100644 --- a/dkan/themes/nuboot_radix/nuboot_radix.info +++ b/dkan/themes/nuboot_radix/nuboot_radix.info @@ -56,6 +56,6 @@ settings[toggle_main_menu] = 1 settings[toggle_secondary_menu] = 1 settings[copyright][format] = 'html' -; Information added by DKAN release script on 6/30/2017 -version = 7.x-1.13.4 +; Information added by DKAN release script on 7/14/2017 +version = 7.x-1.13.5 project = dkan diff --git a/docroot/PATCHES.txt b/docroot/PATCHES.txt index 6d974c878..376c8ee9a 100644 --- a/docroot/PATCHES.txt +++ b/docroot/PATCHES.txt @@ -3,4 +3,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/drupal-undefinedindex_fileupload-1903010-4.patch - https://www.drupal.org/files/issues/file.remote-file_save.628094.22.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/docroot/sites/all/modules/contrib/features_master/PATCHES.txt b/docroot/sites/all/modules/contrib/features_master/PATCHES.txt index 6eee31b98..ebe2ec7c3 100644 --- a/docroot/sites/all/modules/contrib/features_master/PATCHES.txt +++ b/docroot/sites/all/modules/contrib/features_master/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/2775681-4-only-revert-if-defined.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file diff --git a/docroot/sites/all/modules/contrib/memcache/PATCHES.txt b/docroot/sites/all/modules/contrib/memcache/PATCHES.txt index dd716ed13..904eea7a0 100644 --- a/docroot/sites/all/modules/contrib/memcache/PATCHES.txt +++ b/docroot/sites/all/modules/contrib/memcache/PATCHES.txt @@ -1,4 +1,4 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/undefined-function-dmemcache_object_cluster-2856140-8.patch -This file was automatically generated by Drush Make (http://drupal.org/project/drush). +This file was automatically generated by Drush Make (http://drupal.org/project/drush). \ No newline at end of file