keep php class and php_extention return data key same, we change php_extension return data key : cityId to city_id
This commit is contained in:
parent
35cc0f37c7
commit
550425a2b5
|
|
@ -16,6 +16,7 @@ META-INF/
|
|||
|
||||
# vim swp file #
|
||||
*.swp
|
||||
.idea
|
||||
|
||||
# binding
|
||||
/binding/java/classes/
|
||||
|
|
|
|||
|
|
@ -67,10 +67,10 @@ void search(
|
|||
|
||||
if ( res == 1 )
|
||||
{
|
||||
add_assoc_long( *return_value, "cityId", (*_block).city_id);
|
||||
add_assoc_long( *return_value, "city_id", (*_block).city_id);
|
||||
add_assoc_string( *return_value, "region", (*_block).region, 1);
|
||||
} else {
|
||||
add_assoc_long( *return_value, "cityId", 0);
|
||||
add_assoc_long( *return_value, "city_id", 0);
|
||||
add_assoc_string( *return_value, "region", "[Error] Search Failed! Please check the path of ip2region db file.", 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,12 +67,12 @@ void search(
|
|||
|
||||
if ( res == 1 )
|
||||
{
|
||||
add_assoc_long( *return_value, "cityId", (*_block).city_id);
|
||||
add_assoc_long( *return_value, "city_id", (*_block).city_id);
|
||||
//add_assoc_string( *return_value, "region", (*_block).region, 1);
|
||||
// for phpng
|
||||
add_assoc_string( *return_value, "region", (*_block).region);
|
||||
} else {
|
||||
add_assoc_long( *return_value, "cityId", 0);
|
||||
add_assoc_long( *return_value, "city_id", 0);
|
||||
//add_assoc_string( *return_value, "region", "[Error] Search Failed! Please check the path of ip2region db file.", 1);
|
||||
// for phpng
|
||||
add_assoc_string( *return_value, "region", "[Error] Search Failed! Please check the path of ip2region db file.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue