Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
aa19346c
Unverified
Commit
aa19346c
authored
2 years ago
by
DaveD
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #25498 from seamuslee001/5.59
[REF] Use Civi::statics in CRM_Utils_File instead of php static
parents
652617f4
1f5b298e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Utils/File.php
+3
-3
3 additions, 3 deletions
CRM/Utils/File.php
with
3 additions
and
3 deletions
CRM/Utils/File.php
+
3
−
3
View file @
aa19346c
...
...
@@ -352,8 +352,7 @@ class CRM_Utils_File {
* @return bool
*/
public
static
function
isExtensionSafe
(
$ext
)
{
static
$extensions
=
NULL
;
if
(
!
$extensions
)
{
if
(
!
isset
(
Civi
::
$statics
[
__CLASS__
][
'file_extensions'
]))
{
$extensions
=
CRM_Core_OptionGroup
::
values
(
'safe_file_extension'
,
TRUE
);
// make extensions to lowercase
...
...
@@ -370,9 +369,10 @@ class CRM_Utils_File {
unset
(
$extensions
[
'html'
]);
unset
(
$extensions
[
'htm'
]);
}
Civi
::
$statics
[
__CLASS__
][
'file_extensions'
]
=
$extensions
;
}
// support lower and uppercase file extensions
return
(
bool
)
isset
(
$
extensions
[
strtolower
(
$ext
)]);
return
(
bool
)
isset
(
Civi
::
$statics
[
__CLASS__
][
'file_
extensions
'
]
[
strtolower
(
$ext
)]);
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment