|
|
|
@ -204,6 +204,7 @@ class SourceEvent extends Controller
|
|
|
|
|
$newFileName = $temp[count($temp)-1];
|
|
|
|
|
|
|
|
|
|
$to = $file_url;
|
|
|
|
|
$originalUrl = '';
|
|
|
|
|
if ($file_type == 1) {
|
|
|
|
|
$new_file_url = $real_file_url;
|
|
|
|
|
$zip = new \ZipArchive;
|
|
|
|
@ -213,6 +214,7 @@ class SourceEvent extends Controller
|
|
|
|
|
} elseif ($file_type == 2) {
|
|
|
|
|
if (preg_match("/.ipa/", $file_url)) {
|
|
|
|
|
if($flag == 0 || ($flag ==1 && $newFileName != $file_name)) {
|
|
|
|
|
$originalUrl = $file_url;
|
|
|
|
|
$new_file_url = str_replace('Uploads/SourcePack', 'Uploads/Ios/original', $real_file_url);
|
|
|
|
|
$to = str_replace('Uploads/SourcePack', 'Uploads/Ios/original', $file_url);
|
|
|
|
|
$zip_open_game_source = zip_open($real_file_url);
|
|
|
|
@ -231,7 +233,7 @@ class SourceEvent extends Controller
|
|
|
|
|
$res = $zip -> open($new_file_url, \ZipArchive::CREATE);
|
|
|
|
|
$zip -> addFromString($url_ver, json_encode($data));
|
|
|
|
|
$zip -> close();
|
|
|
|
|
unlink($real_file_url);
|
|
|
|
|
// unlink($real_file_url);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -256,7 +258,7 @@ class SourceEvent extends Controller
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$model = D('Game_source');
|
|
|
|
|
$model->where(['game_id'=>$game_id])->save(['file_url'=>$to]);
|
|
|
|
|
$model->where(['game_id'=>$game_id])->save(['file_url'=>$to, 'original_url' => $originalUrl]);
|
|
|
|
|
|
|
|
|
|
$plist = A("Plist");
|
|
|
|
|
|
|
|
|
|