• R/O
  • SSH
  • HTTPS

jinrousiki: コミット


コミットメタ情報

リビジョン2126 (tree)
日時2018-01-07 21:09:03
作者umethyl

ログメッセージ

Icon::GetSize()

変更サマリ

差分

--- trunk/include/html/media/image_html_class.php (revision 2125)
+++ trunk/include/html/media/image_html_class.php (revision 2126)
@@ -19,19 +19,19 @@
1919 //ユーザアイコン生成
2020 public static function GenerateIcon(User $user) {
2121 return sprintf(self::GetIcon(),
22- Icon::GetFile($user->icon_filename), $user->color, Icon::GetTag()
22+ Icon::GetFile($user->icon_filename), $user->color, Icon::GetSize()
2323 );
2424 }
2525
2626 //ユーザアイコンサイズ属性生成
2727 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);
2929 }
3030
3131 //投票画面用アイコン出力
3232 public static function OutputVoteIcon(User $user, $path, $checkbox) {
3333 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,
3535 $user->handle_name, $checkbox
3636 );
3737 }
@@ -43,7 +43,7 @@
4343
4444 //ユーザアイコンタグ
4545 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>';
4747 }
4848
4949 //投票画面用アイコンタグ
@@ -50,7 +50,7 @@
5050 private static function GetVoteIcon() {
5151 return <<<EOF
5252 <td><label for="%d">
53-<img src="%s" alt="" style="border-color:%s;" %s>
53+<img src="%s" alt="" style="border-color:%s;"%s>
5454 <span style="color:%s;">%s</span>%s<br>
5555 %s</label></td>
5656 EOF;
--- trunk/include/html/game_html_class.php (revision 2125)
+++ trunk/include/html/game_html_class.php (revision 2126)
@@ -99,8 +99,7 @@
9999
100100 //アイコンと名前を設定
101101 $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,
104103 $td_header, $user->color, Message::SYMBOL, $user->handle_name
105104 );
106105
@@ -759,7 +758,7 @@
759758 //プレイヤーアイコンタグ
760759 private static function GetPlayerImage() {
761760 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>
763762 %s<span class="symbol" style="color:%s;">%s</span>%s
764763 EOF;
765764 }
--- trunk/include/media/image_class.php (revision 2125)
+++ trunk/include/media/image_class.php (revision 2126)
@@ -49,7 +49,7 @@
4949 } else {
5050 $title = '';
5151 }
52- $css = $this->class == '' ?: ImageHTML::GenerateCSS($this->class);
52+ $css = $this->class == '' ? '' : ImageHTML::GenerateCSS($this->class);
5353 $str = ImageHTML::Generate($this->GetPath($name), $title, $css);
5454 return $table ? TableHTML::GenerateTd($str) : $str;
5555 }
--- trunk/include/media/icon_class.php (revision 2125)
+++ trunk/include/media/icon_class.php (revision 2126)
@@ -5,7 +5,7 @@
55 public static function GetPath() {
66 static $path;
77
8- if (is_null($path)) {
8+ if (true === is_null($path)) {
99 $path = JINROU_ROOT . '/' . IconConfig::PATH . '/';
1010 }
1111 return $path;
@@ -20,7 +20,7 @@
2020 public static function GetDead() {
2121 static $path;
2222
23- if (is_null($path)) {
23+ if (true === is_null($path)) {
2424 $path = JINROU_IMG . '/' . IconConfig::$dead;
2525 }
2626 return $path;
@@ -30,7 +30,7 @@
3030 public static function GetWolf() {
3131 static $path;
3232
33- if (is_null($path)) {
33+ if (true === is_null($path)) {
3434 $path = JINROU_IMG . '/' . IconConfig::$wolf;
3535 }
3636 return $path;
@@ -37,10 +37,10 @@
3737 }
3838
3939 //サイズ属性タグ取得
40- public static function GetTag() {
40+ public static function GetSize() {
4141 static $str;
4242
43- if (is_null($str)) {
43+ if (true === is_null($str)) {
4444 $str = ImageHTML::GenerateIconSize(IconConfig::WIDTH, IconConfig::HEIGHT);
4545 }
4646 return $str;
旧リポジトリブラウザで表示