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

Issues 633 634-MOODLE_402_STABLE #638

Closed

Conversation

petersistrom
Copy link
Contributor

Resolves #633 and #634

@@ -110,6 +110,9 @@
new lang_string('settings:tokenexpirywarnperiod', 'tool_objectfs'),
'', 60 * DAYSECS, DAYSECS));

$settings->add(new admin_setting_configcheckbox('tool_objectfs/preferexternal',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why have the settings changed?

$path = $this->get_external_path_from_hash($contenthash, false);

if ($contenthash === sha1('') && is_dir($path)) {
// Explicitly check if it is a directory, handle empty files as normal.
// We handle these virtually.
return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be better to simply say no this file isn't readable externally, so false here? get_external_path_from_hash is more expensive so I think this should come after the sha1 test like it was

@petersistrom
Copy link
Contributor Author

Created new pr #639

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

Successfully merging this pull request may close these issues.

Preferexternal setting is under test settings
2 participants