Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
f8ba4271
Commit
f8ba4271
authored
Apr 14, 2014
by
Robert Lyon
Committed by
Gerrit Code Review
Apr 14, 2014
Browse files
Merge "Allow to delete google and local fonts Bug #1297510"
parents
a32e9fcc
63227a77
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/admin/site/font/delete.php
View file @
f8ba4271
...
...
@@ -24,14 +24,15 @@ if (!get_config('skins')) {
throw
new
FeatureNotEnabledException
();
}
$font
=
param_alphanum
(
'font'
);
$font
=
param_alphanum
ext
(
'font'
);
$fontdata
=
null
;
$fontdata
=
get_record
(
'skin_fonts'
,
'name'
,
$font
);
if
(
$fontdata
==
false
)
{
throw
new
AccessDeniedException
(
"Font not found"
);
}
if
(
$fontdata
->
fonttype
!=
'site'
)
{
// Admins can not delete 'common' fonts
if
(
$fontdata
->
fonttype
==
'common'
)
{
throw
new
AccessDeniedException
(
"Cannot delete this font"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment