mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
when submit, favicon, mobicon delete also
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12539 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
1d08b7b71a
commit
7b0c09b083
2 changed files with 12 additions and 5 deletions
|
|
@ -237,12 +237,14 @@ class installAdminController extends install
|
|||
$this->setModulesConfig($config);
|
||||
|
||||
//파비콘
|
||||
$isDeleteFavicon = Context::get('is_delete_favicon');
|
||||
$favicon = Context::get('favicon');
|
||||
$this->saveIcon($favicon,'favicon.ico');
|
||||
$this->saveIcon($favicon,'favicon.ico', $isDeleteFavicon);
|
||||
|
||||
//모바일아이콘
|
||||
$isDeleteMobicon = Context::get('is_delete_mobicon');
|
||||
$mobicon = Context::get('mobicon');
|
||||
$this->saveIcon($mobicon,'mobicon.png');
|
||||
$this->saveIcon($mobicon,'mobicon.png', $isDeleteMobicon);
|
||||
|
||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||
}
|
||||
|
|
@ -285,13 +287,18 @@ class installAdminController extends install
|
|||
return $output;
|
||||
}
|
||||
|
||||
function saveIcon($icon,$iconname)
|
||||
function saveIcon($icon, $iconname, $isDelete = false)
|
||||
{
|
||||
$mobicon_size = array('57','114');
|
||||
$target_file = $icon['tmp_name'];
|
||||
$type = $icon['type'];
|
||||
$target_filename = _XE_PATH_.'files/attach/xeicon/'.$iconname;
|
||||
|
||||
if($isDelete && is_readable($target_filename))
|
||||
{
|
||||
@FileHandler::removeFile($target_filename);
|
||||
}
|
||||
|
||||
list($width, $height, $type_no, $attrs) = @getimagesize($target_file);
|
||||
if($iconname == 'favicon.ico' && preg_match('/^.*(icon).*$/',$type))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue