Commit 63227a77 authored by Son Nguyen's avatar Son Nguyen
Browse files

Allow to delete google and local fonts Bug #1297510



Change-Id: Idc78d7393a1fbf7637a2767e839fba04d3bbc2ab
Signed-off-by: default avatarSon Nguyen <son.nguyen@catalyst.net.nz>
parent 3fd420f9
......@@ -24,14 +24,15 @@ if (!get_config('skins')) {
throw new FeatureNotEnabledException();
}
$font = param_alphanum('font');
$font = param_alphanumext('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");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment