Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't make the user choose whether they are using Fedora #34

Open
mjordan opened this issue Sep 2, 2020 · 2 comments
Open

Don't make the user choose whether they are using Fedora #34

mjordan opened this issue Sep 2, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@mjordan
Copy link
Owner

mjordan commented Sep 2, 2020

Instead, check whether $flysystem['fcrepo'] (or whatever) is set. Or, to check the files_managed table to see if there are any files that use the fedora:// URIs.

@mjordan mjordan added the enhancement New feature or request label Sep 2, 2020
@mjordan mjordan self-assigned this Sep 2, 2020
@mjordan
Copy link
Owner Author

mjordan commented Sep 3, 2020

Also, while grep -r use_drupal_urls * results in the expected results, grep -r use_fedora_urls * results in a single hit. WTF? This should be removed.

@mjordan
Copy link
Owner Author

mjordan commented Sep 4, 2020

One way of determining if fedora is being used is to query the file_managed table for uris starting with 'fedora://':

select count(*) from file_managed where uri like "fedora://%"

Maybe this could be run in the .install file to set the default for the "Use Fedora URLs" admin setting. That way, we can avoid excessive db queries and also let admins override that setting if they need to (but we should add a description to the widget to say they should not change the value unless they know what they're doing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant