@@ -152,13 +152,12 @@ function do_commit($TruthVersion, $db = NULL, $extraMsg = '') {
152
152
exec ('git commit -m " ' .implode ("\n" , $ commitMessage ).'" ' );
153
153
exec ('git rev-parse HEAD ' , $ hash );
154
154
$ versionDiff ['hash ' ] = $ hash [0 ];
155
- require_once __DIR__ .'/../mysql.php ' ;
156
- $ mysqli ->select_db ('db_diff ' );
155
+ $ diff_db = new PDO ('sqlite: ' .__DIR__ .'/../db_diff.db ' );
157
156
158
157
$ col = ['ver ' ,'data ' ];
159
- $ val = [$ TruthVersion , ' " ' . $ mysqli -> real_escape_string ( brotli_compress (
158
+ $ val = [$ TruthVersion , brotli_compress (
160
159
json_encode ($ versionDiff , JSON_UNESCAPED_SLASHES ), 11 , BROTLI_TEXT
161
- )). ' " ' ];
160
+ )];
162
161
$ chkTypes = [
163
162
'clan_battle ' ,
164
163
'dungeon_area ' ,
@@ -176,7 +175,8 @@ function do_commit($TruthVersion, $db = NULL, $extraMsg = '') {
176
175
$ val [] = 1 ;
177
176
}
178
177
}
179
- $ mysqli ->query ('REPLACE INTO redive ( ' .implode (', ' , $ col ).') VALUES ( ' .implode (', ' , $ val ).') ' );
178
+ $ stmt = $ diff_db ->prepare ('REPLACE INTO redive ( ' .implode (', ' , $ col ).') VALUES ( ' .implode (', ' , array_map (function (){return '? ' ;}, $ val )).') ' );
179
+ $ stmt ->execute ($ val );
180
180
exec ('git push origin master ' );
181
181
182
182
$ data = json_encode (array (
@@ -422,7 +422,7 @@ function main() {
422
422
file_put_contents ('data/+manifest_ ' .substr ($ manifestName , 9 , -14 ).'.txt ' , $ manifest );
423
423
}
424
424
}
425
- curl_setopt ($ curl , CURLOPT_URL , 'http://prd-priconne-redive.akamaized.net/dl/Resources/ ' .$ TruthVersion .'/Jpn/Movie/SP/High /manifest/sound2manifest ' );
425
+ curl_setopt ($ curl , CURLOPT_URL , 'http://prd-priconne-redive.akamaized.net/dl/Resources/ ' .$ TruthVersion .'/Jpn/Sound /manifest/sound2manifest ' );
426
426
$ manifest = curl_exec ($ curl );
427
427
file_put_contents ('data/+manifest_sound.txt ' , $ manifest );
428
428
curl_setopt ($ curl , CURLOPT_URL , 'http://prd-priconne-redive.akamaized.net/dl/Resources/ ' .$ TruthVersion .'/Jpn/Movie/SP/High/manifest/moviemanifest ' );
@@ -555,6 +555,8 @@ function main() {
555
555
do_commit ($ TruthVersion , $ db );
556
556
unset($ db );
557
557
558
+ if (file_exists (__DIR__ .'/action_after_update.php ' )) require_once __DIR__ .'/action_after_update.php ' ;
559
+
558
560
checkAndUpdateResource ($ TruthVersion );
559
561
560
562
file_put_contents (RESOURCE_PATH_PREFIX .'spine/still/index.json ' , json_encode (
0 commit comments