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
dfca3494ad
commit
22bd52fd65
|
|
@ -16,6 +16,7 @@ META-INF/
|
||||||
|
|
||||||
# vim swp file #
|
# vim swp file #
|
||||||
*.swp
|
*.swp
|
||||||
|
.idea
|
||||||
|
|
||||||
# binding
|
# binding
|
||||||
/binding/java/classes/
|
/binding/java/classes/
|
||||||
|
|
|
||||||
|
|
@ -67,10 +67,10 @@ void search(
|
||||||
|
|
||||||
if ( res == 1 )
|
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);
|
add_assoc_string( *return_value, "region", (*_block).region, 1);
|
||||||
} else {
|
} 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);
|
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 )
|
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);
|
//add_assoc_string( *return_value, "region", (*_block).region, 1);
|
||||||
// for phpng
|
// for phpng
|
||||||
add_assoc_string( *return_value, "region", (*_block).region);
|
add_assoc_string( *return_value, "region", (*_block).region);
|
||||||
} else {
|
} 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);
|
//add_assoc_string( *return_value, "region", "[Error] Search Failed! Please check the path of ip2region db file.", 1);
|
||||||
// for phpng
|
// for phpng
|
||||||
add_assoc_string( *return_value, "region", "[Error] Search Failed! Please check the path of ip2region db file.");
|
add_assoc_string( *return_value, "region", "[Error] Search Failed! Please check the path of ip2region db file.");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue