Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplytest-3195870
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
simplytest-3195870
Commits
a9fde2f9
Commit
a9fde2f9
authored
3 years ago
by
Ofer Shaal
Browse files
Options
Downloads
Patches
Plain Diff
Update deprecated code
parent
824a7c12
No related branches found
Branches containing commit
Tags
7.x-1.4-beta1
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
themes/simplytest_theme/theme-settings.php
+2
-1
2 additions, 1 deletion
themes/simplytest_theme/theme-settings.php
with
2 additions
and
1 deletion
themes/simplytest_theme/theme-settings.php
+
2
−
1
View file @
a9fde2f9
<?php
use
Drupal\Core\File\FileSystemInterface
;
use
Drupal\Core\Form\FormStateInterface
;
use
Drupal\file\Entity\File
;
...
...
@@ -37,7 +38,7 @@ function _simplytest_theme_header_bg_validate($element, FormStateInterface $form
global
$base_url
;
$validators
=
array
(
'file_validate_extensions'
=>
array
(
'png gif jpg jpeg apng svg'
));
$files
=
file_save_upload
(
'header_bg'
,
$validators
,
"public://"
,
NULL
,
F
ILE_
EXISTS_REPLACE
);
$files
=
file_save_upload
(
'header_bg'
,
$validators
,
"public://"
,
NULL
,
F
ileSystemInterface
::
EXISTS_REPLACE
);
if
(
!
empty
(
$files
))
{
// change file's status from temporary to permanent and update file database
...
...
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