An abstracted save function could be used when submitting the configuration settings form and when reverting or rebuilding a feature.

CommentFileSizeAuthor
#1 encrypt-save-config-2354423-0.patch4.74 KBrlhawk

Comments

rlhawk’s picture

StatusFileSize
new4.74 KB

Here's a patch. This change is needed for exporting configurations using the Features module.

rlhawk’s picture

I don't know why automated tests didn't run on this patch, but they all passed when I ran tests locally.

dmsmidt’s picture

Status: Active » Needs review
dmsmidt’s picture

+++ b/encrypt.module
@@ -308,6 +308,56 @@ function encrypt_get_default_config($reset = FALSE) {
+  // If the changed field is empty, set it to the request time.
+  if (empty($fields['changed'])) {
+    $fields['changed'] = REQUEST_TIME;
+  }

Why only set the changed date when it is empty? It should be updated on every save right?

rlhawk’s picture

If the configuration is being saved due to the reversion of a Feature, the changed date in the feature should be used and not the current date.

dmsmidt’s picture

Ok! Thanks. Testing the patches.

mrharolda’s picture

Status: Needs review » Reviewed & tested by the community
Related issues: +#2281341: Integration with Features to allow for settings export

Looks good, works great!

I tested it in combination with #2281341: Integration with Features to allow for settings export.

mrharolda’s picture

Category: Task » Feature request

  • rlhawk committed 327155a on 7.x-2.x
    Issue #2354423 by rlhawk: Create function for saving a configuration.
    
rlhawk’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.