mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-30 07:42:11 +09:00
이미지 링크 컴포넌트 - 오류 수정한 것 (sandbox 리비전 r5381 이후에 수정된 것인데, r5381 이전에 수정한 것으로 생긴 문제점 수정)
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5402 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f5f3136470
commit
995c29ecd2
2 changed files with 14 additions and 5 deletions
|
|
@ -66,8 +66,10 @@
|
|||
$attr_output[] = "title=\"".$alt."\"";
|
||||
}
|
||||
if($margin) {
|
||||
$style = preg_replace('/margin[: 0-9a-z]+\;/i','', $style);
|
||||
$style .= 'margin:'.$margin.'px;';
|
||||
$style = trim(preg_replace('/margin[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
|
||||
$style = str_replace(';;',';',$style);
|
||||
if($style == ';') $style = '';
|
||||
$style .= ' margin:'.$margin.'px;';
|
||||
}
|
||||
if($align) $attr_output[] = "align=\"".$align."\"";
|
||||
|
||||
|
|
@ -75,7 +77,12 @@
|
|||
|
||||
if($width) $attr_output[] = 'width="'.$width.'"';
|
||||
if($height) $attr_output[] = 'height="'.$height.'"';
|
||||
if($border) $attr_output[] = 'border="'.$border.'"';
|
||||
if($border) {
|
||||
$style = trim(preg_replace('/border[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
|
||||
$style = str_replace(';;',';',$style);
|
||||
if($style == ';') $style = '';
|
||||
$style .= ' border-style: solid; border-width:'.$border.'px;';
|
||||
}
|
||||
|
||||
$code = sprintf("<img %s style=\"%s\" />", implode(' ',$attr_output), $style);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue