mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-22 11:52:14 +09:00
modify auto changed to favicon.ico or mobicon.png
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9446 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
485b163319
commit
05550891b2
3 changed files with 19 additions and 25 deletions
|
|
@ -172,11 +172,11 @@
|
|||
|
||||
//파비콘
|
||||
$favicon = Context::get('favicon');
|
||||
$this->saveIcon($favicon);
|
||||
$this->saveIcon($favicon,'favicon.ico');
|
||||
|
||||
//모바일아이콘
|
||||
$mobicon = Context::get('mobicon');
|
||||
$this->saveIcon($mobicon);
|
||||
$this->saveIcon($mobicon,'mobicon.png');
|
||||
|
||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||
}
|
||||
|
|
@ -215,15 +215,13 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
function saveIcon($icon){
|
||||
function saveIcon($icon,$iconname){
|
||||
$mobicon_size = array('57','114');
|
||||
$iconname = $icon['name'];
|
||||
$target_file = $icon['tmp_name'];
|
||||
$type = $icon['type'];
|
||||
$target_filename = _XE_PATH_.'files/attach/xeicon/'.$iconname;
|
||||
|
||||
list($width, $height, $type_no, $attrs) = @getimagesize($target_file);
|
||||
|
||||
if($iconname == 'favicon.ico' && preg_match('/^.*(icon).*$/',$type)){
|
||||
$fitHeight = $fitWidth = '16';
|
||||
} else if($iconname == 'mobicon.png' && preg_match('/^.*(png).*$/',$type) && in_array($height,$mobicon_size) && in_array($width,$mobicon_size)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue