Icon::GetSize()
@@ -99,8 +99,7 @@ | ||
99 | 99 | |
100 | 100 | //アイコンと名前を設定 |
101 | 101 | $str .= sprintf($stack->image, |
102 | - $path, self::ConvertImageLine($user->profile), $user->color, | |
103 | - Icon::GetTag(), $mouse, | |
102 | + $path, self::ConvertImageLine($user->profile), $user->color, Icon::GetSize(), $mouse, | |
104 | 103 | $td_header, $user->color, Message::SYMBOL, $user->handle_name |
105 | 104 | ); |
106 | 105 |
@@ -759,7 +758,7 @@ | ||
759 | 758 | //プレイヤーアイコンタグ |
760 | 759 | private static function GetPlayerImage() { |
761 | 760 | return <<<EOF |
762 | -<img src="%s" alt="icon" title="%s" style="border-color:%s;" %s%s></td> | |
761 | +<img src="%s" alt="icon" title="%s" style="border-color:%s;"%s%s></td> | |
763 | 762 | %s<span class="symbol" style="color:%s;">%s</span>%s |
764 | 763 | EOF; |
765 | 764 | } |
@@ -19,19 +19,19 @@ | ||
19 | 19 | //ユーザアイコン生成 |
20 | 20 | public static function GenerateIcon(User $user) { |
21 | 21 | return sprintf(self::GetIcon(), |
22 | - Icon::GetFile($user->icon_filename), $user->color, Icon::GetTag() | |
22 | + Icon::GetFile($user->icon_filename), $user->color, Icon::GetSize() | |
23 | 23 | ); |
24 | 24 | } |
25 | 25 | |
26 | 26 | //ユーザアイコンサイズ属性生成 |
27 | 27 | public static function GenerateIconSize($width, $height) { |
28 | - return sprintf('width="%d" height="%d"', $width, $height); | |
28 | + return HTML::GenerateAttribute('width', $width) . HTML::GenerateAttribute('height', $height); | |
29 | 29 | } |
30 | 30 | |
31 | 31 | //投票画面用アイコン出力 |
32 | 32 | public static function OutputVoteIcon(User $user, $path, $checkbox) { |
33 | 33 | Text::Printf(self::GetVoteIcon(), |
34 | - $user->id, $path, $user->color, Icon::GetTag(), $user->color, Message::SYMBOL, | |
34 | + $user->id, $path, $user->color, Icon::GetSize(), $user->color, Message::SYMBOL, | |
35 | 35 | $user->handle_name, $checkbox |
36 | 36 | ); |
37 | 37 | } |
@@ -43,7 +43,7 @@ | ||
43 | 43 | |
44 | 44 | //ユーザアイコンタグ |
45 | 45 | private static function GetIcon() { |
46 | - return '<img src="%s" alt="" style="border-color:%s;" align="middle" %s>'; | |
46 | + return '<img src="%s" alt="" style="border-color:%s;" align="middle"%s>'; | |
47 | 47 | } |
48 | 48 | |
49 | 49 | //投票画面用アイコンタグ |
@@ -50,7 +50,7 @@ | ||
50 | 50 | private static function GetVoteIcon() { |
51 | 51 | return <<<EOF |
52 | 52 | <td><label for="%d"> |
53 | -<img src="%s" alt="" style="border-color:%s;" %s> | |
53 | +<img src="%s" alt="" style="border-color:%s;"%s> | |
54 | 54 | <span style="color:%s;">%s</span>%s<br> |
55 | 55 | %s</label></td> |
56 | 56 | EOF; |
@@ -5,7 +5,7 @@ | ||
5 | 5 | public static function GetPath() { |
6 | 6 | static $path; |
7 | 7 | |
8 | - if (is_null($path)) { | |
8 | + if (true === is_null($path)) { | |
9 | 9 | $path = JINROU_ROOT . '/' . IconConfig::PATH . '/'; |
10 | 10 | } |
11 | 11 | return $path; |
@@ -20,7 +20,7 @@ | ||
20 | 20 | public static function GetDead() { |
21 | 21 | static $path; |
22 | 22 | |
23 | - if (is_null($path)) { | |
23 | + if (true === is_null($path)) { | |
24 | 24 | $path = JINROU_IMG . '/' . IconConfig::$dead; |
25 | 25 | } |
26 | 26 | return $path; |
@@ -30,7 +30,7 @@ | ||
30 | 30 | public static function GetWolf() { |
31 | 31 | static $path; |
32 | 32 | |
33 | - if (is_null($path)) { | |
33 | + if (true === is_null($path)) { | |
34 | 34 | $path = JINROU_IMG . '/' . IconConfig::$wolf; |
35 | 35 | } |
36 | 36 | return $path; |
@@ -37,10 +37,10 @@ | ||
37 | 37 | } |
38 | 38 | |
39 | 39 | //サイズ属性タグ取得 |
40 | - public static function GetTag() { | |
40 | + public static function GetSize() { | |
41 | 41 | static $str; |
42 | 42 | |
43 | - if (is_null($str)) { | |
43 | + if (true === is_null($str)) { | |
44 | 44 | $str = ImageHTML::GenerateIconSize(IconConfig::WIDTH, IconConfig::HEIGHT); |
45 | 45 | } |
46 | 46 | return $str; |
@@ -49,7 +49,7 @@ | ||
49 | 49 | } else { |
50 | 50 | $title = ''; |
51 | 51 | } |
52 | - $css = $this->class == '' ?: ImageHTML::GenerateCSS($this->class); | |
52 | + $css = $this->class == '' ? '' : ImageHTML::GenerateCSS($this->class); | |
53 | 53 | $str = ImageHTML::Generate($this->GetPath($name), $title, $css); |
54 | 54 | return $table ? TableHTML::GenerateTd($str) : $str; |
55 | 55 | } |