mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-25 21:32:51 +09:00
Support PNG and SVG icon sets for point level icons #1739
This commit is contained in:
parent
f1c839042c
commit
f2ff393592
5 changed files with 29 additions and 4 deletions
|
|
@ -102,6 +102,27 @@ class pointAdminController extends point
|
|||
|
||||
// Set the level icon
|
||||
$config->level_icon = $args->level_icon;
|
||||
$config->level_icon_type = 'gif';
|
||||
$level_icon_dir = $this->module_path . '/icons/' . $config->level_icon;
|
||||
if (!file_exists($level_icon_dir))
|
||||
{
|
||||
return new BaseObject(-1, 'msg_level_icon_not_found');
|
||||
}
|
||||
if (!file_exists($level_icon_dir . '/1.gif'))
|
||||
{
|
||||
if (file_exists($level_icon_dir . '/1.png'))
|
||||
{
|
||||
$config->level_icon_type = 'png';
|
||||
}
|
||||
elseif (file_exists($level_icon_dir . '/1.svg'))
|
||||
{
|
||||
$config->level_icon_type = 'svg';
|
||||
}
|
||||
else
|
||||
{
|
||||
return new BaseObject(-1, 'msg_level_icon_not_found');
|
||||
}
|
||||
}
|
||||
|
||||
// Check if downloads are not allowed
|
||||
$config->disable_download = ($args->disable_download === 'Y') ? 'Y' : 'N';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue