Skip to content

Conversation

Ruslan-Aleev
Copy link
Collaborator

@Ruslan-Aleev Ruslan-Aleev commented Sep 22, 2020

What does it do?

Same as in #15232 but for the 3.x branch.

Added a check for the existence of a file when uploading it.
In the current version, if the file names match, then the file will be overwritten.

files_check

Related issue(s)/PR(s)

#15232
#8371
#14641

@cla-bot cla-bot bot added the cla-signed CLA confirmed for contributors to this PR. label Sep 22, 2020
Copy link
Contributor

@JoshuaLuckers JoshuaLuckers left a comment

Choose a reason for hiding this comment

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

Please add the system setting that's introduced in PR #15285.

@Ruslan-Aleev
Copy link
Collaborator Author

@JoshuaLuckers I forgot about PR completely, added a setting, check :)

Comment on lines 1734 to 1741
$settings['upload_file_exists']->fromArray(array (
'key' => 'upload_file_exists',
'value' => '1',
'xtype' => 'combo-boolean',
'namespace' => 'core',
'area' => 'file',
'editedon' => null,
), '', true, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$settings['upload_file_exists']->fromArray(array (
'key' => 'upload_file_exists',
'value' => '1',
'xtype' => 'combo-boolean',
'namespace' => 'core',
'area' => 'file',
'editedon' => null,
), '', true, true);
$settings['upload_file_exists']->fromArray([
'key' => 'upload_file_exists',
'value' => true,
'xtype' => 'combo-boolean',
'namespace' => 'core',
'area' => 'file',
'editedon' => null,
], '', true, true);

@JoshuaLuckers
Copy link
Contributor

I believe it's better to have the markup be part of the lexicon.

@Ibochkarev Ibochkarev added this to the v3.0.0-alpha3 milestone Feb 19, 2021
@Ibochkarev Ibochkarev added the pr/review-needed Pull request requires review and testing. label Feb 19, 2021
@opengeek opengeek changed the title 3.x Added check that the file exists when uploading it Added check that the file exists when uploading it Feb 23, 2021
@opengeek opengeek changed the title Added check that the file exists when uploading it Add check that the file exists when uploading it Feb 23, 2021
@opengeek opengeek dismissed JoshuaLuckers’s stale review March 2, 2021 21:04

I believe the requested change was made.

@opengeek opengeek merged commit d463e3f into modxcms:3.x Mar 2, 2021
@Ruslan-Aleev Ruslan-Aleev deleted the 3.x-pr-15232 branch April 14, 2021 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed CLA confirmed for contributors to this PR. pr/review-needed Pull request requires review and testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants