• R/O
  • SSH
  • HTTPS

jinrousiki: Commit


Commit MetaInfo

Revision2303 (tree)
Time2018-12-24 23:04:41
Authorumethyl

Log Message

Text::Join()

Change Summary

Incremental Difference

--- trunk/include/controller/admin_class.php (revision 2302)
+++ trunk/include/controller/admin_class.php (revision 2303)
@@ -46,7 +46,7 @@
4646
4747 if (IconDB::Delete($icon_no, $file)) {
4848 $url = '../icon_upload.php';
49- $str = Text::Concat(AdminMessage::DELETE_ICON_SUCCESS, URL::GetJump($url));
49+ $str = Text::Join(AdminMessage::DELETE_ICON_SUCCESS, URL::GetJump($url));
5050 HTML::OutputResult(AdminMessage::DELETE_ICON, $str, $url);
5151 } else {
5252 HTML::OutputResult($title, Message::DB_ERROR_LOAD);
--- trunk/include/controller/icon_edit_class.php (revision 2302)
+++ trunk/include/controller/icon_edit_class.php (revision 2303)
@@ -80,7 +80,7 @@
8080 //エラー出力
8181 private static function OutputError($str, $url = null) {
8282 if (isset($url)) {
83- $str = Text::Concat($str, $url);
83+ $str = Text::Join($str, $url);
8484 }
8585 HTML::OutputResult(IconEditMessage::TITLE, $str);
8686 }
--- trunk/include/controller/icon_upload_class.php (revision 2302)
+++ trunk/include/controller/icon_upload_class.php (revision 2303)
@@ -41,7 +41,7 @@
4141
4242 //アップロードされたファイルのエラーチェック
4343 if (@$_FILES['upfile']['error'][$i] != 0) {
44- self::OutputResult(Text::Concat(IconUploadMessage::FILE_UPLOAD, IconUploadMessage::RETRY));
44+ self::OutputResult(Text::Join(IconUploadMessage::FILE_UPLOAD, IconUploadMessage::RETRY));
4545 }
4646 extract(RQ::ToArray()); //引数を展開
4747 $back_url = self::GetURL();
@@ -84,7 +84,7 @@
8484 //アイコンの高さと幅をチェック
8585 list($width, $height) = getimagesize($tmp_name);
8686 if ($width > UserIconConfig::WIDTH || $height > UserIconConfig::HEIGHT) {
87- $str = Text::Concat(
87+ $str = Text::Join(
8888 sprintf(IconUploadMessage::SIZE_LIMIT, UserIcon::GetSizeLimit()),
8989 sprintf(IconUploadMessage::UPLOAD_SIZE, $width, $height)
9090 );
@@ -110,7 +110,7 @@
110110 //ファイルをテンポラリからコピー
111111 $file_name = sprintf('%03s.%s', $icon_no, $ext); //ファイル名の桁を揃える
112112 if (! move_uploaded_file($tmp_name, Icon::GetFile($file_name))) {
113- self::OutputResult(Text::Concat(IconUploadMessage::FILE_COPY, IconUploadMessage::RETRY));
113+ self::OutputResult(Text::Join(IconUploadMessage::FILE_COPY, IconUploadMessage::RETRY));
114114 }
115115
116116 //データベースに登録
@@ -167,10 +167,10 @@
167167 $str = IconUploadMessage::SUCCESS . IconUploadMessage::JUMP_VIEW;
168168
169169 DB::Connect();
170- if (! IconDB::ClearSession(RQ::Get()->icon_no)) {
171- $str = Text::Concat($str, IconUploadMessage::SESSION_DELETE);
170+ if (false === IconDB::ClearSession(RQ::Get()->icon_no)) {
171+ $str = Text::Join($str, IconUploadMessage::SESSION_DELETE);
172172 }
173- $str = Text::Concat($str, URL::GetJump($url));
173+ $str = Text::Join($str, URL::GetJump($url));
174174 HTML::OutputResult(IconUploadMessage::SUCCESS, $str, $url);
175175 }
176176
@@ -192,13 +192,13 @@
192192 self::OutputResult(IconUploadMessage::SESSION);
193193 }
194194
195- if (! IconDB::Delete(RQ::Get()->icon_no, $icon_filename)) { //削除処理
195+ if (false === IconDB::Delete(RQ::Get()->icon_no, $icon_filename)) { //削除処理
196196 self::OutputResult(IconUploadMessage::DB_ERROR);
197197 }
198198 DB::Disconnect();
199199
200200 $url = 'icon_upload.php';
201- $str = Text::Concat(
201+ $str = Text::Join(
202202 IconUploadMessage::DELETE . IconUploadMessage::JUMP_UPLOAD, URL::GetJump($url)
203203 );
204204 HTML::OutputResult(IconUploadMessage::DELETE, $str, $url);
--- trunk/include/controller/login_class.php (revision 2302)
+++ trunk/include/controller/login_class.php (revision 2303)
@@ -15,7 +15,7 @@
1515 if (self::LoginManually()) {
1616 self::OutputResult(LoginMessage::MANUALLY_TITLE, LoginMessage::MANUALLY_BODY, 'game_frame');
1717 } else {
18- $body = Text::Concat(LoginMessage::FAILED_BODY, LoginMessage::FAILED_CAUTION);
18+ $body = Text::Join(LoginMessage::FAILED_BODY, LoginMessage::FAILED_CAUTION);
1919 self::OutputResult(LoginMessage::FAILED_TITLE, $body);
2020 }
2121 }
@@ -62,7 +62,7 @@
6262 $url = '';
6363 } else {
6464 $url = URL::GetRoom($jump, RQ::Get()->room_no);
65- $body = Text::Concat($body, URL::GetJump($url));
65+ $body = Text::Join($body, URL::GetJump($url));
6666 }
6767 HTML::OutputResult($title, $body, $url);
6868 }
--- trunk/include/controller/room_manager_class.php (revision 2302)
+++ trunk/include/controller/room_manager_class.php (revision 2303)
@@ -292,7 +292,7 @@
292292
293293 $url = ServerConfig::SITE_ROOT;
294294 $jump = URL::GetJump($url);
295- $str = Text::Concat(sprintf(RoomManagerMessage::ENTRY, RQ::Get()->room_name), $jump);
295+ $str = Text::Join(sprintf(RoomManagerMessage::ENTRY, RQ::Get()->room_name), $jump);
296296 HTML::OutputResult(RoomManagerMessage::TITLE, $str, $url);
297297 }
298298
@@ -380,7 +380,7 @@
380380
381381 if (RoomManagerDB::CountActive() >= RoomConfig::MAX_ACTIVE_ROOM) { //最大稼働数チェック
382382 $title = sprintf(RoomManagerMessage::ERROR, RoomManagerMessage::ERROR_LIMIT);
383- $str = Text::Concat(
383+ $str = Text::Join(
384384 RoomManagerMessage::ERROR_LIMIT_MAX_ROOM, RoomManagerMessage::ERROR_WAIT_FINISH
385385 );
386386 HTML::OutputResult($title, $str);
@@ -388,7 +388,7 @@
388388
389389 if (RoomManagerDB::CountEstablish() > 0) { //同一ユーザの連続作成チェック
390390 $title = sprintf(RoomManagerMessage::ERROR, RoomManagerMessage::ERROR_LIMIT);
391- $str = Text::Concat(
391+ $str = Text::Join(
392392 RoomManagerMessage::ERROR_LIMIT_ESTABLISH, RoomManagerMessage::ERROR_WAIT_FINISH
393393 );
394394 HTML::OutputResult($title, $str);
@@ -398,7 +398,7 @@
398398 if (isset($time) &&
399399 Time::Get() - Time::ConvertTimeStamp($time, false) <= RoomConfig::ESTABLISH_WAIT) {
400400 $title = sprintf(RoomManagerMessage::ERROR, RoomManagerMessage::ERROR_LIMIT);
401- $str = Text::Concat(
401+ $str = Text::Join(
402402 RoomManagerMessage::ERROR_LIMIT_ESTABLISH_WAIT, RoomManagerMessage::ERROR_WAIT_TIME
403403 );
404404 HTML::OutputResult($title, $str);
--- trunk/include/controller/user_manager_class.php (revision 2302)
+++ trunk/include/controller/user_manager_class.php (revision 2303)
@@ -205,7 +205,7 @@
205205 DB::Commit();
206206
207207 $url = URL::GetRoom('game_frame', $room_no);
208- $str = Text::Concat(sprintf(UserManagerMessage::ENTRY, ++$user_count), URL::GetJump($url));
208+ $str = Text::Join(sprintf(UserManagerMessage::ENTRY, ++$user_count), URL::GetJump($url));
209209 HTML::OutputResult(UserManagerMessage::TITLE, $str, $url);
210210 } else {
211211 self::OutputError(Message::DB_ERROR, Message::DB_ERROR_LOAD);
--- trunk/include/functions.php (revision 2302)
+++ trunk/include/functions.php (revision 2303)
@@ -40,8 +40,8 @@
4040 return self::Add(vsprintf($format, $stack));
4141 }
4242
43- //結合 (Text::BRLF 固定)
44- public static function Concat(...$stack) {
43+ //改行結合 (Text::BRLF 固定)
44+ public static function Join(...$stack) {
4545 return ArrayFilter::Concat($stack, self::BRLF);
4646 }
4747
--- trunk/include/html/controller/room_manager_html_class.php (revision 2302)
+++ trunk/include/html/controller/room_manager_html_class.php (revision 2303)
@@ -88,7 +88,7 @@
8888 //結果出力
8989 public static function OutputResult($type, $str = '') {
9090 $title = sprintf(RoomManagerMessage::ERROR, RoomManagerMessage::ERROR_INPUT);
91- $header = Text::Concat(
91+ $header = Text::Join(
9292 RoomManagerMessage::ERROR_HEADER, RoomManagerMessage::ERROR_CHECK_LIST
9393 );
9494
@@ -95,7 +95,7 @@
9595 switch ($type) {
9696 case 'empty':
9797 $stack = [$str . RoomManagerMessage::ERROR_INPUT_EMPTY];
98- HTML::OutputResult($title, Text::Concat($header, self::GenerateErrorList($stack)));
98+ HTML::OutputResult($title, Text::Join($header, self::GenerateErrorList($stack)));
9999 break;
100100
101101 case 'comment':
@@ -103,7 +103,7 @@
103103 $str . RoomManagerMessage::ERROR_INPUT_LIMIT,
104104 $str . RoomManagerMessage::ERROR_INPUT_NG_WORD
105105 ];
106- HTML::OutputResult($title, Text::Concat($header, self::GenerateErrorList($stack)));
106+ HTML::OutputResult($title, Text::Join($header, self::GenerateErrorList($stack)));
107107 break;
108108
109109 case 'no_password':
@@ -115,7 +115,7 @@
115115 $str . RoomManagerMessage::ERROR_INPUT_EMPTY,
116116 $str . RoomManagerMessage::ERROR_INPUT_LIMIT_OVER
117117 ];
118- HTML::OutputResult($title, Text::Concat($header, self::GenerateErrorList($stack)));
118+ HTML::OutputResult($title, Text::Join($header, self::GenerateErrorList($stack)));
119119 break;
120120
121121 case 'time':
@@ -126,7 +126,7 @@
126126 $error_header . RoomManagerMessage::ERROR_INPUT_REAL_TIME_EM,
127127 $error_header . RoomManagerMessage::ERROR_INPUT_REAL_TIME_NUMBER
128128 ];
129- HTML::OutputResult($title, Text::Concat($header, self::GenerateErrorList($stack)));
129+ HTML::OutputResult($title, Text::Join($header, self::GenerateErrorList($stack)));
130130 break;
131131
132132 case 'gm_logout':
--- trunk/include/html/old_log_html_class.php (revision 2302)
+++ trunk/include/html/old_log_html_class.php (revision 2303)
@@ -7,7 +7,7 @@
77 if (! DB::$ROOM->IsFinished() || ! DB::$ROOM->IsAfterGame()) { //閲覧判定
88 $url = RQ::Get()->generate_index ? 'index.html' : 'old_log.php';
99 $back = HTML::GenerateLink($url, Message::BACK);
10- $str = Text::Concat(OldLogMessage::NOT_FINISHED, $back);
10+ $str = Text::Join(OldLogMessage::NOT_FINISHED, $back);
1111 HTML::OutputResult($base_title, $str);
1212 }
1313
@@ -49,7 +49,7 @@
4949 } else {
5050 $str = HTML::GenerateHeader($title, 'old_log', true);
5151 }
52- $str .= Text::Concat(
52+ $str .= Text::Join(
5353 HTML::GenerateLink(URL::GetHeaderDB('old_log'), Message::BACK),
5454 RoomHTML::GenerateLogTitle(), RoomOption::GenerateImage(),
5555 Text::Add(HTML::GenerateLink('#beforegame', OldLogMessage::BEFORE))
@@ -88,7 +88,7 @@
8888 if ($room_count < 1) {
8989 $title = ServerConfig::TITLE . OldLogMessage::TITLE;
9090 $back = HTML::GenerateLink('./', Message::BACK);
91- HTML::OutputResult($title, Text::Concat(OldLogMessage::NO_LOG, $back));
91+ HTML::OutputResult($title, Text::Join(OldLogMessage::NO_LOG, $back));
9292 }
9393
9494 $cache_flag = false; //キャッシュ取得判定
--- trunk/include/media/user_icon_class.php (revision 2302)
+++ trunk/include/media/user_icon_class.php (revision 2303)
@@ -46,7 +46,7 @@
4646 foreach ($list as $key => $label) {
4747 $str = RQ::Get()->$key;
4848 if (Text::Over($str, UserIconConfig::LENGTH)) {
49- $error = Text::Concat(Text::AddHeader(self::GetLengthLimit(), $label), $url);
49+ $error = Text::Join(Text::AddHeader(self::GetLengthLimit(), $label), $url);
5050 HTML::OutputResult($title, $error);
5151 }
5252 $stack[$key] = Text::Exists($str) ? $str : null;
@@ -56,8 +56,8 @@
5656
5757 //RGB カラーチェック
5858 public static function ValidateColor($str, $title, $url) {
59- if (! Text::IsRGB($str)) {
60- $error = Text::Concat(
59+ if (false === Text::IsRGB($str)) {
60+ $error = Text::Join(
6161 IconMessage::INVALID_COLOR, IconMessage::COLOR_EXPLAIN,
6262 sprintf(IconMessage::INPUT_COLOR, $str), $url
6363 );
--- trunk/include/request/session_class.php (revision 2302)
+++ trunk/include/request/session_class.php (revision 2303)
@@ -107,7 +107,7 @@
107107 private static function OutputJump() {
108108 $url = URL::GetRoom('game_view', RQ::Get()->room_no);
109109 $jump = URL::GetJump($url);
110- $str = Text::Add(Text::Concat(Message::VIEW_BODY, $jump)) . HTML::GenerateSetLocation();
110+ $str = Text::Add(Text::Join(Message::VIEW_BODY, $jump)) . HTML::GenerateSetLocation();
111111 HTML::OutputResult(Message::VIEW_TITLE, $str, $url);
112112 }
113113 }
--- trunk/include/role/role_class.php (revision 2302)
+++ trunk/include/role/role_class.php (revision 2303)
@@ -712,8 +712,8 @@
712712
713713 $this->SetStack(RQ::Get()->situation, 'message');
714714 $str = $this->VoteNight();
715- if (! is_null($str)) {
716- VoteHTML::OutputResult(Text::Concat(VoteRoleMessage::INVALID_TARGET, $str));
715+ if (false === is_null($str)) {
716+ VoteHTML::OutputResult(Text::Join(VoteRoleMessage::INVALID_TARGET, $str));
717717 }
718718 }
719719
Show on old repository browser