Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory
Commits
bf2dfa7b
Unverified
Commit
bf2dfa7b
authored
5 years ago
by
Côme Chilliet
Browse files
Options
Download
Patches
Plain Diff
fix(geticon) Produce clear PHP error when icon is not found
issue
#6073
parent
8943aa4d
dev
6342-update-the-locales-for-1-5
6344-template-issue-when-creating-a-template-with-empty-password-error-message-should-not-be-seen
6365-core-locking-mechanism-is-not-changing-the-mail-ressource-it-does-lock-the-mail-account
6365-core-when-lock-mechanism-is-trigger-the-user-should-not-be-editable-if-not-unlock
6378-orcid-test-method-is-wrong-and-break-orcid-saving
6388-clear-the-tokens-storage-issues-into-the-fusiondirectory-configuration-backend
core-php8
master
fusiondirectory-1.5
fusiondirectory-1.4
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
html/geticon.php
+6
-2
html/geticon.php
include/class_IconTheme.inc
+1
-0
include/class_IconTheme.inc
with
7 additions
and
2 deletions
+7
-2
html/geticon.php
+
6
−
2
View file @
bf2dfa7b
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2013-20
16
FusionDirectory
Copyright (C) 2013-20
20
FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -39,7 +39,11 @@ if (!isset($_GET['context']) || !isset($_GET['icon']) || !isset($_GET['size']))
trigger_error
(
'Missing information in query string: '
.
$_SERVER
[
'QUERY_STRING'
]);
exit
;
}
$src
=
IconTheme
::
findThemeIcon
(
$theme
,
$_GET
[
'context'
],
$_GET
[
'icon'
],
$_GET
[
'size'
]);
$src
=
IconTheme
::
findThemeIcon
(
$theme
,
$_GET
[
'context'
],
$_GET
[
'icon'
],
$_GET
[
'size'
]);
if
(
$src
===
NULL
)
{
trigger_error
(
'Could not find icon for '
.
$_SERVER
[
'QUERY_STRING'
]);
exit
;
}
header
(
"Content-Type: image/png"
);
if
(
isset
(
$_GET
[
'disabled'
])
&&
$_GET
[
'disabled'
])
{
...
...
This diff is collapsed.
Click to expand it.
include/class_IconTheme.inc
+
1
−
0
View file @
bf2dfa7b
...
...
@@ -227,6 +227,7 @@ class IconTheme
static
public
function
findThemeIcon
(
$theme
,
$context
,
$icon
,
$size
)
{
if
(
!
isset
(
$_SESSION
[
static
::
$session_var
]))
{
trigger_error
(
'Error: no theme found in session'
);
die
(
'Error: no theme found in session'
);
}
if
(
isset
(
$_SESSION
[
static
::
$session_var
][
$theme
]))
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets