mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-23 04:12:18 +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
|
|
@ -92,7 +92,7 @@
|
|||
<img src="{$favicon_url}" alt="favicon" width="16" height="16" class="fn1">
|
||||
<img src="{$favicon_url}" alt="favicon Image" width="16" height="16" class="fn2">
|
||||
</p>
|
||||
<button type="button" onclick="javascript:deleteIcon('favicon\.ico')" class="x_btn x_btn-link">{$lang->cmd_delete}</button>
|
||||
<input type="checkbox" name="is_delete_favicon" value="1" /> {$lang->cmd_delete}
|
||||
<input type="file" name="favicon" id="favicon" title="favicon" />
|
||||
<span class="x_help-block">{$lang->about_use_favicon}</span>
|
||||
</div>
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
<img src="{$mobicon_url}" alt="Mobile Home Icon" width="32" height="32" />
|
||||
<span>www</span>
|
||||
</p>
|
||||
<button type="button" onclick="javascript:deleteIcon('mobicon\.png')" class="x_btn x_btn-link">{$lang->cmd_delete}</button>
|
||||
<input type="checkbox" name="is_delete_mobicon" value="1" /> {$lang->cmd_delete}
|
||||
<input type="file" name="mobicon" id="mobicon" title="Mobile Home Icon"/>
|
||||
<span class="x_help-block">{$lang->detail_use_mobile_icon}</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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