Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc0475de

Browse files
committed
use native trim & json functions
1 parentdf5d289 commitc0475de

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

‎asset/js/common.js‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,3 @@ function wpsdb_add_commas(number_string) {
2727
}
2828
returnx1+x2;
2929
}
30-
31-
functionwpsdb_parse_json(maybe_json){
32-
try{
33-
varjson_object=jQuery.parseJSON(maybe_json);
34-
}catch(e){
35-
// we simply return false here because the json data itself will never just contain a value of "false"
36-
returnfalse;
37-
}
38-
returnjson_object;
39-
}

‎asset/js/script.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,10 +1123,10 @@ var execute_next_step;
11231123
},
11241124
success:function(data){
11251125
doing_ajax=false;
1126-
data=$.trim(data);
1127-
row_information=wpsdb_parse_json(data);
1128-
if(false==row_information||null==
1129-
row_information){
1126+
data=data.trim();
1127+
try{
1128+
row_information=JSON.parse(data);
1129+
}catch(variable){
11301130
$('.progress-title').html('Migration failed');
11311131
if(''==data||null==data){
11321132
$('.progress-text').html(wpsdb_i10n.table_process_problem_empty_response+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp