ShuanghongS 1 ヶ月 前
コミット
c94a4d3e14
1 ファイル変更7 行追加7 行削除
  1. 7 7
      utils/common.class.php

+ 7 - 7
utils/common.class.php

@@ -3939,7 +3939,7 @@ class common {
 
             $_contact_id = common::check_input($_onine_address['contact_id']);
             $_sync_key = common::check_input($_onine_address['sync_key']);
-            $_from_station = common::check_input($_onine_address['from_station']);
+            $_from_station = strtoupper(common::check_input($_onine_address['from_station']));
             $_contact_type = common::check_input($_onine_address['action']);
 
             //适应前端逻辑,如果遇到Unedit 代表该地址未变动,移除变动记录里
@@ -3960,7 +3960,7 @@ class common {
                     if(empty($_sync_key)){
                         continue;
                     }
-                    $from_station = "Online_".strtoupper($_country);
+                    $from_station = "ONLINE_".strtoupper($_country);
                     $addressSql .= "INSERT INTO public.contacts_address(
                             addr_type,contact_id, addr1, addr2,addr3, addr4, 
                             ctry_code, city_code, postal_code,  
@@ -3974,8 +3974,8 @@ class common {
                 if ($_contact_type == "Modify"){
                     //代表在一个国家内的编辑 //contact_person='$_contact_person', contact_number='$_contact_number'  
                     $from_station_country = "";
-                    if (strpos($_from_station, "Online_") === 0) { // 确保字符串以 Online_ 开头
-                        $from_station_country = substr($_from_station, strlen("Online_"));
+                    if (strpos($_from_station, "ONLINE_") === 0) { // 确保字符串以 ONLINE_ 开头
+                        $from_station_country = substr($_from_station, strlen("ONLINE_"));
                     }
                     if($from_station_country == $_country){
                         $addressSql .= "UPDATE public.contacts_address
@@ -3987,7 +3987,7 @@ class common {
                         if(empty($_sync_key)){
                             continue;
                         }
-                        $from_station = "Online_".strtoupper($_country);
+                        $from_station = "ONLINE_".strtoupper($_country);
                         $addressSql .= "INSERT INTO public.contacts_address(
                                 addr_type,contact_id, addr1, addr2,addr3, addr4, 
                                 ctry_code, city_code, postal_code,  
@@ -4001,8 +4001,8 @@ class common {
                 }
                 if ($_contact_type == "Delete"){
                     $from_station_country = "";
-                    if (strpos($_from_station, "Online_") === 0) { // 确保字符串以 Online_ 开头
-                        $from_station_country = substr($_from_station, strlen("Online_"));
+                    if (strpos($_from_station, "ONLINE_") === 0) { // 确保字符串以 ONLINE_ 开头
+                        $from_station_country = substr($_from_station, strlen("ONLINE_"));
                     }
                     if($from_station_country == $_country){
                         $addressSql .=  "DELETE FROM public.contacts_address WHERE sync_key = '$_sync_key';";