Skip to content

Commit

Permalink
Merge pull request #15047 from eileenmcnaughton/pptx
Browse files Browse the repository at this point in the history
dev/core#1190 Add pptx to safe file types
  • Loading branch information
seamuslee001 authored Aug 17, 2019
2 parents 86b0454 + 14629f6 commit 40a5085
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 35 deletions.
14 changes: 13 additions & 1 deletion CRM/Upgrade/Incremental/php/FiveSeventeen.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
* @param string $rev
*/
public function upgrade_5_17_alpha1($rev) {
$this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev);
$this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
$this->addTask('Update smart groups where jcalendar fields have been converted to datepicker', 'updateSmartGroups', [
'datepickerConversion' => [
'contribution_recur_start_date',
Expand All @@ -102,6 +102,18 @@ public function upgrade_5_17_alpha1($rev) {
'contribution_recur_failure_retry_date',
],
]);
$this->addTask(ts('Add pptx to accepted attachment file types'), 'updateFileTypes');
}

/**
* Update safe file types.
*/
public function updateFileTypes() {
CRM_Core_BAO_OptionValue::ensureOptionValueExists([
'safe_file_extension',
['label' => 'pptx', 'name' => 'pptx'],
]);
return TRUE;
}

}
70 changes: 36 additions & 34 deletions sql/civicrm_generated.mysql

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions xml/templates/civicrm_data.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ VALUES
(@option_group_id_sfe, 'xlsx', 13, 'xlsx', NULL, 0, 0, 13, NULL, 0, 0, 1, NULL, NULL, NULL),
(@option_group_id_sfe, 'odt', 14, 'odt', NULL, 0, 0, 14, NULL, 0, 0, 1, NULL, NULL, NULL),
(@option_group_id_sfe, 'ics', 15, 'ics', NULL, 0, 0, 15, NULL, 0, 0, 1, NULL, NULL, NULL),
(@option_group_id_sfe, 'pptx', 16, 'pptx', NULL, 0, 0, 16, NULL, 0, 0, 1, NULL, NULL, NULL),

(@option_group_id_we, '{ts escape="sql"}Textarea{/ts}', 1, 'Textarea', NULL, 0, NULL, 1, NULL, 0, 1, 1, NULL, NULL, NULL),
(@option_group_id_we, 'CKEditor', 2, 'CKEditor', NULL, 0, NULL, 2, NULL, 0, 1, 1, NULL, NULL, NULL),
Expand Down

0 comments on commit 40a5085

Please sign in to comment.