• R/O
  • HTTP
  • SSH
  • HTTPS

web: 提交

公開webページ管理


Commit MetaInfo

修訂e987737ffbc748e7297adf5a6c8afb4024ba6948 (tree)
時間2021-02-07 23:30:50
作者deskull <deskull@user...>
Commiterdeskull

Log Message

Merge branch 'master' of git.osdn.net:/gitroot/hengband/web

Change Summary

差異

--- a/score/db_common.inc
+++ b/score/db_common.inc
@@ -510,7 +510,7 @@ EOM
510510 $this->dbh->beginTransaction();
511511 if ($insert_stmt->execute($score_data['character_info']) === false ||
512512 $insert_stmt->rowCount() !== 1) {
513- $dbh->rollBack();
513+ $this->dbh->rollBack();
514514 return false;
515515 }
516516
@@ -521,7 +521,7 @@ EOM
521521 foreach ($score_data['realm_info'] as $realm_seq => $realm_name) {
522522 if ($realm_insert_stmt->execute([$score_id, $realm_seq + 1, $realm_name]) === false ||
523523 $realm_insert_stmt->rowCount() !== 1) {
524- $dbh->rollBack();
524+ $this->dbh->rollBack();
525525 return false;
526526 }
527527 }
@@ -533,7 +533,7 @@ EOM
533533
534534 return $score_id;
535535 } catch (PDOException $e) {
536- $dbh->rollBack();
536+ $this->dbh->rollBack();
537537 }
538538
539539 return false;
--- a/score/killer_ranking.php
+++ b/score/killer_ranking.php
@@ -20,7 +20,7 @@ $query_time = microtime(true) - $time_start;
2020
2121 $wt = new WebTemplate();
2222 $wt->add_head_contents('<meta name="robots" content="none" />');
23-$wt->add_head_contents('<link rel="stylesheet" type="text/css" href="css/score-table.css">');
23+$wt->add_head_contents('<link rel="stylesheet" type="text/css" href="./css/score-table.css">');
2424 $wt->set_title("変愚蛮怒 スコア 死因ランキング");
2525
2626 $fp = $wt->main_contents_fp();
--- a/score/popularity_ranking.php
+++ b/score/popularity_ranking.php
@@ -11,7 +11,7 @@ require_once "web_template.inc";
1111 $wt = new WebTemplate();
1212
1313 $wt->add_head_contents('<meta name="robots" content="none" />');
14-$wt->add_head_contents('<link rel="stylesheet" type="text/css" href="css/score-table.css">');
14+$wt->add_head_contents('<link rel="stylesheet" type="text/css" href="./css/score-table.css">');
1515 $wt->add_head_contents(
1616 <<<EOM
1717 <script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
--- a/score/register_score.php
+++ b/score/register_score.php
@@ -194,11 +194,13 @@ function validate_screen_dump($screen_dump_lines)
194194
195195 $recv_encoding = get_mb_encoding();
196196 if ($recv_encoding === false) {
197+ error_log("get_mb_encoding() FAILED");
197198 exit;
198199 }
199200
200201 $recv_contents = file_get_contents('php://input');
201202 if (strlen($recv_contents) !== filter_input(INPUT_SERVER, 'CONTENT_LENGTH', FILTER_VALIDATE_INT)) {
203+ error_log("CONTENT_LENGTH does not match");
202204 exit;
203205 }
204206
@@ -206,6 +208,9 @@ $recv_contents = mb_convert_encoding($recv_contents, "UTF-8", $recv_encoding);
206208
207209 $split_contents = split_recv_contents($recv_contents);
208210 if ($split_contents === false) {
211+ error_log("split_recv_contents() FAILED");
212+ error_log("recv_contents:");
213+ error_log($recv_contents);
209214 exit;
210215 }
211216
@@ -215,6 +220,8 @@ $db = new ScoreDB();
215220 $score_id = $db->register_new_score(create_db_insert_score_data($char_info));
216221
217222 if ($score_id === false) {
223+ error_log("register_new_score() FAILED!");
224+ error_log(print_r($char_info, true));
218225 exit;
219226 }
220227
--- a/score/score_ranking.php
+++ b/score/score_ranking.php
@@ -172,7 +172,7 @@ $pageinfo = calc_page_info($search_result['total_data_count'], $start_num, 50);
172172 $wt = new WebTemplate();
173173 $wt->set_title("変愚蛮怒 スコアランキング");
174174 $wt->add_head_contents('<meta name="robots" content="none" />');
175-$wt->add_head_contents('<link rel="stylesheet" type="text/css" href="css/score-table.css">');
175+$wt->add_head_contents('<link rel="stylesheet" type="text/css" href="./css/score-table.css">');
176176 $fp = $wt->main_contents_fp();
177177 fprintf($fp, "<h2>変愚蛮怒 歴代スコア (%s)</h2>\n", $db->get_sort_mode_name());
178178 fprintf(
--- a/score/tools/tweet_score.py
+++ b/score/tools/tweet_score.py
@@ -141,9 +141,9 @@ def create_score_tweet(score_id):
141141 u"{death_reason_detail}"
142142 ).format(death_reason_detail=death_reason_detail, **score_data)
143143
144- dump_url = ("https://hengband.osdn.jp/score/show_dump.php?score_id={}"
144+ dump_url = ("http://mars.kmc.gr.jp/~dis/heng_score/show_dump.php?score_id={}"
145145 ).format(score_data['score_id'])
146- screen_url = ("https://hengband.osdn.jp/score/show_screen.php?score_id={}"
146+ screen_url = ("http://mars.kmc.gr.jp/~dis/heng_score/show_screen.php?score_id={}"
147147 ).format(score_data['score_id'])
148148
149149 tweet = (u"{summary}\n\n"
@@ -171,7 +171,7 @@ def create_daily_stats_tweet(year, month, day):
171171 daily_stats = get_daily_score_stats(year, month, day)
172172
173173 score_url = (
174- u"https://hengband.osdn.jp/score/score_ranking.php"
174+ u"http://mars.kmc.gr.jp/~dis/heng_score/score_ranking.php"
175175 u"?fd={target_date}&td={target_date}"
176176 .format(target_date=datetime.date(year, month, day).isoformat())
177177 )
--- a/score/tools/upload.sh
+++ b/score/tools/upload.sh
@@ -4,7 +4,7 @@
44 #
55 # 使い方の例:
66 # scoreディレクトリにおいて、
7-# $ sh tools/upload.sh ./ shell.osdn.jp:/home/groups/h/he/hengband/htdocs/score/
7+# $ sh tools/upload.sh ./ shell.osdn.jp:/home/**/score/
88 #
99
1010 eval rsync -amvz --exclude=FeedWriter --include=*.php --include=*.js --include=*.inc --include=.htaccess --include=*.gif --include=*.css --include=*.py --include=*/ --exclude=* $1 $2
Show on old repository browser