Skip to content

Commit caf7cdc

Browse files
committed
Add an update script to adjust the default behavior after upgrading
1 parent 0ae2272 commit caf7cdc

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

com.woltlab.wcf/package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,6 @@
5656
<instruction type="database" run="standalone">acp/database/update_com.woltlab.wcf_62_step1.php</instruction>
5757
<instruction type="script">acp/update_com.woltlab.wcf_6.2_contactOptions.php</instruction>
5858
<instruction type="database" run="standalone">acp/database/update_com.woltlab.wcf_62_step2.php</instruction>
59+
<instruction type="script">acp/update_com.woltlab.wcf_6.2_option.php</instruction>
5960
-->
6061
</package>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace wcf\acp;
4+
5+
use wcf\data\option\OptionEditor;
6+
7+
/**
8+
* Opt-out of the new image conversion and EXIF removal feature if the settings
9+
* for the image autoscaling is set to preserve the file type. This isn’t
10+
* exactly the same but still close enough as a preset.
11+
*/
12+
13+
if (\ATTACHMENT_IMAGE_AUTOSCALE_FILE_TYPE !== 'keep') {
14+
return;
15+
}
16+
17+
OptionEditor::import([
18+
'image_convert_format' => 'keep',
19+
'image_strip_exif' => 0,
20+
]);

0 commit comments

Comments
 (0)