-
Notifications
You must be signed in to change notification settings - Fork 11
Settings enforcer #7
base: main
Are you sure you want to change the base?
Conversation
I would accept And this is before having looked at the code, but what does The |
foreach ($this->settings as $key => $value) { | ||
Simply_Static\Options::instance()->set($key, $value); | ||
} | ||
Simply_Static\Options::instance()->save(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to save this back to the database, right? We cannot use a runtime instance in memory to finish the process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No we don't, but I strongly think we should. And actually we can't 'not do it' easily since the Options::instance()
is being saved lots of times during several 'native tasks'.
Plus it would be weird if we're enforcing settings from the code, and someone is able to update the UI settings and they would appear to be saved. If you save, and it immediately reverts back to whatever is enforced, that would make more sense to me. There might be other options, but when using this in practice, it felt pretty natural.
Yep, that's what I'm saying. But we would have to think about this a bit more and I think it's not necessary right not to have this feature in the first release.
You can exclude URLs from being 'indexed' or you can exclude them from being followed. It replicates the settings UI of the plugin.
In this 'example' it does. If we're going to abstract/normalize it, stuff will probably change, so would have to think about it if this would make sense. |
First version without any settings 'normalization', so takes only Simply Static settings and applies them. Testend and seems to work fine, also with modifying stuff in
Archiver
.For now this would be used as...
... although I'd prefer to make this a bit more user friendly if we're going forward with this. Any thoughts?